Skip to content
Back to search

agent-skills-nix

Declarative management of Agent Skills on Nix

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Kyure-A/agent-skills-nix with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Kyure-A/agent-skills-nix'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kyure-a--agent-skills-nix/badge.svg)](/listings/kyure-a--agent-skills-nix)

HTML

<a href="/listings/kyure-a--agent-skills-nix"><img src="/api/listings/kyure-a--agent-skills-nix/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Put skills config in a small child flake so the only pinned inputs there are skill sources.

Use the quickstart example:

- Overview: [`examples/quickstart/README.md`](./examples/quickstart/README.md) - Main (tightly coupled): [`examples/quickstart/main/flake.nix`](./examples/quickstart/main/flake.nix) - Child (separated catalog): [`examples/quickstart/child/flake.nix`](./examples/quickstart/child/flake.nix)

Notes:

- In `main`, `agent-skills` and skill sources are listed directly in the top-level inputs. - In `child`, top-level only depends on `skills-catalog = path:./skills`; skills inputs live under `./skills/flake.nix`. - If you use source `input` references in your module config, pass flake `inputs` to Home Manager via `extraSpecialArgs`. - To enable a default target, set `targets.<name>.enable = true;` (e.g. `targets.claude.enable = true;`). - `structure = "link"` uses `home.file` symlinks; `symlink-tree` and `copy-tree` run in `home.activation`. - `symlink-tree` uses `rsync -a --delete` (preserve symlinks); `copy-tree` uses `rsync -aL --delete` (dereference symlinks). - Runtime `dest` values support `$HOME`, `~`, and `${VAR:-$HOME/...}` fallback forms (e.g. `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills`). Home Manager's `link` structure requires a static path and uses the fallback path. - Symlinks inside skills are preserved when their target stays inside the source root; escaping or dangling ones are dropped. See [Symlinks inside skills](#symlinks-inside-skills).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 142 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # agent-skills-nix
  2. Manage Agent Skills (directories containing `SKILL.md`) declaratively with Nix.
  3. Pin skill sources, select the skills you need, and install them through Home
  4. Manager or project-local commands. You can also export selected skills as a
  5. self-contained Agent Plugin.
  6. Nothing is installed by default: choose both skills and targets explicitly.
  7. ## Quick start with Home Manager
  8. For an existing flake-based Home Manager configuration, add these inputs to
  9. your flake:
  10. ```nix
  11. inputs = {
  12. agent-skills.url = "github:Kyure-A/agent-skills-nix";
  13. anthropic-skills = {
  14. url = "github:anthropics/skills";
  15. flake = false;
  16. };
  17. };
  18. ```
  19. Capture the flake inputs with `outputs = inputs@{ ... }: ...;`. Add
  20. `inputs.agent-skills.homeManagerModules.default` to your existing Home Manager
  21. `modules` list and pass `extraSpecialArgs = { inherit inputs; };` to
  22. `home-manager.lib.homeManagerConfiguration`. This makes the named skill input
  23. available to the module.
  24. Then add the following to your Home Manager configuration:
  25. ```nix
  26. programs.agent-skills = {
  27. enable = true;
  28. sources.anthropic = {
  29. input = "anthropic-skills";
  30. subdir = "skills";
  31. };
  32. skills.enable = [ "frontend-design" "skill-creator" ];
  33. targets.claude.enable = true;
  34. };
  35. ```
  36. Apply your Home Manager configuration as usual. The selected skills are synced
  37. to `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills`. Enable other agents with
  38. `targets.<name>.enable = true;`; see [default target paths](#default-target-paths).
  39. For an existing non-empty skills directory, see
  40. [destination ownership](./docs/installation.md#destination-ownership).
  41. The [complete quickstart examples](./examples/quickstart/README.md) show both
  42. ways to arrange the inputs:
  43. - [Main flake](./examples/quickstart/main/flake.nix): keep agent-skills and skill
  44. sources alongside your Home Manager inputs.
  45. - [Child flake](./examples/quickstart/child/flake.nix): keep the skill inputs in a
  46. separate catalog flake.
  47. ## How it works
  48. 1. **Sources** point to skill roots in flake inputs, local paths, or an optional
  49. [source registry](./docs/source-registry.md).
  50. 2. **Discovery** scans for `SKILL.md` files and builds a catalog. Nested skill
  51. IDs use `/`, such as `documents/pdf`; `idPrefix` adds a source namespace.
  52. 3. **Selection** chooses catalog entries with `skills.enable` or
  53. `skills.enableAll`, and custom declarations with `skills.explicit`.
  54. 4. **Bundling** builds the selection in the Nix store, including any content
  55. transforms and package dependencies.
  56. 5. **Targets** install the bundle for enabled agents. Explicit skills can limit
  57. installation to named targets with `agents`.
  58. ## Guides and examples
  59. | Task | Guide | Example |
  60. |------|-------|---------|
  61. | Configure sources, select skills, and customise content | [Configuration](./docs/configuration.md) | [Transforms and dependencies](./examples/skill-customization/explicit-transform.nix) |
  62. | Install skills in a project | [Installation](./docs/installation.md#project-local-installation) | [Local install flake](./examples/local-install/flake.nix) |
  63. | Install automatically on shell entry | [Development shells](./docs/installation.md#development-shells) | [devShell flake](./examples/devshell/flake.nix) |
  64. | Pin sources without a flake input per repository | [Source registry](./docs/source-registry.md) | [Registry flake](./examples/source-registry/README.md) |
  65. | Export a portable skills-only plugin | [Agent Plugin export (experimental)](./docs/agent-plugin.md) | [Plugin flake](./examples/agent-plugin/README.md) |
  66. | Build your own integration | [Library and flake reference](./docs/reference.md) | [Library snippet](./examples/library-functions/snippet.nix) |
  67. The root flake has an empty catalog and no enabled targets. Installation
  68. commands such as `nix run .#skills-install-local` must run against your own
  69. configured flake. Home Manager installs skills when you activate your home
  70. configuration; it does not add apps to your flake.
  71. ## Default target paths
  72. Use `agents` to install a shared skill set for tools that discover
  73. `.agents/skills`. Claude Code uses its own skill directory:
  74. | Target | Global path | Local path |
  75. |--------|-------------|------------|
  76. | agents (shared) | `$HOME/.agents/skills` | `.agents/skills` |
  77. | claude | `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills` | `.claude/skills` |
  78. Product-specific targets remain available for separate installation destinations
  79. and features that require a dedicated path. See the
  80. [full target list](./docs/installation.md#default-target-paths).
  81. All built-in targets are disabled by default. Global targets use
  82. `symlink-tree`; local targets use `copy-tree`. See
  83. [target configuration](./docs/installation.md#target-configuration) for custom
  84. paths, structures, and system filters.
  85. ## Development
  86. The root `flake.nix` depends only on nixpkgs. It wires the library, packages,
  87. apps, checks, and Home Manager module through ordinary Nix imports:
  88. | Directory | Contents |
  89. |-----------|----------|
  90. | `lib/` | Discovery, selection, bundling, targets, registry, and plugin export |
  91. | `modules/` | Shared options and Home Manager integration |
  92. | `nix/` | Package, app, and default configuration definitions |
  93. | `scripts/` | Synchronization, source locking, and plugin validation runtimes |
  94. | `test/` | Library and runtime checks, plus Home Manager integration tests |
  95. | `examples/` | Consumer configurations |
  96. Home Manager is a test-only dependency in `test/flake.nix`, which imports the
  97. root flake through a relative path and follows its nixpkgs input. Consumers do
  98. not inherit a Home Manager dependency.
  99. Run both check suites from the repository root:
  100. ```console
  101. nix flake check
  102. nix flake check ./test
  103. ```
  104. To update dependencies, update the root lock first, then the test lock:
  105. ```console
  106. nix flake update
  107. nix flake update --flake ./test
  108. ```
  109. CI runs both suites and checks formatting with `nix fmt`. The dependency update
  110. workflow updates both lock files.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.