@impulselab/directory
v2.7.15
Published
Sync versioned skills, commands and agent configs across Claude Code, Cursor and Codex
Readme
@impulselab/directory
Sync versioned skills, commands and agent configs across Claude Code, Cursor and Codex.
Quick Start
npx @impulselab/directory login
npx @impulselab/directory synclogin (no flags) starts a browser-based device authorization flow: it prints
a short code and a verification URL, opens your browser, and waits while you
approve the request on impulse.directory. Once approved it provisions and
stores an API key automatically — no copy-paste.
login also installs npx @impulselab/directory instructions into enabled
local agents so Claude, Codex and Cursor know how to run sync, status and
import/push when you ask them to publish skills or send local changes to
production.
Reinstall those instructions at any time with:
npx @impulselab/directory agents installFor headless or CI environments, pass an API key created in your profile settings directly:
npx @impulselab/directory login --key <api-key>Either way, the key is stored in ~/.impulse/config.json with file mode 600.
Import / Publish Flow
First-publish any local artifact (skill, command, agent, or rule):
npx @impulselab/directory stacks create "My stack" --json
npx @impulselab/directory publish ~/.claude/commands/gt-pr.md --stack <stack-id-or-slug>
npx @impulselab/directory publish ~/.claude/skills/my-skill --stack <stack-id-or-slug>import remains as an alias of publish. Pass either a skill directory / SKILL.md, or a single command/agent/rule file. Symlinked SKILL.md files are followed; the lock keeps the path you published.
--stack works for every kind. Without a stack the artifact is created in your library but will not sync to other machines until you attach it (stacks add or publish/push --stack).
For agents, CI, and scripts, add --json. The command never prompts.
Push Flow
Edit a synced file locally, then publish a new version:
npx @impulselab/directory push ~/.claude/commands/example.md -m "Tighten instructions"
npx @impulselab/directory syncIf the remote version changed first, push keeps your file and asks you to sync before trying again.
Commands
| Command | Description |
| --- | --- |
| npx @impulselab/directory login [--key <key>] [--url <baseUrl>] | Browser device-flow login; --key is the headless/CI fallback |
| npx @impulselab/directory logout | Remove the saved API key |
| npx @impulselab/directory whoami | Show the authenticated user |
| npx @impulselab/directory publish <path> [--kind] [--title] [--stack <id\|slug>] [-m] [--project] [--json] | First-publish a skill/command/agent/rule and track its source |
| npx @impulselab/directory import <path> … | Alias for publish |
| npx @impulselab/directory stacks create\|list\|get\|update\|delete\|add\|remove | Manage stacks |
| npx @impulselab/directory sync [--project] [--prune] [--force] [--dry-run] [--json] | Install or update synced artifacts |
| npx @impulselab/directory status [--project] [--json] | Show synced, modified, outdated, missing, and published (unstacked) files |
| npx @impulselab/directory push <path> [-m <changelog>] [--stack <id\|slug>] | Publish a local edit as a new artifact version |
| npx @impulselab/directory add <owner/slug> [--target <target>] | Public install without lock tracking; interactive picker in a TTY |
| npx @impulselab/directory add stack <id> [--target <target>] | One-shot public stack install |
| npx @impulselab/directory agents | List enabled agents |
| npx @impulselab/directory agents install | Install npx @impulselab/directory instructions into enabled local agents |
| npx @impulselab/directory agents enable\|disable <claude\|codex\|cursor> | Update agent targets |
Installing an artifact
The web UI shows a single command per artifact:
npx @impulselab/directory <owner>/<slug>Run it in a terminal and the CLI asks where to install — a multi-select of the destinations that make sense for that artifact's kind (Claude Code global/project, Cursor project, Codex global, …). Pick one or more; the file is written to each.
For scripting and CI, pass --target to skip the prompt and install to a fixed
destination (backwards compatible one-shot behaviour):
npx @impulselab/directory <owner>/<slug> --target claude-slashThe picker is skipped automatically when stdin/stdout is not a TTY, when --target
is set, or when CI is set. Legacy
npx @impulselab/directory user/slug --target claude-slash still works and is
treated as npx @impulselab/directory add user/slug.
Note:
npx @impulselab/directory add stack <id>installs are non-interactive and use each artifact's per-target default for now.
Target Mapping
| Kind | Canonical install | Agent visibility |
| --- | --- | --- |
| skill | ~/.agents/skills/<slug>/ (global) or .agents/skills/<slug>/ (project) | Symlinked into each enabled agent's skills dir (skills.sh paths: ~/.claude/skills, ~/.codex/skills, ~/.cursor/skills, …) |
| command | Claude: ~/.claude/commands/<slug>.md / .claude/commands/…; Cursor project: .cursor/commands/… | Native only (not Codex prompts) |
| agent | ~/.claude/agents/<slug>.md / .claude/agents/… | Claude Code |
| rule | .cursor/rules/<slug>.mdc | Cursor (project) |
Global sync covers Claude Code and Claude Cowork because both read ~/.claude. Skills follow the skills.sh model: one canonical copy under .agents/skills, then relative symlinks into each enabled agent directory. Cursor project artifacts also use .cursor/commands / .cursor/rules — run npx @impulselab/directory sync --project from inside the project.
