graph

graph is a command for coding agents from MadaraUchiha-314/the-loop. It costs 0 tokens per session (4,435 once invoked), scanned A, original, MIT.

Commands for viewing and controlling the-loop's process graph, which represents the stages of a work item and the actions that happen when it enters or leaves a stage.

In plain words
What is it for?
Use it to show the graph, inspect hooks, check a work item's status, advance or complete it, run the graph, or deliberately skip or force a stage with a reason.
Why use it?
It makes the current stage and allowed transitions explicit instead of depending on labels or memory.

Command

Part of the the-loop plugin — 2 skills, 35 commands, 2 hooks shipped together

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.

agentmods
npx agentmods add commands/madarauchiha-314/the-loop/graph
Clone the repo
git clone --depth 1 https://github.com/MadaraUchiha-314/the-loop

Or install the-loop, the plugin that ships this one along with the rest of its 2 skills, 35 commands, 2 hooks.

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 graph

README.md
[![agentmods](https://agentmods.dev/badge/commands/madarauchiha-314/the-loop/graph.svg)](https://agentmods.dev/commands/madarauchiha-314/the-loop/graph)
Your own site
<a href="https://agentmods.dev/commands/madarauchiha-314/the-loop/graph"><img src="https://agentmods.dev/badge/commands/madarauchiha-314/the-loop/graph.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,435 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.04435
Opus 5 $0.00000 $0.02218
Sonnet 5 $0.00000 $0.00887
Haiku 4.5 $0.00000 $0.00443

Measured 3d ago against content hash 00ba345a6da6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

graph 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 3d 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.

docs/cli/commands/graph.md · 358 lines

How it starts

The opening of the file, as written. The whole thing — 358 lines — stays where its author put it; the contents beside it link to each section on GitHub.

graph

Inspect and drive the-loop's process graph — the PDLC as an executable graph of nodes with entry and exit hooks, rather than a set of labels somebody remembers to move.

the-loop graph [--repo .] show   [--format text|json]
the-loop graph [--repo .] hooks  [--format text|json]
the-loop graph [--repo .] status <work-item>
the-loop graph [--repo .] advance <work-item> [--ref REF]
the-loop graph [--repo .] complete <work-item> [--node NODE] [--actor WHO] [--ref REF] [--pr N] [--pr-repo OWNER/REPO]
the-loop graph [--repo .] run    <work-item> [--ref REF] [--max-nodes 20] [--dry-run]
the-loop graph [--repo .] skip   <work-item> --node TOKEN [--node TOKEN…] --reason TEXT [--actor WHO] [--ref REF]
the-loop graph [--repo .] force  <work-item> --to NODE --reason TEXT [--actor WHO] [--ref REF]

--repo (default .) precedes the action.

Resolving the work-item ref

Graph hooks post comments and set labels on the ticket, so they need a work-item ref: github:OWNER/REPO#N. Every verb that runs hooks takes --ref, and none of them requires it — the ref is resolved in three tiers (issue-194):

  1. --ref, when you pass one. It always wins, even against a repository that declares something else.
  2. Derived from ticketing.github in the repository's harness config plus the work-item id: issue-194 in a repo declaring octo/repo becomes github:octo/repo#194. This is what makes the-loop graph advance issue-194 work with no flags.
  3. The bare work-item id, when neither of the above applies — a project that is not GitHub-ticketed, or an id that is not issue-<n>. Nothing is guessed: an owner or repository name that is not a shape GitHub accepts derives nothing rather than pointing a comment at the wrong repository.

In case 3 the outbound calls fail, and they say so. Outbound hooks are best-effort by design — a GitHub outage must not wedge a work item at a node — but best-effort never means silent: a hook that could not do its job adds a warning line to the command's output and records a graph.hook_degraded event for anyone reading the-loop events instead of a terminal.

Read the full file on GitHub · 358 lines

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. 3d ago First seen · 358 lines · 0 tokens per session scan A 00ba345a6da6

Subscribe to this mod's changes

graph is a command published in the GitHub repository MadaraUchiha-314/the-loop (4 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,435 tokens. 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.