How to declare your Claude skills in a Nix flake
Когда использовать: You want your Claude skill set tracked the same way as your shells, editors, and services.
Предварительные требования
- Nix with flakes enabled — echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
- The flake added as an input — flake input
agent-skills-nix.url = "github:Kyure-A/agent-skills-nix";
Поток
-
Add the inputAdd agent-skills-nix to my flake inputs and wire it into Home Manager.✓ Скопировано→ flake.nix updated with the input + module import
-
List the skills I wantDeclare the skills I use: linear-claude-skill, symfony-ux-skills, mck-ppt-design-skill. Pin to current main.✓ Скопировано→ A
skills = { ... };block with pinned revs -
Build and switchRun home-manager switch and verify ~/.claude/skills/ is populated.✓ Скопировано→ All skills present as symlinked directories
Итог: Reproducible skill set managed by Nix — wipe your dotfiles and get the same setup back in one command.
Подводные камни
- Upstream skill changes break your workflow — Pin to a specific rev, only bump on purpose