feat: add global-placement home-manager module (task 0002) #2
Reference in New Issue
Block a user
Delete Branch "task-0002-global-placement-home-manager"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task:
.claude/tasks/0002-global-placement-home-manager.mdSummary
Adds the global (every-project) placement output: a home-manager module that installs an operator's selected skills into
~/.claude/skills/, plus the composition check that proves it.homeModules.default(aliasedagents-skills) exposesprograms.agents.skills, alistOf packagedefaulting to[]. Selection is by derivation, pulled frompackages.<system>.home.fileat${claude-code.configDir}/skills/<name>withrecursive = true, gated onprograms.claude-code.enable, sourcingconfigDirfrom the claude-code module. The placement name is the derivation's eval-timeskillNamepassthru (no import-from-derivation). It deliberately does not feed the single-valuedprograms.claude-code.skills.agentsis an umbrella namespace with no sharedenable; the skills feature self-gates (empty list is a no-op, files land only with Claude Code enabled).nix flake checkcomposition check builds the home-files tree under five operator configurations and asserts placement, recursive linkage, the enable gate,configDirsourcing, and coexistence with an operator's own attribute-set and whole-directory skills.home-managerflake input following this flake's nixpkgs, present only to drive the check.Deviations
homeModulesalso exposes anagents-skillsalias besidedefault(the criteria require onlydefault), mirroring gitea-axi's module shape.configDirscenario was added to the check during review, so the "configDir sourcing" leg is actually exercised rather than passing at the default.claudealongside a hardcode.Review
Risk
Overall: Medium
flake.nix/flake.lock, but consumers only import the module opt-in and nothing existing is rewired.homeModules.defaultis a newly published surface but trivial to drop with no migration or deletion.~/.claude/skills/, gated behindclaude-code.enable.mkIf/listToAttrsmap, but the check harness and its store-path-vs-attr-set nuances add cognitive load.Unaddressed findings
Standards
runCommandLocal+printf … > SKILL.mdfixture shape appears three times inchecks/home-manager-module.nix(judgement call). Left as-is: each fixture plays a distinct role and a shared helper would obscure that; the reviewer rated it acceptable.Spec
agents-skillsalias besidehomeModules.defaultis beyond the bare task text (scope). Kept intentionally as a harmless convenience mirroring gitea-axi; the reviewer found no material creep.