aio-longrun

aio-longrun is a skill for Claude Code from aiocean/claude-plugins. It costs 221 tokens per session (4,862 once invoked), scanned A, original, MIT.

A long-running task system that carries one large coding job across many separate sessions. It saves the task state in the project so a later session can continue and check progress.

In plain words
What is it for?
Use it for large changes that need repeated work and checks over time, with scheduled wake-ups from tools such as cron or launchd. It can start a task, perform one bounded step, or report its status.
Why use it?
It prevents a multi-day task from losing its plan, decisions, and verification results when a session ends. A human approves the success criteria and allowed actions before work starts.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the aio-longrun plugin — 1 skill, 1 agent shipped together

Good fit Use it for large changes that need repeated work and checks over time, with scheduled wake-ups from tools such as cron or launchd. It can start a task, perform one bounded step, or report its status.

Compare 6 skills from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add aiocean/claude-plugins
Claude Code
/plugin install aio-longrun

Made for: Claude Code.

Or install aio-longrun, the plugin that ships this one along with the rest of its 1 skill, 1 agent.

Wrote 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.

agentmods badge for aio-longrun

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-longrun/github.svg)](https://agentmods.dev/skills/aiocean/claude-plugins/aio-longrun)
Your own site
<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.

agentmods 80×15 button for aio-longrun

Your own site · 80×15
<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>
Per session 221 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,862 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash c2e2b925f39d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/checks.ts, scripts/core.ts, scripts/git.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/aio-longrun/skills/aio-longrun/SKILL.md · 253 lines

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)

  1. Restate the task as one sentence: the result the human wants. It becomes the contract's goal.
  2. 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 a pass condition, and "looks good" is refused;
    • at least one criterion is the result the user sees (userVisible: true), not a proxy such as "tests pass";
    • effects follows the ladder below;
    • allowedTools lists 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);
    • denied lists pushes to base, force pushes, merges and the project's deploy commands;
    • waker, cadenceMinutes (default 30), deadline (default 7 days) and notify;
    • limits.tickBudgetUsd, when the human wants a cap per tick.
  3. Show the criteria and the effects, then ask for approval with AskUserQuestion. This is the one gate. Once approved, set approvedAt to now and save contract.md: prose for people, plus the one fenced json block.
  4. 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.
  5. 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 -p with the tick's own permissions.
    • Each line is ok <check> or FAIL <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.
  6. 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>
  7. Arm the waker. For launchd: bun <R>/.bin/longrun.ts arm <R>. For every other waker, see references/wakers.md.
  8. Tell the human:
    • the cadence: at most 1440 / cadenceMinutes wakes a day, and a waiting run starts no session;
    • the cost: each launched tick's cost is the costUsd of its wake event in bun <R>/.bin/longrun.ts status <R> --journal 30, and limits.tickBudgetUsd caps it;
    • how to steer: a line in <R>/inbox.md reaches the next tick, and a line stop ends the run;
    • rung-3 actions wait until they run bun <R>/.bin/longrun.ts approve <R> <wait-id> in their own terminal.
  9. Work tick 1 now, in <R>/worktree, with the tick procedure from step 3 (Load) on, using the holder from step 6.

Read the full file on GitHub · 253 lines

Files

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.

Changes

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.

  1. 8d ago First seen · 253 lines · 221 tokens per session scan A c2e2b925f39d

Subscribe to this mod's changes

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.

Related

aio-longrun compared with skills from other repositories

aio-longrun next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aio-longrunaiocean/claude-pluginsSkill44d agoMITA221Claude Code
eval-hooksFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A115Claude Code
design-patternsFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A59Claude Code
eval-skillsFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A60Claude Code
smart-exploreFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A75Claude Code
source-command-audit-whitepapersFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A26Claude Code, Codex
audit-agents-skillsFlorianBruniaux/claude-code-ultimate-guideSkill7.5kyesterdayCC-BY-SA-4.0A41Claude Code