useakit 0.1.0-dev.8 → 0.2.0-dev.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -3
- package/dist/index.mjs +348 -50
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# useakit
|
|
2
2
|
|
|
3
|
-
Install your [agent kit](https://
|
|
3
|
+
Install your [agent kit](https://useagentkit.dev) skills into Claude Code, Codex, Cursor and Gemini CLI.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npx useakit init
|
|
@@ -12,10 +12,122 @@ npx useakit init
|
|
|
12
12
|
npm install -g useakit
|
|
13
13
|
a-kit add release # install a skill in this project
|
|
14
14
|
a-kit add release -g # or in your home folder, for every project
|
|
15
|
-
a-kit
|
|
16
|
-
|
|
15
|
+
a-kit add acme/release # name the organization when more than one of yours has it
|
|
16
|
+
# or install another organization's public skill, no login needed
|
|
17
|
+
a-kit add kit/frontend # install every skill in a kit
|
|
18
|
+
a-kit add release --channel beta # install the skill's beta release
|
|
19
|
+
a-kit update # bring installed kits up to date, and skills to their channel's version
|
|
20
|
+
a-kit list # your skills and kits, their context cost, and where they're installed
|
|
21
|
+
a-kit try release "Cut a release for v2" # Claude with the skill and without it
|
|
17
22
|
```
|
|
18
23
|
|
|
24
|
+
Public skills are in the [gallery](https://useagentkit.dev/s). `npx useakit add <org>/<skill>` installs one without an account, at its current version (public skills have no channels); `a-kit update` keeps it current. They're kept under `public` in `agent-kit.lock.json`.
|
|
25
|
+
|
|
26
|
+
`a-kit try` sends the prompt to Claude twice, with the skill and without it, on your organization's Claude API key, and prints both answers with their tokens and cost. `--model` and `--skill-version` pick what to run; the prompt can also come in on stdin. Only the organization's admins can run it, since it spends the key.
|
|
27
|
+
|
|
28
|
+
## Release channels
|
|
29
|
+
|
|
30
|
+
A skill's newest version is `latest`. Its owners can also point `stable` and `beta` at any version from the skill's History tab (or through the MCP server). `--channel stable` or `--channel beta` installs that version and writes the channel to `agent-kit.lock.json`, so `a-kit update` follows it, even back to an older version. A channel nobody set installs the latest. `a-kit add` without `--channel` goes back to the latest. Kits install and follow each skill's latest.
|
|
31
|
+
|
|
19
32
|
Skills go to `.claude/skills/` for Claude Code and `.agents/skills/` for Codex, Cursor and Gemini CLI. Pick agents with `-a`, like `-a claude-code,codex`. What was installed is kept in `agent-kit.lock.json`.
|
|
20
33
|
|
|
34
|
+
## Changing a skill
|
|
35
|
+
|
|
36
|
+
Your organization's skills live in its GitHub repository, one folder each in `skills/<skill>/`, and a commit there becomes a new version. To change one, change it there like any code:
|
|
37
|
+
|
|
38
|
+
1. Clone the repository (`gh repo clone acme/skills`) and change `skills/<skill>/`.
|
|
39
|
+
2. `a-kit check <skill>` checks it.
|
|
40
|
+
3. `a-kit link <clone>/skills/<skill>` lets you try it in your agent.
|
|
41
|
+
4. Commit it on a branch and open a pull request. Merging it makes the new version, and `a-kit update` brings it to everyone.
|
|
42
|
+
|
|
43
|
+
In a clone, `a-kit check` reads the repository the way agent kit does and lists what it would reject, without a login:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
a-kit check # every skill, plus evals/, kits/ and channels.yaml
|
|
47
|
+
a-kit check release # one skill, by name or folder (skills/release)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
✗ Its name is “ship”, but its folder is “deploy”. They have to match. skills/deploy/SKILL.md
|
|
52
|
+
✗ `description` is empty. skills/deploy/SKILL.md:3
|
|
53
|
+
|
|
54
|
+
The repository (2 skills): 2 errors. agent kit won't make a version of a skill with errors.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
It exits with 1 when there's an error, so it can also run on the repository's pull requests.
|
|
58
|
+
|
|
59
|
+
To try a skill you're changing before you open the pull request, link your agents to its folder in the clone:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
a-kit link ~/code/acme-skills/skills/release # run in the project you test it in
|
|
63
|
+
a-kit add release # back to agent kit's version when you're done
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`link` replaces the installed copy (`.claude/skills/release`, `.agents/skills/release`) with a link to the folder, so your agents use your edits as you make them; a new session picks up one an open session missed. It works with `-g` and `-a` like `add`; when the skill is also installed with `-g`, link it with `-g` too, since agents use your personal copy over a project's (`link` warns), and lists the problems `a-kit check` would find. It won't replace a folder agent kit didn't install, or one with edits that aren't in agent kit. `a-kit update` leaves a linked skill alone, and so does a kit that drops it.
|
|
67
|
+
|
|
68
|
+
## Kits
|
|
69
|
+
|
|
70
|
+
A kit is a named bundle of your organization's skills, like `frontend`, made in agent kit's web or through its MCP server. `a-kit add kit/frontend` installs all of them (`kit/acme/frontend` names the organization when more than one of yours has a kit by that name) and records the kit in the lock. `a-kit update` then follows the kit: skills added to it get installed, and skills taken out of it get removed, unless you also added them on their own, another kit you installed still has them, you edited them, or you linked them.
|
|
71
|
+
|
|
72
|
+
## Reporting a session that went wrong
|
|
73
|
+
|
|
74
|
+
Installing skills also installs `report-session-issue`. Tell your agent "report this conversation" and it asks what went wrong, lists the project's private words, and runs `a-kit report`. The command:
|
|
75
|
+
|
|
76
|
+
- reads the session from Claude Code's or Codex's own log;
|
|
77
|
+
- scrubs it on your machine: secrets, emails, IPs, your user and machine names, paths to the repo and home, and the words the agent mapped; long tool outputs are cut to 2,000 characters (`--full-outputs` keeps them);
|
|
78
|
+
- links the agent kit skills installed here, and whether the agent loaded each;
|
|
79
|
+
- writes the scrubbed transcript to a file to check (`--dry-run` stops there), then sends it to your organization's Reports.
|
|
80
|
+
|
|
81
|
+
## Auto-update
|
|
82
|
+
|
|
83
|
+
Installing skills for Claude Code also adds a `SessionStart` hook to `~/.claude/settings.json` that checks your global skills when a session starts or resumes. A background process, so the session doesn't wait for it, sends agent kit what your global lock has and gets back one fingerprint of it: the version each skill's channel installs, each kit's skills, each public skill's version. When the fingerprint isn't the one your last update left, it runs `a-kit update -g`; when it is, that one request is all. Sessions that start within the same minute check once. It skips the check when nothing is installed everywhere or you're not logged in. A project's skills aren't touched: they live in its repo, so they change only when you run `a-kit update` there.
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
a-kit auto-update # whether it's on
|
|
87
|
+
a-kit auto-update off # stop it and remove the hook
|
|
88
|
+
a-kit auto-update on # turn it back on
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Telemetry
|
|
92
|
+
|
|
93
|
+
Installing skills for Claude Code also adds a hook to `~/.claude/settings.json`, so each time Claude Code loads a skill installed from agent kit (on its own or because you typed `/<skill>`), it reports the skill, its version, the agent, this machine (a random id and its hostname) and when. Your organization sees it on the skills table and each skill's page. Nothing else is sent: not your prompts, not your code. Reports that can't be sent wait in `~/.config/agent-kit/` for the next one.
|
|
94
|
+
|
|
95
|
+
The repository (its `origin` remote) and the branch you're on go too, and with your sessions the issue a skill was started for, only from a repo of your organization:
|
|
96
|
+
|
|
97
|
+
- a repo with an `agent-kit.lock.json`, which installs skills from agent kit;
|
|
98
|
+
- or one of your organizations' projects' repositories, told only to that organization: another organization's skill loaded there doesn't say which repository it was.
|
|
99
|
+
|
|
100
|
+
From any other repo, neither is sent. The hook decides from a list of the projects' repositories kept in `~/.config/agent-kit/`, never waiting for the API: it's asked for again once a day, so a repository added to a project starts sending within a day, or right away after `a-kit update`.
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
a-kit telemetry # whether it's on
|
|
104
|
+
a-kit telemetry off # stop reporting and remove its hooks
|
|
105
|
+
a-kit telemetry on # turn it back on
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`DO_NOT_TRACK=1` or `AGENT_KIT_TELEMETRY=0` also stop it.
|
|
109
|
+
|
|
110
|
+
### Importing past sessions
|
|
111
|
+
|
|
112
|
+
Claude Code keeps a transcript of each session on your machine for about 30 days (`~/.claude/projects`, or under `CLAUDE_CONFIG_DIR`). `a-kit telemetry import` sends agent kit what live telemetry would have sent for each of them, so your organization sees the last month's work without waiting for new sessions: when each session started and ended, its repository and branches, the pull requests and issues its `gh` commands opened or changed, the issue a skill was started for, the skills from agent kit it loaded, and its tokens, cost and prompts by model, each at the time it happened.
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
a-kit telemetry import --dry-run # what it would send, sending nothing
|
|
116
|
+
a-kit telemetry import # send it
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The same rules as live telemetry apply: only a session in a repository of your organizations' is sent, and nothing of the others leaves the machine; a session whose folder is gone (a worktree removed since) is in the repository its own output names, when it names one only: the pull request and issue URLs its `gh` commands printed, the remote its `git push` printed, or the pull requests Claude Code tied it to; no prompt, response, command, file path or tool output is ever sent. A session keeps its id, so importing twice changes nothing, and a session live telemetry already sent is left as it is. A bot logged in with `a-kit login --token` imports its own sessions as itself. `a-kit telemetry show <session-id>` shows what was sent for an imported session, like a live one.
|
|
120
|
+
|
|
121
|
+
## Heartbeat
|
|
122
|
+
|
|
123
|
+
Logging in or installing skills also installs a timer (a systemd user timer on Linux, a launchd agent on macOS) that tells agent kit, every 5 minutes, this machine's hostname, system, the CLI's version, the agents on it and their versions (from each one's `--version`), and the skills installed everywhere (-g). Your organization's Machines page shows whether each machine is on, and flags the ones with an agent older than its newest release or skills behind their channel; admins see every member's machines, members only their own. Logging in, installing and updating send it right away too; on a system without a timer (Windows), Claude Code's `SessionStart` hook sends it instead. On Linux the timer stops while you're logged out unless you run `loginctl enable-linger`.
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
a-kit heartbeat # whether it's on, the timer's files and the last one sent
|
|
127
|
+
a-kit heartbeat off # stop reporting and remove the timer
|
|
128
|
+
a-kit heartbeat on # turn it back on
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
`DO_NOT_TRACK=1` or `AGENT_KIT_TELEMETRY=0` also stop it.
|
|
132
|
+
|
|
21
133
|
Needs Node.js 20.12 or newer.
|