loop-forge

loop-forge is a skill for Claude Code from sangrokjung/claude-forge. It costs 262 tokens per session (3,649 once invoked), scanned A, original, MIT.

A tool that turns a short description of a repetitive task into a reusable slash command for an AI coding agent. It asks for missing details and adds a separate checker plus a stop condition to the command.

In plain words
What is it for?
Creating reusable commands for batch jobs, pipelines, refinement tasks, monitoring, and exploratory work.
Why use it?
It removes the need to design repeatable agent workflows from scratch and helps prevent an automated loop from continuing after something goes wrong.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; names the AskUserQuestion tool; mentions Claude Code.

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claude-forge plugin — 33 skills, 39 commands, 17 agents 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 skills/sangrokjung/claude-forge/loop-forge
Any agent
npx skills add sangrokjung/claude-forge --skill loop-forge
Clone the repo
git clone --depth 1 https://github.com/sangrokjung/claude-forge

Made for: Claude Code.

Or install claude-forge, the plugin that ships this one along with the rest of its 33 skills, 39 commands, 17 agents.

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 loop-forge

README.md
[![agentmods](https://agentmods.dev/badge/skills/sangrokjung/claude-forge/loop-forge.svg)](https://agentmods.dev/skills/sangrokjung/claude-forge/loop-forge)
Your own site
<a href="https://agentmods.dev/skills/sangrokjung/claude-forge/loop-forge"><img src="https://agentmods.dev/badge/skills/sangrokjung/claude-forge/loop-forge.svg" alt="Measured on agentmods" height="20"></a>
Per session 262 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,649 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.00262 $0.03649
Opus 5 $0.00131 $0.01825
Sonnet 5 $0.00052 $0.00730
Haiku 4.5 $0.00026 $0.00365

Measured 2d ago against content hash 04b15d7986c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

loop-forge 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 2d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (tools/check_safety.py, tools/classify_signals.py, tools/smoke_e2e.sh, …), 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.

skills/loop-forge/SKILL.md · 252 lines

How it starts

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

loop-forge — stamp a guarded, reusable loop (/loop-forge)

Picture an engraving shop. A customer who can't engrave walks in and just describes the seal they keep needing — "I want to do this over and over." The artisan ① recognizes which of 5 standard molds (loop shapes) it is, ② asks what letters to cut (the blanks), ③ cuts them into a proven mold, ④ automatically fits a "misprint detector" (the verifier) and an "out-of-ink stop" (the hardstop), ⑤ pulls one test impression to show the customer, and ⑥ once they approve, hands back a reusable /command they can stamp again any time — the same in Claude Code and in any other agent via a paste-able prompt.

What this tool actually does

Someone who doesn't code can't author a reusable /command that makes an AI repeat a task reliably. loop-forge closes that gap. It takes a vague one-liner and stamps it into a reusable slash command, while automatically attaching the two safety devices a non-developer doesn't even know to ask for:

  • Verifier (maker ≠ checker) — the loop's output is re-checked in a pass that is separate from the pass that produced it, so the loop can't grade its own homework.
  • Hardstop — a budget/count/cooldown ceiling, so a loop can't quietly break while burning tokens.

That auto-injection is the decisive difference from a plain prompt generator or a developer-facing skill builder.

Before → after (the elevator demo):

User: "I want to summarize 100 shop reviews into 3 lines each"
        │
loop-forge:
  1. Diagnoses → Batch loop
  2. Interviews → where are the items? per-item task? where does output land? a cap?
  3. Auto-injects → verifier (count in == count out + independent spot re-check)
                  + hardstop (max_items budget + per-item fail cap + abort at 20% failure)
  4. Previews → "here's how it will run" (+ optional 1-item sample)
  5. Stamps → /review-summary  (reusable forever; safety baked in)

When it triggers

  • /loop or /loop "<one-line situation>" (full command /loop-forge; alias /make-it-loop)
  • "automate this" / "make this repeatable" / "turn this into a command"
  • "summarize all 100 reviews" / "do this for every item"
  • "do X every time an email arrives" / "alert me when a condition is met"
  • "generate a few options and pick the best one"
  • any time you'd rather capture a recurring task as a reusable /command than re-type the prompt by hand

Read the full file on GitHub · 252 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. 2d ago First seen · 252 lines · 262 tokens per session scan A 04b15d7986c0

Subscribe to this mod's changes

loop-forge is a skill published in the GitHub repository sangrokjung/claude-forge (825 stars, last pushed 2d ago), licensed MIT. It adds 262 tokens to every session and 3,649 once invoked, about $0.0013 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-09-03.