loop-forge — Claude Code command: what it does, how to install
loop-forge converts a single-line routine task into a reusable slash command equipped with safety gates and evaluation checks.
MIT ★ 880 updated 2026-09-03
.claude/commands/loop-forge.mdWhat loop-forge does
loop-forge acts as an entry point for the loop-forge skill in the claude-forge repository. It reads a one-line task summary, classifies it into one of five loop shapes (Batch, Pipeline, Refine, Watch, or Explore), and interviews you for output targets and stop conditions.
The command injects hardstops, maker-versus-checker verification, and external-action gates before validating the setup with tools/check_safety.py. An exit code of 2 from the safety check blocks generation and sends you back to the interview stage until all requirements pass.
It does not schedule unattended jobs via launchd or cron, nor does it publish external actions directly. The command expects the supporting files under skills/loop-forge/ to be present.
What it helps with
- convert recurring manual operations into a permanent slash command
- enforce maker-checker role separation and safety gates in custom workflows
- bind automated loops to explicit hardstop limits and eval criteria
- preview loop execution during a dry run before stamping the command
Example prompts for the agent
- /loop-forge review changed files and fix formatting issues
- /loop-forge extract test failures from logs and summarize root causes
- /loop-forge
How to install loop-forge
Manually: put the files in place
.claude/commands/loop-forge.mdCall it with /loop-forge. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/loop-forge.mdCall it with /prompts:loop-forge. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/loop-forge.prompt.mdManually: put the files in place
.gemini/commands/loop-forge.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about loop-forge
How do I install loop-forge in Claude Code?
Add the command file to .claude/commands/loop-forge.md.
What loop shapes does loop-forge support?
It maps recurring tasks into five fixed archetypes: Batch, Pipeline, Refine, Watch, and Explore.
Does loop-forge run background jobs automatically?
No. Unattended execution via cron or launchd is an explicit non-goal; it only generates the command file.
Source text
loop-forge.md · MIT
--- description: Turn a one-line repetitive task into a reusable, self-guarding slash command (loop-forge) argument-hint: "[one-line description of the task you keep doing by hand]" --- # /loop-forge Hand the one-line situation in `$ARGUMENTS` to the **loop-forge** skill and run its 6-stage flow exactly as written in `skills/loop-forge/SKILL.md`: 1. **Entry** — read the situation from `$ARGUMENTS`. If empty, ask (in the user's language): "What task do you keep doing by hand? Describe it in one line." 2. **Diagnose** — classify it into one of the 5 loop shapes (Batch / Pipeline / Refine / Watch / Explore). Never invent a sixth. 3. **Interview** — ask the shape's slot questions in plain language; re-ask the output location, the hardstop inputs, and the eval criteria if left blank. 4. **Assemble + auto-inject safety + static check** — substitute the slots, inject the verifier (maker ≠ checker), the hardstop, and (for outbound actions) the external-action gate, then run `tools/check_safety.py`. The gate is **non-bypassable**: exit 2 bounces back to the interview. 5. **Dry-run preview** — show how it will run and get **explicit approval**. No approval, no stamping. 6. **Stamp** — render the reusable `/command` (and, optionally, the Portable Prompt) and tell the user how to run it. This command is a thin entry point. The authoritative procedure, the 5 archetype catalogs, the classifier, the interviewer, the assembler, the renderers, and the deterministic safety gate all live under `skills/loop-forge/`. Follow `SKILL.md` — do not re-implement the flow here. > Non-goals (preserved): loop-forge does **not** schedule unattended runs > (`launchd`/`cron`) and never publishes externally on its own. It stamps the reusable > command and stops there.
© sangrokjung · MIT · sangrokjung/claude-forge