Installation
npx leashr init is the one-command install, from the npm package. The same installer also runs from a clone of the repository, and the skills come as five Claude Code plugins.
Command
npx leashr init| What | Status | Proof |
|---|---|---|
npx leashr init | Published | npm package leashr@0.1.0: --version and init --dry-run run from the registry. uninstall exists from 0.1.1 |
| Installer from a clone | Tested | skills/lsh-init/test/init.test.js (24) |
Claude Code plugins
The repository is a Claude Code marketplace named leashr with five plugins. Add it once, then install the plugins you need.
claude plugin marketplace add Leashr/leashr-skills
claude plugin install leashr-guard@leashr| Plugin | Skills | Command | Depends on |
|---|---|---|---|
leashr-guard | lsh-init, lsh-rules, lsh-cap, lsh-mission, lsh-audit, lsh-status, lsh-learn | claude plugin install leashr-guard@leashr | leashr-cost, installed with it |
leashr-cost | lsh-cost, lsh-quota, lsh-sync | claude plugin install leashr-cost@leashr | Nothing |
leashr-ship | lsh-prd, lsh-ship, lsh-prove, lsh-review, lsh-pr | claude plugin install leashr-ship@leashr | Nothing |
leashr-learn | lsh-context, lsh-advisor, lsh-agents, and the commands /lsh-handoff and /lsh-resume | claude plugin install leashr-learn@leashr | leashr-guard, installed with it, and so leashr-cost |
leashr | All eighteen skills and the two commands | claude plugin install leashr@leashr | Nothing |
Each skill is in exactly one of the four bundles; leashr holds all eighteen. Install leashr or the bundles, not both: the same skills would load twice. Skills are named /<plugin>:<skill>. No plugin installs a hook: the rules, cap and journal hooks are written into each project by lsh-init, so a project without .leashr/ is not governed and not blocked.
What works today
From the root of a clone of the Leashr repository, preview the changes first, then apply them to your project. --dry-run writes nothing and prints the diff.
node skills/lsh-init/scripts/init.js --target ../my-project --dry-run
node skills/lsh-init/scripts/init.js --target ../my-projectExpected output (real run on an empty folder):
Leashr init (project scope) -> ../my-project
write .leashr/rules.json (default rules)
write .leashr/bin/evaluate.js (runtime copy of lsh-rules/scripts/evaluate.js)
write .leashr/bin/cap.js (runtime copy of lsh-cap/scripts/cap.js)
...
write .claude/settings.json (added: PreToolUse (rules), PreToolUse (cap), UserPromptSubmit (cap), PostToolUseFailure (learn), SessionStart, statusLine)
write .leashr/.gitignore (runtime state (statusline cost, collector heartbeat) stays out of git)
mkdir .mission/
Spending cap: none set (Leashr does not pick an amount). Set one with:
node .leashr/bin/cap.js set --mission <usd> --day <usd>Then check the rules and restart the agent:
node skills/lsh-rules/scripts/rules.js test --rules ../my-project/.leashr/rules.json320/320 cases passed.
Audit: 320 event(s) for 320 decision(s), one per decision, decisions match.- Restart Claude Code in the project and accept the folder trust prompt: the statusline, which the cap needs, only runs in a trusted folder.
- Commit
.leashr/exceptstate/along with.claude/settings.json. Without the scripts, every clone refuses every tool call (a missing hook script blocks withonFailure: "block").
What init writes
| Event | Command | Options |
|---|---|---|
PreToolUse | evaluate.js | timeout: 5, onFailure: "block" |
PreToolUse | cap.js guard | timeout: 10, onFailure: "block" |
UserPromptSubmit | cap.js prompt | timeout: 10, onFailure: "block" |
PostToolUseFailure | learn.js record | timeout: 5 |
SessionStart | mission.js session-start | timeout: 5 |
statusLine | cap.js statusline | refreshInterval: 2 |
Each hook runs node on a copy in .leashr/bin/ through $CLAUDE_PROJECT_DIR, so the file holds no machine path. Init is idempotent (a second run changes nothing), merges without removing anything, and stops before writing if a path leaves the target. Exit codes: 0 done, 1 error (nothing written), 3 done with conflicts.
An existing statusline
An existing statusline is never replaced: it is reported as a conflict. To keep it, run init again with --chain-statusline; it is saved in .leashr/statusline-chain.json and run first.
node skills/lsh-init/scripts/init.js --target ../my-project --chain-statuslineUpdate an installed project
node skills/lsh-init/scripts/init.js --target ../my-project --update-runtime --dry-runOnly the files of .leashr/bin/ are replaced, and only when they are a version Leashr shipped. A file you changed is a conflict; --force replaces it and keeps a .user-backup copy. Your rules.json is never rewritten: the command lists the default rules that are missing or outdated and how to merge them.
Uninstall
npx leashr uninstall removes Leashr from the current project (--target <project> for another one, --dry-run to preview, --purge-audit for the journal). It exists from leashr 0.1.1; 0.1.0 has no uninstall command. The clone command is the same script.
npx leashr uninstall --dry-run
npx leashr uninstall
# from a clone of the repository
node skills/lsh-init/scripts/uninstall.js --target ../my-project --dry-runRemoves what init added to the project and nothing else: the five hooks (a hook of yours, even in the same group, stays), the cap statusline (the one you chained is restored), the unmodified .leashr/bin/ files, default rules.json. Your own rules, cap.json and the audit journal in .mission/events/ are kept; --purge-audit deletes the journal. A modified runtime file is a conflict and stays. A second run changes nothing. User-scope settings are not touched.
The plugins are removed with Claude Code, one by one. This removes the skills, not what init wrote in a project: run npx leashr uninstall for that. To go from leashr to the bundles, or the other way, uninstall first.
claude plugin uninstall leashr-guard@leashr
claude plugin uninstall leashr@leashrTelemetry for cost (user scope)
Claude Code ignores OpenTelemetry switches in project settings (observed on 2.1.310), so they go in your user settings. Always preview, it is your own configuration:
node skills/lsh-init/scripts/init.js --scope user --target ~/.claude --dry-runRequirements
- Node.js to run the scripts. Tested on 24.14.
- Claude Code. Tested on version 2.1.310 only.
- Codex, Cursor and Antigravity: init writes no hook configuration for them. See Limits by agent.
Join the waitlist to hear when the hosted dashboard opens.
Join the waitlist