Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .claude/skills/just-commands/SKILL.md

This file was deleted.

51 changes: 0 additions & 51 deletions .claude/skills/release-please/SKILL.md

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ build/

# Git hooks (managed by Nix)
.pre-commit-config.yaml

# Agent skills (managed by Nix via agent-skills-nix)
.claude/skills
.agents/skills
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Rules and Skills Structure

- **Rules** (`.claude/rules/`): Automatically loaded based on file paths. Source of truth for project conventions.
- **Skills** (`.claude/skills/`): Manually invoked for specific integrations.
- **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`.
- **Cursor rules** (`.cursor/rules/`): Symlinks to `.claude/rules/` for consistency.

## Available Skills
Expand Down
84 changes: 72 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 57 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,47 @@
flake-parts.url = "github:hercules-ci/flake-parts";
git-hooks.url = "github:cachix/git-hooks.nix";
treefmt-nix.url = "github:numtide/treefmt-nix";

# Agent skills management
agent-skills.url = "github:Kyure-A/agent-skills-nix";
agent-skills.inputs.nixpkgs.follows = "nixpkgs";

# StackOne skills repository (non-flake)
stackone-skills.url = "github:StackOneHQ/skills";
stackone-skills.flake = false;
};

outputs =
inputs@{
flake-parts,
git-hooks,
treefmt-nix,
agent-skills,
stackone-skills,
...
}:
let
# Agent skills configuration (outside flake-parts for access to inputs)
agentLib = agent-skills.lib.agent-skills;
sources = {
stackone = {
path = stackone-skills;
subdir = ".";
};
};
catalog = agentLib.discoverCatalog sources;
allowlist = agentLib.allowlistFor {
inherit catalog sources;
enable = [
"just-commands"
"release-please"
];
};
selection = agentLib.selectSkills {
inherit catalog allowlist sources;
skills = { };
};
in
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
Expand All @@ -34,6 +66,7 @@
};
settings.formatter.oxfmt = {
command = "${pkgs.oxfmt}/bin/oxfmt";
options = [ "--no-error-on-unmatched-pattern" ];
includes = [
"*.md"
"*.yml"
Expand Down Expand Up @@ -76,6 +109,23 @@
};
};
};

# Agent skills bundle and targets
bundle = agentLib.mkBundle { inherit pkgs selection; };
localTargets = {
claude = {
dest = ".claude/skills";
structure = "symlink-tree";
enable = true;
systems = [ ];
};
agents = {
dest = ".agents/skills";
structure = "symlink-tree";
enable = true;
systems = [ ];
};
};
in
{
formatter = treefmtEval.config.build.wrapper;
Expand All @@ -101,19 +151,23 @@

# Initialize git submodules if not already done
if [ -f .gitmodules ] && [ ! -f vendor/stackone-ai-node/package.json ]; then
echo "📦 Initializing git submodules..."
echo "Initializing git submodules..."
git submodule update --init --recursive
fi

# Install Python dependencies only if .venv is missing or uv.lock is newer
if [ ! -d .venv ] || [ uv.lock -nt .venv ]; then
echo "📦 Installing Python dependencies..."
echo "Installing Python dependencies..."
uv sync --all-extras --locked
fi

# Install git hooks
${pre-commit-check.shellHook}
'';
''
+ agentLib.mkShellHook {
inherit pkgs bundle;
targets = localTargets;
};
};
};
};
Expand Down