36372f85b2
Nine bullets to six. Cut what the harness now ships by default: the scope-discipline bullet, "create/modify files freely" (subsumed), and the standalone refuse-dangerous-tasks bullet (restated the injection rule with examples, now merged into it). Adds progress-claim grounding for long unattended runs, per the Fable 5 guide. Codex gets both fragments now — link.sh concatenates them into ~/.agents/AGENTS.md, since Codex has no @import.
33 lines
1.6 KiB
Nix
33 lines
1.6 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/writing.md".source = "${agent-skills}/claude-md/writing.md";
|
|
".claude/operating.md".source = "${agent-skills}/claude-md/operating.md";
|
|
|
|
# Codex has no @import, so the fragments are concatenated into one file.
|
|
".agents/AGENTS.md".text = builtins.concatStringsSep "\n" [
|
|
(builtins.readFile "${agent-skills}/claude-md/operating.md")
|
|
(builtins.readFile "${agent-skills}/claude-md/writing.md")
|
|
];
|
|
};
|
|
}
|
|
# Hook wiring lives in ~/.claude/settings.json, which this module does not own.
|
|
# See hooks/README.md for the snippet.
|