1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# skills
A package manager for [agent skills](https://agentskills.io): directories
holding a `SKILL.md` that teach Claude Code, Codex, OpenCode and other agents
how to do something.
`skills` installs them from any git repository, locks each one to a commit
and links it into every agent you use. The skills you added go in a manifest
and the exact commits in a lock file next to it, so committing both gives you
the same skills on every machine.
```console
$ skills add anthropics/skills --skill pdf --skill xlsx
Added skills at dbd4588: pdf, xlsx
Installed pdf, xlsx for claude, codex
$ skills list
skills dbd4588 anthropics/skills
pdf installed skills/pdf
xlsx installed skills/xlsx
$ skills update
skills is up to date at dbd4588
All skills are installed for claude, codex
```
## Install
You need git. With Go:
```sh
go install simenandre.no/skills@latest
```
With Nix:
```sh
nix profile install git+https://git.simenandre.no/skills
```
## Use
```sh
skills add owner/repo # every skill in a GitHub repository
skills add owner/repo --skill pdf # just one
skills add owner/repo#v1.2.0 # follow a tag or branch, or pin a commit
skills add git@host:me/skills.git # any git URL, including private ones
skills list # what is installed, from where, for whom
skills update [source...] # move to the newest commits
skills remove <source>... # uninstall
skills install # install exactly what is locked
```
`skills <command> --help` explains each command, with examples.
### Where things go
| What | Where |
|---|---|
| Manifest | `--manifest`, else `$SKILLS_MANIFEST`, else `$XDG_CONFIG_HOME/skills/skills.json` |
| Lock | `skills.lock`, next to the manifest |
| Checkouts | `$XDG_DATA_HOME/skills` |
| Installed skills | symlinks in each agent's skills directory |
Agents: `claude` (`$CLAUDE_CONFIG_DIR` or `~/.claude`), `codex` (`$CODEX_HOME`
or `~/.codex`) and `opencode` (`$XDG_CONFIG_HOME/opencode`). By default
`skills` installs into every one of them that exists on the machine; to choose,
list them in the manifest:
```json
{
"agents": ["claude"],
"sources": { "...": {} }
}
```
`skills` only ever replaces or removes symlinks it created, so skills you
installed some other way are left alone. If one is in the way, it tells you.
### Scripts
`skills list --json` prints machine-readable output. Progress goes to stderr,
and only to a terminal; `--quiet` silences everything but errors. Exit codes:
0 success, 1 failure, 2 invalid usage, 130 interrupted.
## home-manager
The flake has a home-manager module that installs the locked skills itself,
so they are part of your configuration like anything else:
```nix
{
inputs.skills.url = "git+https://git.simenandre.no/skills";
# in your home-manager configuration
imports = [ inputs.skills.homeManagerModules.default ];
programs.skills = {
enable = true;
lockFile = ./skills.lock;
# Lets `skills add` and `skills update` edit this file in your checkout.
manifest = "/home/me/dotfiles/skills.json";
agents = [ "claude" "codex" ];
};
}
```
The module sets `SKILLS_MANAGED_BY=home-manager`. `skills` then edits the
manifest and lock, fetches sources into the Nix store as you, and leaves the
installing to your next switch. Fetching as you matters for private
repositories: Nix finds them already in the store by their hash, even when
root evaluates your configuration without your SSH keys. On a new machine, run
`skills install` before your first switch for the same reason.
## Agent skill
`skill/skills` teaches agents to use this CLI. Install it with:
```sh
skills add https://git.simenandre.no/skills --skill skills
```
## License
MIT
|