init

A command that initializes the-loop in a repository by creating its documentation folders and validated configuration. A monorepo is a repository containing multiple related packages or projects.

In plain words
What is it for?
Starting the-loop in a project, scaffolding specifications and related documentation, and guiding configuration setup.
Why use it?
It sets up the project without overwriting files you own, can be run again safely, and detects configuration drift.

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/init
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.

Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,750 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.00062 $0.02750
Opus 5 $0.00031 $0.01375
Sonnet 5 $0.00012 $0.00550
Haiku 4.5 $0.00006 $0.00275

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

Security

Grade A, and why

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

commands/init.md · 169 lines

How it starts

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

the-loop: init

Initialize "the-loop" into the current project repository. Idempotent and safe to re-run: it is driven entirely by the manifest, creates only what is missing, and never overwrites user-owned files.

The authoritative source of what to create — and which files are managed vs. user-owned — is ${CLAUDE_PLUGIN_ROOT}/.the-loop/manifest.yaml (each entry's managed: true|false). Two kinds of file are internal to the-loop and are never copied into the project — they ship with the plugin and are read from there:

  • Templates${CLAUDE_PLUGIN_ROOT}/skills/the-loop/templates/ (manifest.templatesDir), read when a file needs scaffolding.
  • Config schemas${CLAUDE_PLUGIN_ROOT}/.the-loop/*.schema.json (manifest.schemasDir), read when a config needs validating or onboarding. They are the plugin's contract, not the operator's data, and a copy in the project only goes stale (issue-220). Each scaffolded config instead opens with a # yaml-language-server: $schema=<published url> line, so the operator's editor validates it with nothing local on disk.

(${CLAUDE_PLUGIN_ROOT} is the installed plugin's root directory; in Cursor, resolve it to the plugin's install directory.)

Modes

  • --dry-run — compute and print the report (below) without writing anything and without interacting. Use it to preview an init or an upgrade safely.
  • --defaults — non-interactive: skip the guided onboarding (step 2), apply sensible defaults everywhere (existing answer → detected signal → schema default), and list every gap that genuinely needs the user under needs-user in the final report.

Steps

  1. Detect the project. Inspect the repo to infer sensible defaults — never stamp the plugin's hardcoded tooling defaults onto an existing project unread:
    • languages present (python / js / ts / go) — from file extensions and manifests (package.json, pyproject.toml/setup.cfg/requirements.txt, go.mod).
    • whether it looks like a monorepo (nx.json, pnpm-workspace.yaml, workspaces) and which tool — default Nx; support non-monorepo (monorepo: false).
    • existing package manager / test runner / linter / type-checker per language, by reading lock files, manifest fields, and dependency lists, per the exact signal table in the the-loop skill's reference/tooling.md → "Tooling detection" (e.g. package-lock.json→npm, yarn.lock→yarn, bun.lockb→bun, pnpm-lock.yaml→pnpm; devDependencies for jest/vitest/mocha, eslint/oxlint/biome, etc.; the Python and Go equivalents).
    • cross-check inferred tooling against .github/workflows/ (or other CI config) — the commands CI actually runs are a strong signal.
    • the git remote / owner / repo for ticketing.
    • candidate custom instruction docs for customInstructions.docs — existing convention files the team already maintains (CONTRIBUTING.md, style/convention guides under docs/). Propose them in the onboarding (never auto-register); the user confirms, adjusts, or adds paths — including absolute per-machine paths detection can never see (see the skill's reference/instructions.md). Where detection is unambiguous, write the detected tool into tooling.<concern>.<lang>. Where it's ambiguous or no signal exists, fall back to the plugin default but mark that line with a trailing # TODO: verify — no signal found, defaulted comment, and surface it in the guided onboarding (step 2) — or, when running non-interactively, in the needs-user section of the final report (step 8) — so the user confirms it before the agent invokes it.

Read the full file on GitHub · 169 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 · 169 lines · 62 tokens per session scan A 201031d85f42

Subscribe to this mod's changes

init is a command published in the GitHub repository MadaraUchiha-314/the-loop (4 stars, last pushed 6d ago), licensed MIT. It adds 62 tokens to every session and 2,750 once invoked, about $0.0003 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.