upgrade-the-loop

upgrade-the-loop is a command for Claude Code from MadaraUchiha-314/the-loop. It costs 37 tokens per session (3,621 once invoked), scanned A, original, MIT.

A project maintenance command that brings the project's the-loop files and data formats up to the installed plugin version.

In plain words
What is it for?
Use it to create missing managed files, migrate schemas, remove deprecated paths, and compare suggested updates for files you control.
Why use it?
It finds missing or outdated files after a plugin update without overwriting files owned by you. A preview mode lets you inspect changes first.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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 the-loop plugin — 2 skills, 16 commands, 2 hooks shipped together

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 MadaraUchiha-314/the-loop
Claude Code
/plugin install the-loop

Made for: Claude Code.

Or install the-loop, the plugin that ships this one along with the rest of its 2 skills, 16 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 upgrade-the-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/madarauchiha-314/the-loop/upgrade-the-loop.svg)](https://agentmods.dev/commands/madarauchiha-314/the-loop/upgrade-the-loop)
Your own site
<a href="https://agentmods.dev/commands/madarauchiha-314/the-loop/upgrade-the-loop"><img src="https://agentmods.dev/badge/commands/madarauchiha-314/the-loop/upgrade-the-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,621 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.1 $0.00037 $0.03621
Opus 5 $0.00018 $0.01810
Sonnet 5 $0.00007 $0.00724
Haiku 4.5 $0.00004 $0.00362

Measured 6d ago against content hash f20fa3122f03, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

upgrade-the-loop 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 6d 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.

commands/upgrade-the-loop.md · 215 lines

How it starts

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

the-loop: upgrade-the-loop

Updating the plugin from the marketplace does not guarantee that a project has all the files (or the latest schema) that the current version of the-loop needs. This command reconciles them.

Steps

  1. Read versions. Compare theLoopVersion in the project's .the-loop/manifest.yaml with the plugin's version (${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json; in Cursor, .cursor-plugin/plugin.json under the plugin's install directory — ${CLAUDE_PLUGIN_ROOT} below means that same plugin root).

  2. Reconcile files. Using ${CLAUDE_PLUGIN_ROOT}/.the-loop/manifest.yaml as the source of truth:

    • Create any missing managed files / directories.
    • Never clobber user-owned files (managed: false) — diff and suggest changes instead.
    • Templates and config schemas are internal to the-loop and are not materialized in the project; read them from ${CLAUDE_PLUGIN_ROOT}/skills/the-loop/templates/ (manifest.templatesDir) and ${CLAUDE_PLUGIN_ROOT}/.the-loop/*.schema.json (manifest.schemasDir) rather than creating a .the-loop/templates/ folder or a .the-loop/*.schema.json copy (issue-220).
  3. Clean up deprecated paths. For each entry under manifest.deprecated, if the path is present in the project, act on it — this is how projects initialized by older versions shed the duplicated, internal-only artifacts: .the-loop/templates/, superseded by the plugin's own skill templates (issue #36), and the three .the-loop/*.schema.json copies, superseded by the plugin's own schemas (issue #220 — up to 118 KB of the-loop's internals per repository). Read the entry's reason first: an entry whose reason describes a MIGRATION (e.g. .the-loop/config.yaml, renamed in issue-82) is never deleted here — it is handled by step 4's rename migration, which preserves the data; only remove a path whose reason marks it as safe-to-delete. If a user has clearly added their own files under a deprecated path, surface them in the report and confirm before deleting rather than removing silently.

    • Only the exact paths the manifest names. A candidate that resolves outside the project's .the-loop/ directory — a symlink, a .. segment, an absolute path — is refused and reported, never deleted. Removal is name-driven; it is never inferred from a pattern.
    • A schema copy that differs from the plugin's shipped schema is a signal. Diff it before removing and say so in the report — somebody may have been relying on a local edit, and this is their one chance to find out. If you cannot establish that a file is a the-loop schema copy, leave it and report it under needs-user.

Read the full file on GitHub · 215 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. 6d ago First seen · 215 lines · 37 tokens per session scan A f20fa3122f03

Subscribe to this mod's changes

upgrade-the-loop is a command published in the GitHub repository MadaraUchiha-314/the-loop (4 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 3,621 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.