### Local Skills Installation using mkLocalInstallScript Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Example of using `mkLocalInstallScript` within a flake to enable local skill installation. This allows running `nix run .#skills-install-local` from the project root. ```Nix flake.nix { outputs = { # ... apps.default.skills-install-local = mkLocalInstallScript { ... }; }; } ``` -------------------------------- ### Discover Catalog Example Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Demonstrates the recursive discovery of SKILL.md directories and generation of skill IDs. It shows how to use `idPrefix` for namespacing and highlights error handling for missing SKILL.md files and duplicate IDs. ```Nix discoverCatalog { idPrefix = "openai/pdf"; } ./skills ``` -------------------------------- ### Auto-install Skills with DevShell using mkShellHook Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Demonstrates using `mkShellHook` to automatically install skills whenever a development shell is entered. This ensures skills are available upon `nix develop`. ```Nix flake.nix { outputs = { # ... devShells.default = mkShellHook { ... }; }; } ``` -------------------------------- ### Skill Customization with Transform and Packages Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Shows how to customize a skill's SKILL.md content and bundle dependencies using `transform` and `packages` options. This example demonstrates transforming the original SKILL.md and including package binaries as local paths. ```Nix explicit-transform.nix { my-skill = { transform = '' ${original} ## Dependencies ${dependencies} ''; packages = [ pkgs.jq pkgs.curl ]; }; } ``` -------------------------------- ### Select Skills Example Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Illustrates the use of `selectSkills` to manage skill allowlists and explicit skill selections. This function prevents accidental drift by erroring on unknown allowlist entries or missing skill files. ```Nix selectSkills { allowlist = ["cat-a/skill-1"]; } ./skills ``` -------------------------------- ### Force Local Skills Installation Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Command to force the installation of local skills, overwriting existing non-Nix-managed paths. Set AGENT_SKILLS_FORCE to 1 to enable this behavior. ```Shell AGENT_SKILLS_FORCE=1 nix run .#skills-install-local ``` -------------------------------- ### Build Main Pattern Activation Package Source: https://github.com/kyure-a/agent-skills-nix/blob/master/examples/quickstart/README.md Use this command to build the activation package for the main pattern's home configuration. ```bash nix build ./examples/quickstart/main#homeConfigurations.example.activationPackage ``` -------------------------------- ### Scoping Skill Source Root Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Demonstrates how to scope the source root for skills to avoid importing unrelated directories like `.git` or build artifacts. This is achieved using `path` or `subdir` arguments. ```Nix mkBundle { path = ./skills; # Scopes to ./skills directory # or # subdir = "my-skill-subdir"; # Scopes to a subdirectory } ``` -------------------------------- ### Build Child Pattern Activation Package Source: https://github.com/kyure-a/agent-skills-nix/blob/master/examples/quickstart/README.md Use this command to build the activation package for the child pattern's home configuration. ```bash nix build ./examples/quickstart/child#homeConfigurations.example.activationPackage ``` -------------------------------- ### Configure Unique Skill IDs with Prefixes Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Use `idPrefix` to namespace discovered skill IDs when multiple sources expose the same relative path. This ensures unique identification for skills like 'pdf' from different sources. ```nix sources.openai = { input = "openai-skills"; subdir = "skills"; idPrefix = "openai"; }; sources.anthropic = { input = "anthropic-skills"; subdir = "skills"; idPrefix = "anthropic"; }; skills.enable = [ "openai/pdf" "anthropic/pdf" ]; ``` -------------------------------- ### Show Main Pattern Flake Source: https://github.com/kyure-a/agent-skills-nix/blob/master/examples/quickstart/README.md Use this command to inspect the flake structure of the main pattern. ```bash # main pattern nix flake show ./examples/quickstart/main ``` -------------------------------- ### Local Skills Sync Command Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Command to sync the skill bundle to local targets relative to the current working directory. This uses the `skills-install-local` app. ```Shell nix run .#skills-install-local ``` -------------------------------- ### Global Skills Sync Command Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Command to sync the skill bundle to the user's home directory using Home Manager. Destinations can be overridden by setting the AGENT_SKILLS_DESTS environment variable. ```Shell nix run .#skills-install ``` -------------------------------- ### Local Skills Sync with Custom Root and Destinations Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Command to sync the skill bundle to local targets, overriding the root directory and specific destinations. AGENT_SKILLS_ROOT and AGENT_SKILLS_LOCAL_DESTS are used for customization. ```Shell AGENT_SKILLS_ROOT=~/my-project/skills AGENT_SKILLS_LOCAL_DESTS="./local-skills/app1 ./local-skills/app2" nix run .#skills-install-local ``` -------------------------------- ### Default Transform Behavior (No Transform Specified) Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Describes the default behavior when neither `transform` nor `packages` are specified for skill customization. The original SKILL.md content is used as-is. ```Nix explicit-transform.nix { my-skill = {}; } ``` -------------------------------- ### List Default Catalog Command Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Command to display a JSON view of the default skill catalog. This is useful for inspecting available skills. ```Shell nix run .#skills-list ``` -------------------------------- ### Restore Flat-Only Skill Discovery Behavior Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md If your source layout relies on flat-only discovery, set 'filter.maxDepth = 1;' in your source configuration to restore the previous behavior. ```nix sources.my-skills = { path = ./skills; filter.maxDepth = 1; # restore flat-only behavior }; ``` -------------------------------- ### Safe Symlink Handling in Skills Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Explains how symlinks within skill directories are handled. Symlinks are kept if their target remains within the declared source root; otherwise, they are dropped. The `--safe-links` flag enforces this check based on textual targets. ```Nix # Example of a safe symlink # symlink = "../shared/file"; # Example of an unsafe symlink (target escapes root) # symlink = "../../outside/file"; ``` -------------------------------- ### Global Skills Sync with Custom Destinations Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Command to sync the skill bundle to custom destinations in the user's home directory. The AGENT_SKILLS_DESTS environment variable specifies multiple target paths. ```Shell AGENT_SKILLS_DESTS="~/tmp/skills1 ~/tmp/skills2" nix run .#skills-install ``` -------------------------------- ### Show Child Pattern Flake Source: https://github.com/kyure-a/agent-skills-nix/blob/master/examples/quickstart/README.md Use this command to inspect the flake structure of the child pattern. ```bash # child pattern nix flake show ./examples/quickstart/child ``` -------------------------------- ### Default Transform Behavior with Packages Only Source: https://github.com/kyure-a/agent-skills-nix/blob/master/README.md Explains the default behavior when only `packages` is specified for skill customization. In this case, the default transform concatenates the `dependencies` table with the `original` SKILL.md content. ```Nix explicit-transform.nix { my-skill = { packages = [ pkgs.jq ]; }; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.