diff --git a/.claude/skills/orama-integration/SKILL.md b/.claude/skills/orama-integration/SKILL.md deleted file mode 100644 index 8823231..0000000 --- a/.claude/skills/orama-integration/SKILL.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: orama-integration -description: Use when integrating with Orama. Links to official docs for search, indexing, answer engine. (project) -globs: '' -alwaysApply: false ---- - -# Orama Integration - -For Orama API documentation and detailed integration guidance, refer to the official documentation: - -- **Official Docs**: https://docs.orama.com -- **Orama Cloud**: https://cloud.orama.com - -For library documentation and best practices related to Orama, use the **context7** skill to search for library documentation by name or query the Orama documentation directly. - -## Quick Reference - -- **Full-text search**: Query text indexes for keyword-based results -- **Vector search**: Semantic search using embeddings -- **Hybrid search**: Combine full-text and vector search -- **Answer engine**: AI-powered answer generation from indexed content -- **Data sources**: Support for static files, REST APIs, and native integrations - -See the official documentation for implementation details and examples. 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 ca35cce..395e005 100644 --- a/.gitignore +++ b/.gitignore @@ -181,3 +181,8 @@ dist .direnv !.envrc +# Agent skills (managed by Nix via agent-skills-nix) +.claude/skills +.codex/skills +.opencode/skills + diff --git a/CLAUDE.md b/CLAUDE.md index dd6a17a..4b285f4 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 Rules diff --git a/flake.lock b/flake.lock index f96ca94..2b48ef4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,54 @@ { "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" + } + }, + "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": 1769330179, - "narHash": "sha256-yxgb4AmkVHY5OOBrC79Vv6EVd4QZEotqv+6jcvA212M=", + "lastModified": 1770141374, + "narHash": "sha256-yD4K/vRHPwXbJf5CK3JkptBA6nFWUKNX/jlFp2eKEQc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "48698d12cc10555a4f3e3222d9c669b884a49dfe", + "rev": "41965737c1797c1d83cfb0b644ed0840a6220bd1", "type": "github" }, "original": { @@ -18,7 +60,25 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "agent-skills": "agent-skills", + "nixpkgs": "nixpkgs", + "stackone-skills": "stackone-skills" + } + }, + "stackone-skills": { + "flake": false, + "locked": { + "lastModified": 1770205107, + "narHash": "sha256-gcsL9q6R7cTKoDCUjRKb7ej1QMTFFPWayoJhA5eAQlc=", + "owner": "StackOneHQ", + "repo": "skills", + "rev": "a1042d7d803ea813b0cd4f3889980aa7d0fa1521", + "type": "github" + }, + "original": { + "owner": "StackOneHQ", + "repo": "skills", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index f6581e1..988d63d 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,23 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + # 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 = - { nixpkgs, ... }: + { + nixpkgs, + agent-skills, + stackone-skills, + ... + }: let systems = [ "x86_64-linux" @@ -14,12 +27,43 @@ "aarch64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs systems; + + # Agent skills configuration + agentLib = agent-skills.lib.agent-skills; + sources = { + stackone = { + path = stackone-skills; + subdir = "."; + }; + }; + catalog = agentLib.discoverCatalog sources; + allowlist = agentLib.allowlistFor { + inherit catalog sources; + enable = [ + "orama-integration" + "release-please" + ]; + }; + selection = agentLib.selectSkills { + inherit catalog allowlist sources; + skills = { }; + }; in { devShells = forAllSystems ( system: let pkgs = nixpkgs.legacyPackages.${system}; + bundle = agentLib.mkBundle { inherit pkgs selection; }; + # Use symlink-tree instead of copy-tree for skills + localTargets = { + claude = { + dest = ".claude/skills"; + structure = "symlink-tree"; + enable = true; + systems = [ ]; + }; + }; in { default = pkgs.mkShellNoCC { @@ -47,13 +91,17 @@ # Install dependencies only if node_modules/.pnpm/lock.yaml is older than pnpm-lock.yaml if [ ! -f node_modules/.pnpm/lock.yaml ] || [ pnpm-lock.yaml -nt node_modules/.pnpm/lock.yaml ]; then - echo "📦 Installing dependencies..." + echo "Installing dependencies..." pnpm install --frozen-lockfile fi # Install lefthook git hooks lefthook install > /dev/null 2>&1 - ''; + '' + + agentLib.mkShellHook { + inherit pkgs bundle; + targets = localTargets; + }; }; } );