trio-init

trio-init is a command for Claude Code from albiol2004/trio-agent-loop. It costs 25 tokens per session (784 once invoked), scanned A, original, MIT.

A project setup command for a Trio loop, a structured process for coordinating repeated agent work through a shared mailbox. It creates the mailbox directory and a goal file from the user’s description.

In plain words
What is it for?
Use it to start a new Trio loop, choose a different mailbox directory, or safely handle an existing loop that may still be running.
Why use it?
It gives an agent loop a defined goal and place to record or exchange state. It also detects an existing loop so a new session does not accidentally interfere with it.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to start a new Trio loop, choose a different mailbox directory, or safely handle an existing loop that may still be running.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/albiol2004/trio-agent-loop/trio-init
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/albiol2004/trio-agent-loop

Made for: Claude Code.

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 trio-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/albiol2004/trio-agent-loop/trio-init/github.svg)](https://agentmods.dev/commands/albiol2004/trio-agent-loop/trio-init)
Your own site
<a href="https://agentmods.dev/commands/albiol2004/trio-agent-loop/trio-init"><img src="https://agentmods.dev/badge/commands/albiol2004/trio-agent-loop/trio-init/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 trio-init

Your own site · 80×15
<a href="https://agentmods.dev/commands/albiol2004/trio-agent-loop/trio-init"><img src="https://agentmods.dev/badge/commands/albiol2004/trio-agent-loop/trio-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 784 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.00025 $0.00784
Opus 5.5 $0.00010 $0.00314
Sonnet 5.5 $0.00005 $0.00157
Haiku 4.5 $0.00003 $0.00078

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

Security

Grade A, and why

trio-init 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 1mo 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.

omp/commands/trio-init.md · 43 lines

What it actually says

Set up the trio-loop mailbox in the current project.

Mailbox directory: default loop/. If $ARGUMENTS starts with dir=<path> (e.g. /trio-init dir=loop-authz add rate limiting…), use that directory instead — every loop/ reference below then means that directory. One mailbox per loop is a hard rule: two loops (or two sessions) sharing a mailbox corrupt each other's state.

  1. If the mailbox's STATE.md already exists, show its current status and LOG.md tail, then ask the user to choose: (a) reset — archive the old mailbox to loop-archive-<date>/ and start fresh; (b) abort; or (c) keep it and initialize this new loop in a sibling directory (loop-<slug>/ from the new goal) — the right choice when the existing loop may still be running in another session. If STATE.md says status: running and LOG.md's last entry is recent, recommend (c) — never hijack a possibly-live mailbox.
  2. Create the mailbox directory with these files:

loop/GOAL.md — from $ARGUMENTS. If arguments are empty or vaguer than one sentence of substance, interview the user briefly (what does done look like, hard constraints, what must NOT change) before writing it. Decide the profile: software (default) or data — choose data when the goal is pipelines, ETL/ELT, SQL models, notebooks, finance/reporting datasets. Structure:

# Goal
profile: software | data
<the mission, in the user's words, sharpened>
## Definition of done
<objectively checkable statements>
## Constraints
<stack, style, things that must not break, budget notes>

For profile: data, the Definition of done MUST include data ground truth, so interview for it if missing: source(s) of truth to reconcile against, tolerated row-count/aggregate deltas, key uniqueness expectations, and whether re-runs must be idempotent. Vague data goals ("clean the dataset") are the #1 cause of runaway loops — pin numbers down.

loop/STATE.md (the mission: line is the first sentence of GOAL.md's mission, verbatim — the /trio orchestrator halts if it ever stops matching GOAL.md, which catches another session repurposing the mailbox):

schema: 1
iteration: 0
max_iterations: 10
status: ready
mission: <first sentence of the goal, verbatim>

## Approaches tried and rejected
(append-only; the Lead adds one line per dead end, with why)

## Key decisions and rationale
(append-only)

loop/LOG.md with a # Trio loop log header line, and empty loop/PLAN.md, loop/REPORT.md, loop/VERDICT.md.

  1. If the project is a git repo, ask the user whether loop/ should be gitignored (ephemeral) or committed (auditable history). Default suggestion: commit it.
  2. Confirm setup and print next steps: /trio for a single supervised iteration (recommended first), then /trio auto to run autonomously — if the mailbox is not loop/, say to pass it: /trio dir=<path> and /trio auto dir=<path>. Mention Esc stops the loop, and GOAL.md + max_iterations in STATE.md are the two human control knobs while it runs.
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. 1mo ago First seen · 43 lines · 25 tokens per session scan A dc28b2385c0b

Subscribe to this mod's changes

trio-init is a command published in the GitHub repository albiol2004/trio-agent-loop (2 stars, last pushed 12d ago), licensed MIT. It adds 25 tokens to every session and 784 once invoked, about $0.0001 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-08-31.

Related

Other commands, from other repositories

arrow-maintenance

Run an audit-and-update pass on the docs/arrows/ overlay. Dispatches on project state — audits an existing overlay, bootstraps the overlay from existing LID docs, or redirects to /map-codebase or /linked-intent-dev for projects without LID.

jszmajda/lid · 59 tokens

differential-audit

Audit EARS↔code coherence via a bidirectional differential. With no arguments, opens a scoping conversation that interprets what the user wants audited, maps it to arrows, and captures an explicit EARS selection. With one or more EARS IDs, audits those specs directly using configured defaults. Requires docs/arrows/…

jszmajda/lid · 77 tokens

map-codebase

Bootstrap LID in an existing (brownfield) codebase. Reads every file in scope, proposes lens-based clusterings, walks the user through reconciliation, generates skeleton LLDs/HLD/EARS and the arrow overlay, then prompts the user to flesh out the skeletons. Token-intensive by design.

jszmajda/lid · 65 tokens

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.

echoVic/blade-code · 8 tokens

crear-skill

Crear, probar y mejorar skills de forma iterativa. Usa cuando el usuario dice "crear skill", "crear habilidad", "build skill", "create a skill", "skill development", "desarrollar skill", "nueva habilidad". Usa el workflow: draft → test → review → improve → repeat con evaluación cuantitativa y qualitative review.

doncheli/don-cheli-sdd · 70 tokens

claude-request

Send a prompt to Claude Code via the LLM gateway with session tracking.

verivus-oss/llm-cli-gateway · 14 tokens