Files
agent-skills/nix/home.nix
T
naps62 08195c1cd4 feat(hooks): track writing contracts + linters in repo
comms-lint.py and comment-lint.py lived only in ~/.claude, which is not
a git repo. Contract prose lived in ~/.claude/CLAUDE.md. Neither survived
a machine rebuild.

Prose moves to claude-md/ fragments, imported via @name.md. Linters move
to hooks/. link.sh and home.nix distribute both. settings.json wiring
stays manual — it holds machine-local MCP/statusline config this repo
must not own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaGR6ERGCfzWTtuv2rebGe
2026-07-27 14:34:29 +00:00

27 lines
1.3 KiB
Nix

# Home-manager module: link centralized agent skills into Claude Code + Codex.
# Usage: add this flake as an input, then import this module in your home config.
#
# inputs.agent-skills.url = "git+https://git.naps.pt/yolo/agent-skills.git";
# # in home.nix imports: inputs.agent-skills.homeModules.default
#
# recursive=true links each FILE individually, so machine-local skills can still
# live alongside the managed ones in the same dir (a whole-dir symlink would not).
{ agent-skills }:
{ ... }:
{
home.file = {
".claude/skills" = { source = "${agent-skills}/skills"; recursive = true; };
".agents/skills" = { source = "${agent-skills}/skills"; recursive = true; };
".claude/commands" = { source = "${agent-skills}/commands"; recursive = true; };
".claude/hooks" = { source = "${agent-skills}/hooks"; recursive = true; };
# CLAUDE.md fragments land in ~/.claude root, pulled in by `@name.md` imports.
# Listed one by one: recursive on ~/.claude would fight every other tool
# writing there (settings.json, projects/, file-history/).
".claude/public-comms.md".source = "${agent-skills}/claude-md/public-comms.md";
".claude/code-comments.md".source = "${agent-skills}/claude-md/code-comments.md";
};
}
# Hook wiring lives in ~/.claude/settings.json, which this module does not own.
# See hooks/README.md for the snippet.