feat(claude-code): enable frontend-design plugin#154
Conversation
…gins Merge "frontend-design@claude-code-plugins" into the enabledPlugins attrset alongside the existing lspPlugins-derived map. The lspPlugins-driven entries continue to come from the programs.claude-code.extended.lspPlugins option, while this static addition opts into the frontend-design plugin from the claude-code-plugins marketplace.
|
Claude finished @Bad3r's task in 1m 41s —— View job Claude Code Review
Overall: small, well-scoped change. The merge with 1. Stale comment vs. new behavior —
|
There was a problem hiding this comment.
Code Review
This pull request modifies the claude-code Home Manager module to include the frontend-design plugin by default. Feedback indicates that hardcoding this plugin prevents user customization and suggests exposing it as a configurable option to maintain consistency with existing plugin management.
…lace plugins Introduces `programs.claude-code.extended.extraPlugins` as an `attrsOf bool` so hosts can toggle non-LSP Claude Code plugins without editing `modules/hm-apps/claude-code.nix`. The Home Manager module now derives `enabledPlugins` as a merge of the existing `lspPlugins`-derived map and the new `extraPlugins` attrset. Also corrects the `frontend-design` marketplace suffix from `@claude-code-plugins` (a repo that does not exist) to `@claude-plugins-official`, where the plugin actually lives upstream (`anthropics/claude-plugins-official` `marketplace.json`). The stale inline comment is rewritten to describe the new two-source derivation rule. Validation: - `nix fmt` - `nix develop -c pre-commit run --hook-stage manual --files modules/apps/claude-code.nix modules/hm-apps/claude-code.nix` - `nix flake check --accept-flake-config --no-build --offline` - `nix build .#nixosConfigurations.tpnix.config.system.build.toplevel --no-link` - `nix eval` of resolved `home.file.".claude/settings.json"` confirms `frontend-design@claude-plugins-official: true` lands in `enabledPlugins` alongside the LSP entries.
…mptions Adds two bullets to the module Notes block: one pointing to the new `extraPlugins` option and one calling out that `enabledPlugins` keys require the `@<marketplace>` suffix to match a marketplace already registered in `~/.claude/plugins/known_marketplaces.json`. The default plugins assume `claude-plugins-official`, so a fresh activation must register that marketplace once with `claude-plugins install anthropics/claude-plugins-official` to avoid silent no-ops. Validation: `nix flake check --accept-flake-config --no-build --offline`.
Review feedback addressedTwo atomic commits land on this branch (will push after this comment):
Accepted
RejectedNone. All feedback was either valid or, in the case of #5 (slug verification), surfaced an upstream-name bug worth fixing. Production-grade rationale
|
|
Claude finished @Bad3r's task in 1m 55s —— View job Claude Code Review
Solid follow-up — the hardcoded toggle is now a real NixOS option, the comment drift from review #1 is resolved, the marketplace assumption is documented, and the upstream-name bug fix is folded into the default. The new option mirrors the A few non-blocking observations on the new code: 1. Merge precedence — silent override of LSP keys (
|
…on assertions Adds two assertions in `modules/apps/claude-code.nix` so misconfigured `programs.claude-code.extended.extraPlugins` fails at evaluation instead of silently no-opping at Claude Code runtime: * Key-shape assertion rejects entries that lack a `@<marketplace>` suffix (e.g. a typo `"frontend-design" = true;`), since Claude Code ignores unsuffixed keys when scanning `~/.claude/settings.json`'s `enabledPlugins`. * LSP-collision assertion rejects entries whose key matches an `lspPlugins.<key>@claude-plugins-official` identifier. Without this, setting `extraPlugins."pyright-lsp@claude-plugins-official" = false` would disable the plugin in `settings.json` while leaving the LSP binary installed via the `lib.mkOverride 1050` block, producing a confusing inconsistency. Also clarifies the option `example` to show the per-key opt-out pattern (`"<plugin>@<marketplace>" = false;` keeps the entry registered but disabled) alongside the third-party-marketplace pattern, and adds a sentence to the option `description` documenting the LSP-collision rejection. Validation: - `nix fmt` - `nix flake check --accept-flake-config --no-build --offline` - `nix build .#nixosConfigurations.tpnix.config.system.build.toplevel --no-link` - `nix eval` of the assertion predicates against four input cases (valid default, missing-suffix typo, LSP collision, both) confirms the right keys are flagged as `malformedKeys` / `lspCollisions`.
Round 2 feedback addressed
Accepted
Rejected (with reason)
Production-grade rationale
|
|
Claude finished @Bad3r's task in 1m 52s —— View job Claude Code Review (round 3)
The assertions in A few small, non-blocking observations on the new code: 1. Key-shape regex is permissive (
|
Round 3: no further code changesThe latest Claude review raises five non-blocking observations and explicitly suggests no code changes:
Reviewer summary verbatim: "Suggested follow-ups: optional regex tightening (#1) only if real-world typos slip past The branch state is the merge candidate. |
Summary
Exposes
programs.claude-code.extended.extraPlugins(attrsOf bool) inmodules/apps/claude-code.nixso non-LSP Claude Code plugins can be toggled per-host without editing the Home Manager module. The Home Manager side derivesenabledPluginsas the merge of the existinglspPlugins-derived map and the newextraPluginsattrset.The default for
extraPluginsenablesfrontend-design@claude-plugins-official, replacing the originalfrontend-design@claude-code-pluginsentry. Upstream verification (anthropics/claude-plugins-officialmarketplace.jsonviagh api) confirmed thatfrontend-designlives in the same marketplace as the existing LSP plugins;anthropics/claude-code-pluginsdoes not exist.The module Notes block now lists both option entry points and calls out that
enabledPluginskeys silently no-op when their marketplace is not registered in~/.claude/plugins/known_marketplaces.json.Test plan
nix fmtnix develop -c pre-commit run --hook-stage manual --files modules/apps/claude-code.nix modules/hm-apps/claude-code.nixnix flake check --accept-flake-config --no-build --offlinenix build .#nixosConfigurations.tpnix.config.system.build.toplevel --no-linknix evalof resolvedhome.file.".claude/settings.json".textconfirms"frontend-design@claude-plugins-official": truelands inenabledPluginsalongside the LSP entries.~/.claude/settings.json.