The synthesized plugin that delivers managed MCP and LSP configuration to
Claude Code was named `claude-code-home-manager`. Claude Code derives the
MCP tool namespace from the plugin manifest (`plugin.json`), so that name
appeared in the prefix of every plugin-loaded MCP tool
(`mcp__plugin_<name>_<server>__<tool>`), adding 22 characters of overhead per
tool name.
Shorten the manifest name to `hm`, centralizing it in a `generatedPluginName`
binding, so tool prefixes become `mcp__plugin_hm_<server>__<tool>`. The
personal-plugin directory entry keeps the stable `claude-code-home-manager`
name (the path under `~/.claude/skills/`); a short name there would collide
with valid `programs.claude-code.plugins.hm` or `skills.hm` and fail the
uniqueness assertions.
This is a breaking change: users who allow or deny these tools by name in
their settings must update references from `claude-code-home-manager` to
`hm`. A news entry documents the migration.
Closes#9446
Assisted-by: Claude-Code:GLM-5.2
programs.claude-code.hooks previously only accepted inline strings.
It now shares the same either-lines-or-path content option used by
agents, commands, and rules, so a hook script can be referenced from
a file instead of being inlined.
mkSourceEntry used lib.isPath, which does not match derivations such
as pkgs.writeShellScript. Since lib.types.path accepts derivations,
a derivation-backed hook (or agent, command, rule, or output style)
sent the derivation to home.file.*.text and failed evaluation. Use
lib.hm.strings.isPathLike instead, and add a derivation-backed hook
test.
No release-notes entry: other option additions/extensions to this
module (e.g. path support for agents/commands, the rules option
itself) haven't warranted one either.
Claude Code lists a plugin's `agents/` and `commands/` entries with a
`readdir` that accepts only regular files, so symlinked directory entries
are skipped. Managed plugins were linked recursively, which materializes a
real directory holding one symlink per file, and wrapped with
`pkgs.symlinkJoin`, which mirrors directories and symlinks the leaf files.
Both layers dropped every agent and command a plugin provides.
Link each plugin as a single directory symlink, and wrap it with a
`runCommand` that links only top-level entries so component directories stay
symlinks to the original.
Also accept an attribute set for `plugins`, making the personal-plugin
directory name user-controlled and stable rather than derived from the
source's base name, which yields names such as `bxa1s0m3h4sh-source` that
change whenever the plugin is updated. The list form keeps working, with a
warning.
Persist managed plugins in Claude Code's personal skills directory so strict-parser subcommands do not receive injected --plugin-dir arguments. Retain version-gated legacy behavior for older and unversioned packages.
Filtering disabled shared servers out of `.mcp.json` (#9457) collapsed
"present but disabled" and "absent" into the same output, so a server
set
`enabled = false` for OpenCode could no longer remain present in Claude
Code. `.mcp.json` has no per-server `enabled` field, but settings.json
does via `disabledMcpjsonServers`.
Keep disabled servers in `.mcp.json` and list them under
`disabledMcpjsonServers` (merged with any user-set value). This honors
the
disabled intent without dropping the server, and covers both shared and
Claude Code-native servers.
Make the location of Claude Code's configuration files configurable.
The option defaults to `~/.claude` so existing setups are unaffected,
and exports the `CLAUDE_CONFIG_DIR` environment variable automatically
whenever the directory differs from the upstream default so the CLI
reads from the same location home-manager wrote to.
The option follows the convention established by
`programs.github-copilot-cli`: an absolute-path string with a
`defaultText` for clean documentation rendering, an `upstreamConfigDir`
constant, and a session variable wired only when the user opts out of
the upstream default.
Filtered or generated skill directories can evaluate to Nix store path
strings rather than path values. The previous top-level skills handling
only used lib.isPath, so those directory values fell through instead of
being linked or expanded.
Treat store-path strings as path-like for the top-level skills option in
Codex, Claude Code, Gemini CLI, and OpenCode, matching the behavior
already used for individual skill entries. Add NMT coverage for
store-path-string skill directories.
Allow for configuring marketplaces or individual plugins.
Both are provided as a list of either paths or packages.
The lone plugins are enabled by adding a --plugin-dir argument to the wrapper script.
Marketplaces are saved to the nix store and enabled by adding to the claude settings and known_marketplaces files.
With the marketplace "installed", the plugin can just be enabled via the enabledPlugins setting.
Claude Code rejects `--mcp-config` once the Home Manager wrapper injects
it around subcommands, which breaks commands like `claude mcp list`.
Claude Code 2.1.76 fixed `--plugin-dir` so it no longer consumes
following subcommands, so use that path for the generated MCP config
instead.
Generate a plugin directory with a manifest and `.mcp.json`, wrap
`claude` with `--plugin-dir` before user arguments, and snapshot that
wrapper directly in the tests. Keep the existing LSP support in the
generated plugin directory as well, and add coverage for the combined
MCP+LSP case plus the MCP integration merge path.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Claude skills are only found when using `SKILL.md` entrypoints.
Attribute names should be used for the directory structure, not the
filename.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Add `enableMcpIntegration` option to merge MCP servers from
`programs.mcp.servers` into Claude Code configuration. Claude Code
servers take precedence over general MCP servers when both define
the same server name.