Skip to main content
command CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/loop-forge.md
Open on GitHub

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

Call it with /loop-forge. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set44

The whole set →
testing testing enforces a strict TDD workflow in Claude Code with an 80% coverage floor, Playwright E2E suites, and three test tiers. CX Codex +1 ★ 880repo stars refactor-clean The refactor-clean command finds unused code, proposes cautious deletions, and checks the test suite around every change. CX Codex +1 ★ 880repo stars date-calculation date-calculation stops the assistant from calculating dates mentally by enforcing system tools like date and python3. Helps avoid arithmetic mistakes on leap years and intervals. CX Codex +1 ★ 880repo stars korean-character-count korean-character-count counts graphemes, lines, and UTF-8 bytes in Korean text by grapheme cluster rules, for self-intro forms with strict limits. CX Codex +1 ★ 880repo stars korean-spell-check korean-spell-check — a Claude Code skill that checks Korean spelling and returns edits instead of a rewritten draft. Long input gets split into chunks before it goes out. CX Codex +1 ★ 880repo stars instinct-status Review learned instincts with their confidence levels, domains, and sources. Use the command to inspect what the agent has picked up from its observations. CX Codex +1 ★ 880repo stars doc-updater doc-updater rebuilds README, guides and codemaps from the actual source after code changes. Useful once the docs have drifted away from the code. CX Codex ★ 880repo stars instinct-export instinct-export exports continuous-learning instincts into a shareable file for team members or migration across machines. CX Codex +1 ★ 880repo stars

Project sponsors

Companies that keep this analytics open