How to declare your Claude skills in a Nix flake
When to use: You want your Claude skill set tracked the same way as your shells, editors, and services.
Prerequisites
- 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";
Flow
-
Add the inputAdd agent-skills-nix to my flake inputs and wire it into Home Manager.✓ Copied→ 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.✓ Copied→ A
skills = { ... };block with pinned revs -
Build and switchRun home-manager switch and verify ~/.claude/skills/ is populated.✓ Copied→ All skills present as symlinked directories
Outcome: Reproducible skill set managed by Nix — wipe your dotfiles and get the same setup back in one command.
Pitfalls
- Upstream skill changes break your workflow — Pin to a specific rev, only bump on purpose