From ac5f4afb7301e6e2f0bda6492ade0adb9fc6b77f Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:44:54 +0000 Subject: [PATCH 1/2] 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`. --- .claude/skills/just-commands/SKILL.md | 11 ---- .claude/skills/release-please/SKILL.md | 51 ---------------- .gitignore | 3 + CLAUDE.md | 2 +- flake.lock | 84 ++++++++++++++++++++++---- flake.nix | 54 ++++++++++++++++- 6 files changed, 127 insertions(+), 78 deletions(-) delete mode 100644 .claude/skills/just-commands/SKILL.md delete mode 100644 .claude/skills/release-please/SKILL.md diff --git a/.claude/skills/just-commands/SKILL.md b/.claude/skills/just-commands/SKILL.md deleted file mode 100644 index afb7fc2..0000000 --- a/.claude/skills/just-commands/SKILL.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: just-commands -description: Available just commands for this project. Use when you need to know what development commands are available. -user-invocable: false ---- - -## Available just commands - -``` -!`just --list` -``` diff --git a/.claude/skills/release-please/SKILL.md b/.claude/skills/release-please/SKILL.md deleted file mode 100644 index b51948e..0000000 --- a/.claude/skills/release-please/SKILL.md +++ /dev/null @@ -1,51 +0,0 @@ -# Release Please Trigger - -Trigger a release-please PR for a specific version. - -## Usage - -``` -/release-please -``` - -## Examples - -``` -/release-please 2.3.0 -/release-please 3.0.0 -``` - -## Instructions - -When this skill is invoked with a version argument: - -1. **Validate the version format**: Ensure the version follows semantic versioning (X.Y.Z format) - -2. **Create a new branch**: Create a branch named `chore/trigger-release-` - - ```bash - git switch -c chore/trigger-release- - ``` - -3. **Create an empty commit with Release-As trailer**: The commit message must include the `Release-As: ` trailer to trigger release-please - - ```bash - git commit --allow-empty -m "chore: trigger release - - Release-As: " - ``` - -4. **Push the branch and create a PR**: - - ```bash - git push -u origin chore/trigger-release- - gh pr create --title "chore: trigger release " --body "Trigger release-please to create version ." - ``` - -5. **Report the PR URL** to the user - -## Notes - -- The `Release-As` trailer in the commit message tells release-please to use that specific version -- Once the PR is merged to main, release-please will automatically create a release PR with the specified version -- The release PR will update CHANGELOG.md, version files, and create a GitHub release when merged diff --git a/.gitignore b/.gitignore index 94302ac..7e9f135 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ build/ # Git hooks (managed by Nix) .pre-commit-config.yaml + +# Agent skills (managed by Nix via agent-skills-nix) +.claude/skills diff --git a/CLAUDE.md b/CLAUDE.md index 9d88a5b..5a32672 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 diff --git a/flake.lock b/flake.lock index 784cc96..b5676ec 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "agent-skills": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769944375, + "narHash": "sha256-TmTyQvFz8rNCwN8MQZGFtgFGdJANF6P6nbxVOjQvpME=", + "owner": "Kyure-A", + "repo": "agent-skills-nix", + "rev": "bb2fc09cd0152867bd548422e66f4738b081d719", + "type": "github" + }, + "original": { + "owner": "Kyure-A", + "repo": "agent-skills-nix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -21,11 +42,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1768135262, - "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", "type": "github" }, "original": { @@ -41,11 +62,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1769069492, - "narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", + "lastModified": 1769939035, + "narHash": "sha256-Fok2AmefgVA0+eprw2NDwqKkPGEI5wvR+twiZagBvrg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", + "rev": "a8ca480175326551d6c4121498316261cbb5b260", "type": "github" }, "original": { @@ -75,6 +96,27 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "agent-skills", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1766387499, + "narHash": "sha256-AjK3/UKDzeXFeYNLVBaJ3+HLE9he1g5UrlNd4/BM3eA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "527ad07e6625302b648ed3b28c34b62a79bd103e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1764947035, @@ -93,11 +135,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1765674936, - "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", + "lastModified": 1769909678, + "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", + "rev": "72716169fe93074c333e8d0173151350670b824c", "type": "github" }, "original": { @@ -108,11 +150,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1768149890, - "narHash": "sha256-iihg1oHkVkYHD1pFQifGEP+Rw1g+LZQyDNbtAqpXtNM=", + "lastModified": 1770141374, + "narHash": "sha256-yD4K/vRHPwXbJf5CK3JkptBA6nFWUKNX/jlFp2eKEQc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4d113fe1f7bb454435a5cabae6cd283e64191bb7", + "rev": "41965737c1797c1d83cfb0b644ed0840a6220bd1", "type": "github" }, "original": { @@ -140,12 +182,30 @@ }, "root": { "inputs": { + "agent-skills": "agent-skills", "flake-parts": "flake-parts", "git-hooks": "git-hooks", "nixpkgs": "nixpkgs_2", + "stackone-skills": "stackone-skills", "treefmt-nix": "treefmt-nix" } }, + "stackone-skills": { + "flake": false, + "locked": { + "lastModified": 1770205343, + "narHash": "sha256-BM7bp8k6YQ2SfHaCEJVIQapeSBPOrCk9vD4egUTOEGw=", + "owner": "StackOneHQ", + "repo": "skills", + "rev": "26fc883972494517de7e8d94e4bcae63fc569c86", + "type": "github" + }, + "original": { + "owner": "StackOneHQ", + "repo": "skills", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": "nixpkgs_3" diff --git a/flake.nix b/flake.nix index 914d26a..eb32d4d 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,14 @@ 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 = @@ -13,8 +21,32 @@ 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" @@ -34,6 +66,7 @@ }; settings.formatter.oxfmt = { command = "${pkgs.oxfmt}/bin/oxfmt"; + options = [ "--no-error-on-unmatched-pattern" ]; includes = [ "*.md" "*.yml" @@ -76,6 +109,17 @@ }; }; }; + + # Agent skills bundle and targets + bundle = agentLib.mkBundle { inherit pkgs selection; }; + localTargets = { + claude = { + dest = ".claude/skills"; + structure = "symlink-tree"; + enable = true; + systems = [ ]; + }; + }; in { formatter = treefmtEval.config.build.wrapper; @@ -101,19 +145,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; + }; }; }; }; From 85e3342b703fb9c3752532b5e326544e945ac6cc Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:50:47 +0000 Subject: [PATCH 2/2] chore(skills): add .agents/skills directory for Codex compatibility Add .agents/skills as a target for agent-skills-nix alongside .claude/skills. This directory is used by Codex and other coding agents. --- .gitignore | 1 + flake.nix | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 7e9f135..14d2d5c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ build/ # Agent skills (managed by Nix via agent-skills-nix) .claude/skills +.agents/skills diff --git a/flake.nix b/flake.nix index eb32d4d..c4c4545 100644 --- a/flake.nix +++ b/flake.nix @@ -119,6 +119,12 @@ enable = true; systems = [ ]; }; + agents = { + dest = ".agents/skills"; + structure = "symlink-tree"; + enable = true; + systems = [ ]; + }; }; in {