Skip to content

Commit ed0d384

Browse files
committed
refactor(skills): migrate skills to agent-skills-nix
- Remove local skills directory from git tracking - Add agent-skills-nix and StackOneHQ/skills as flake inputs - Configure devShell to auto-install skills via symlink-tree - Update .gitignore to exclude Nix-managed skill directories - Update CLAUDE.md to document the new skills management approach Skills are now sourced from StackOneHQ/skills repository and automatically installed when entering `nix develop`.
1 parent 32e9ff8 commit ed0d384

6 files changed

Lines changed: 121 additions & 84 deletions

File tree

.claude/skills/orama-integration/SKILL.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

.claude/skills/release-please/SKILL.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,8 @@ dist
181181
.direnv
182182
!.envrc
183183

184+
# Agent skills (managed by Nix via agent-skills-nix)
185+
.claude/skills
186+
.codex/skills
187+
.opencode/skills
188+

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55
## Rules and Skills Structure
66

77
- **Rules** (`.claude/rules/`): Automatically loaded based on file paths. Source of truth for project conventions.
8-
- **Skills** (`.claude/skills/`): Manually invoked for specific integrations.
8+
- **Skills** (`.claude/skills/`): Managed by Nix via [agent-skills-nix](https://github.com/Kyure-A/agent-skills-nix). Skills are sourced from [StackOneHQ/skills](https://github.com/StackOneHQ/skills) and installed automatically when entering `nix develop`.
99
- **Cursor rules** (`.cursor/rules/`): Symlinks to `.claude/rules/` for consistency.
1010

1111
## Available Rules

flake.lock

Lines changed: 64 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,67 @@
33

44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6+
7+
# Agent skills management
8+
agent-skills.url = "github:Kyure-A/agent-skills-nix";
9+
agent-skills.inputs.nixpkgs.follows = "nixpkgs";
10+
11+
# StackOne skills repository (non-flake)
12+
stackone-skills.url = "github:StackOneHQ/skills";
13+
stackone-skills.flake = false;
614
};
715

816
outputs =
9-
{ nixpkgs, ... }:
17+
{
18+
nixpkgs,
19+
agent-skills,
20+
stackone-skills,
21+
...
22+
}:
1023
let
1124
systems = [
1225
"x86_64-linux"
1326
"aarch64-linux"
1427
"aarch64-darwin"
1528
];
1629
forAllSystems = nixpkgs.lib.genAttrs systems;
30+
31+
# Agent skills configuration
32+
agentLib = agent-skills.lib.agent-skills;
33+
sources = {
34+
stackone = {
35+
path = stackone-skills;
36+
subdir = ".";
37+
};
38+
};
39+
catalog = agentLib.discoverCatalog sources;
40+
allowlist = agentLib.allowlistFor {
41+
inherit catalog sources;
42+
enable = [
43+
"orama-integration"
44+
"release-please"
45+
];
46+
};
47+
selection = agentLib.selectSkills {
48+
inherit catalog allowlist sources;
49+
skills = { };
50+
};
1751
in
1852
{
1953
devShells = forAllSystems (
2054
system:
2155
let
2256
pkgs = nixpkgs.legacyPackages.${system};
57+
bundle = agentLib.mkBundle { inherit pkgs selection; };
58+
# Use symlink-tree instead of copy-tree for skills
59+
localTargets = {
60+
claude = {
61+
dest = ".claude/skills";
62+
structure = "symlink-tree";
63+
enable = true;
64+
systems = [ ];
65+
};
66+
};
2367
in
2468
{
2569
default = pkgs.mkShellNoCC {
@@ -47,13 +91,17 @@
4791
4892
# Install dependencies only if node_modules/.pnpm/lock.yaml is older than pnpm-lock.yaml
4993
if [ ! -f node_modules/.pnpm/lock.yaml ] || [ pnpm-lock.yaml -nt node_modules/.pnpm/lock.yaml ]; then
50-
echo "📦 Installing dependencies..."
94+
echo "Installing dependencies..."
5195
pnpm install --frozen-lockfile
5296
fi
5397
5498
# Install lefthook git hooks
5599
lefthook install > /dev/null 2>&1
56-
'';
100+
''
101+
+ agentLib.mkShellHook {
102+
inherit pkgs bundle;
103+
targets = localTargets;
104+
};
57105
};
58106
}
59107
);

0 commit comments

Comments
 (0)