Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add enricai/leerie/plugin install leerieWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/enricai/leerie/chain)<a href="https://agentmods.dev/commands/enricai/leerie/chain"><img src="https://agentmods.dev/badge/commands/enricai/leerie/chain.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.01614 |
| Opus 5 | $0.00016 | $0.00807 |
| Sonnet 5 | $0.00006 | $0.00323 |
| Haiku 4.5 | $0.00003 | $0.00161 |
Grade A, and why
chain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Manage Leerie Chains
The user wants to perform a chain operation:
$ARGUMENTS
A chain is N parallel ./leerie --runtime fly invocations per wave,
with synth-merge between waves to build the next wave's base branch.
The laptop is the sequencer; there is no Fly coordinator machine. Each
per-job worker takes the existing single-run path unchanged
(provision → seed-auth + seed-repo → orchestrator → decide_teardown
trap on laptop → fetch_branch → host_finalize → destroy_machine).
Wave N+1 starts only after every wave-N job has finalized on the laptop
(branch pushed to origin, PR opened). Between waves the laptop runs
chain.git_ops.synth_merge_branches to build the staging branch
leerie/stage/<chain-id>-wave-<N+1>. (DESIGN.md §19.)
GitHub credentials are touched only by the laptop, via the existing
host_finalize mechanism. Workers never see them.
The single-run verbs (status, kill, stop, resume, finalize,
attach) are ID-dispatched: a UUID positional argument operates on
the chain (iterates $LEERIE_STATE_HOST_DIR/runs/*/run.json filtered by
the chain_id field, dispatches the single-run verb per discovered
run); a Fly machine id operates on a single run (historical behavior).
UUID format: 8-4-4-4-12 hyphenated. The five deprecated dash-prefixed
chain aliases have been hard-removed (no shim) — use the bare verbs below.
Steps
Parse the first word of $ARGUMENTS to decide the subcommand:
submit — start a new chain
Required: at least one --wave flag. Each --wave value is a
comma-separated list of prompt-file paths; the launcher reads each file
and passes its contents as the run prompt to a background
./leerie --runtime fly invocation. Wave index is assigned by
--wave flag order (0, 1, 2, …).
bash "${CLAUDE_PLUGIN_ROOT}/leerie" chain \
--wave <path/to/a1.md,path/to/a2.md> \
--wave <path/to/b1.md>
The launcher mints a fresh chain_id (UUID), prints a submission
banner with the chain id and per-wave job counts, then enters the wave
loop. The wave loop runs in the foreground of the user's terminal; if
the user wants to detach, they can Ctrl-C (the trap propagates SIGTERM
to all in-flight wave children, each of which runs its own
decide_teardown to clean up its Fly machine).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 170 lines · 32 tokens per session scan A b66aff1e7dbe
chain is a command published in the GitHub repository enricai/leerie (10 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 1,614 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
commit
A command that examines staged Git changes and proposes a commit message using the Conventional Commits format, such as feat, fix, or docs. Git is a tool for tracking changes to code.
release-notes
Generate consistent, well-structured release notes from git history. Triggered on release tags following semver patterns (v..) to produce categorized changelog with breaking changes, features, fixes, and contributor attribution.
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
repo-audit
Audit a codebase (local or remote GitHub/GitLab) against architecture principles and requirements, surfacing drift, risk, and missing decisions.
handoff
Export a Waybill Bundle by default, or import one when requested.
pr
Handle the full workflow from current branch state to an open, CI-monitored pull request.