Custom loop.md — Project-Level Default for Bare /loop

A team-config pattern: a loop.md file in the project root overrides the built-in maintenance prompt, so any teammate running bare /loop gets your project's canonical loop — run lint, typecheck, and tests, fix anything red, stop when clean.

prompt
→ Claude
Put a `loop.md` in the project root to replace the built-in maintenance prompt when a user runs bare `/loop` — e.g., "run lint + typecheck + tests; fix anything red; update CHANGELOG; stop when clean." Every teammate's bare `/loop` now runs your loop.
claude-code

Implementation note

When to use: your team runs bare /loop often enough that the built-in default maintenance prompt is a missed opportunity — you want every teammate's reflexive /loop to run your project's canonical checklist instead. How it works: place a loop.md file in the project root; it replaces the built-in maintenance prompt whenever someone runs bare /loop. A typical loop.md: run lint, typecheck, and tests; fix anything red; update the CHANGELOG; stop when clean. Because the file is versioned with the repo, the team's default loop evolves through normal code review. Safety: this is configuration, not a runnable loop itself — the safety of bare /loop becomes whatever your loop.md says, so write an explicit stop condition (stop when clean) and keep the scope conservative, since people will invoke it casually. Note the documented limit: loop.md maxes out at 25KB per Anthropic's docs. Review changes to it like code, because it is code.

Source: claudefa.st

More automation loops

Run workflows with dynamic sub-agents

/goalnew

Split a task into packets, run sub-agents in parallel, synthesize results, and verify completion.

prompt
→ Claude
/goal loop and verify until complete
automationlow risk

Run agent turns until goal met

/goalnew

Agent executes repeated turns toward a condition, with a lightweight evaluator checking progress after each turn until the goal is reached.

prompt
→ Claude
/goal <condition turns a prompt into a durable objective. Thanos immediately starts a turn toward the condition, and after each turn a fresh, tool-less side-channel evaluator (a one-shot completeSimple call, not a subagent — so no extra agent turn and no re-entrancy) reads the last turn's evidence and returns MET / NOT MET . NOT MET auto-continues another turn with the reason as guidance; MET clears the goal and records the achievement. Unparseable evaluator output is treated as NOT MET (fail-safe: it never declares a false "done
automationmedium risk

Run agent until goal met

/goalnew

Queue agent turns with goal context until your objective is achieved, treating the goal as untrusted data.

prompt
→ Claude
/goal <objective , after /goal resume , and after every agent turn that leaves the goal active , the extension queues Codex's goal continuation prompt as hidden model-visible context. The objective is XML-escaped and wrapped as untrusted user data so it does not become higher-priority instructions
automationlow risk