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 aiocean/claude-plugins/plugin install aio-longrunWrote 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/skills/aiocean/claude-plugins/aio-longrun)<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-longrun"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-longrun/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-longrun"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-longrun.svg" alt="Reviewed on agentmods" width="80" 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.00221 | $0.04862 |
| Opus 5.5 | $0.00088 | $0.01945 |
| Sonnet 5.5 | $0.00044 | $0.00972 |
| Haiku 4.5 | $0.00022 | $0.00486 |
Grade A, and why
aio-longrun 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 8d 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 — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.
aio-longrun
A run carries one large task to a result the human can check, across many fresh sessions. Each tick is one
session's turn at it: due, claim, load, plan one step, do it, judge it, record, decide, push and release. The
record .longrun/<run-id>/ in the main checkout holds what the next tick needs. The script longrun.ts owns
every rule: when a tick is due, the lease, the liveness counters and the finish states. A tick decides only the
work. Files, fields and limits: references/record.md.
The arguments pick the mode: start <task>, tick <record> or status [<record>].
Commands
<R> is the record's absolute real path, the one init printed as record:. Every command after init is
bun <R>/.bin/longrun.ts <command> <R> …, typed with the path written out. A tick's permissions allow each command
by that exact prefix, so a shell variable, a cd or a pipe from another program is denied. Multi-line input goes in
a heredoc. Run each command on its own, with nothing chained after it: ; echo $? is denied too, and the tool
result already shows a non-zero exit.
Exit codes are 0 ok, 2 refused, 10 sleep, busy or nudge, 11 backoff, and 12 finished or stalled. A refusal
prints why: fix the cause, never retry it unchanged. bun <R>/.bin/longrun.ts <command> <R> --help prints a
command's usage.
Start a run (start <task>, the human present)
- Restate the task as one sentence: the result the human wants. It becomes the contract's
goal. - Draft the contract with the human from the template in
references/record.md:- every criterion has a
check(a command or an observation on the real surface) and apasscondition, and "looks good" is refused; - at least one criterion is the result the user sees (
userVisible: true), not a proxy such as "tests pass"; effectsfollows the ladder below;allowedToolslists every tool and command the ticks, their workers and the checks need, because anything else is denied headless. The tick adds its record, git and PR commands itself (references/record.md);deniedlists pushes tobase, force pushes, merges and the project's deploy commands;waker,cadenceMinutes(default 30),deadline(default 7 days) andnotify;limits.tickBudgetUsd, when the human wants a cap per tick.
- every criterion has a
- Show the criteria and the effects, then ask for approval with
AskUserQuestion. This is the one gate. Once approved, setapprovedAtto now and savecontract.md: prose for people, plus the one fencedjsonblock. - Init. This is the one command run from the plugin:
bun ${CLAUDE_PLUGIN_ROOT}/skills/aio-longrun/scripts/longrun.ts init <yyyy-mm-dd>-<slug> --contract <contract.md> --repo <main checkout>- Add
--plugin-dir ${CLAUDE_PLUGIN_ROOT}when this plugin is a development checkout rather than an installed plugin, so ticks load the same copy. - Init copies the scripts into
<R>/.bin/, and every later command runs from there.
- Add
- Preflight, while the human is still here to fix what fails:
env -i HOME="$HOME" /bin/bash <R>/.bin/longrun-wake.sh <R> --dry-run- It runs in a bare environment like launchd's, and starts one cheap
claude -pwith the tick's own permissions. - Each line is
ok <check>orFAIL <check>: <why>. - Fix every FAIL, for example a binary missing from the PATH in
<R>/.bin/env.sh,gh auth login, or push access. Run it again until it exits 0.
- It runs in a bare environment like launchd's, and starts one cheap
- Claim tick 1 before arming: arming fires one wake at once, and that wake must find the run busy. Take the holder
from the unix time (
date +%s), once:bun <R>/.bin/longrun.ts claim <R> --holder tick-<unix time> - Arm the waker. For launchd:
bun <R>/.bin/longrun.ts arm <R>. For every other waker, seereferences/wakers.md. - Tell the human:
- the cadence: at most 1440 /
cadenceMinuteswakes a day, and a waiting run starts no session; - the cost: each launched tick's cost is the
costUsdof itswakeevent inbun <R>/.bin/longrun.ts status <R> --journal 30, andlimits.tickBudgetUsdcaps it; - how to steer: a line in
<R>/inbox.mdreaches the next tick, and a linestopends the run; - rung-3 actions wait until they run
bun <R>/.bin/longrun.ts approve <R> <wait-id>in their own terminal.
- the cadence: at most 1440 /
- Work tick 1 now, in
<R>/worktree, with the tick procedure from step 3 (Load) on, using the holder from step 6.
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago First seen · 253 lines · 221 tokens per session scan A c2e2b925f39d
aio-longrun is a skill published in the GitHub repository aiocean/claude-plugins (4 stars, last pushed 4d ago), licensed MIT. It adds 221 tokens to every session and 4,862 once invoked, about $0.0009 per session on Opus 5.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-11-22.
aio-longrun compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| aio-longrunaiocean/claude-plugins | Skill | 4 | 4d ago | MIT | A | 221 | Claude Code |
| eval-hooksFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.5k | yesterday | CC-BY-SA-4.0 | A | 115 | Claude Code |
| design-patternsFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.5k | yesterday | CC-BY-SA-4.0 | A | 59 | Claude Code |
| eval-skillsFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.5k | yesterday | CC-BY-SA-4.0 | A | 60 | Claude Code |
| smart-exploreFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.5k | yesterday | CC-BY-SA-4.0 | A | 75 | Claude Code |
| source-command-audit-whitepapersFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.5k | yesterday | CC-BY-SA-4.0 | A | 26 | Claude Code, Codex |
| audit-agents-skillsFlorianBruniaux/claude-code-ultimate-guide | Skill | 7.5k | yesterday | CC-BY-SA-4.0 | A | 41 | Claude Code |