/loop-engineer
Domain-agnostic autonomous loop for any goal — coding, research, content, data, automation, or any objective. Asks 3 questions, then orchestrates a self-assembling agent team (resource-scout, researcher, planner, agent-factory, executor, verifier, auditor, memory-keeper) that
$ npx -y skills add vibhasdutta/loop-engineer --skill loop-engineer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/loop-engineer
Context preview
The summary Claude sees to decide when to auto-load this skill.
Domain-agnostic autonomous loop for any goal — coding, research, content, data, automation, or any objective. Asks 3 questions, then orchestrates a self-assembling agent team (resource-scout, researcher, planner, agent-factory, executor, verifier, auditor, memory-keeper) that
SKILL.md
loop-engineer.SKILL.mdname: loop-engineer
description: >
Domain-agnostic autonomous loop for any goal — coding, research, content, data,
automation, or any objective. Asks 3 questions, then orchestrates a self-assembling
agent team (resource-scout, researcher, planner, agent-factory, executor,
verifier, auditor, memory-keeper) that researches, discovers resources, builds
specialized agents for the goal, executes, and iterates until done. Modes:
build (from scratch), research (investigate only), patch (fix/extend existing
code), audit (review only, no changes). Supports persistent memory, git
integration, and generates a completion report.
disable-model-invocation: true
allowed-tools:
- Bash
- Read
- Write
- Edit
- Agent
- Glob
- Grep
- TodoWrite
Loop Engineer
You are running a loop engineering wizard. Follow these phases in order.
**On permission prompts:** `allowed-tools` above pre-approves Bash/Read/Write/Edit/Agent/Glob/Grep/TodoWrite for the top-level orchestrator while this skill is active — you should not be interrupted for those. Spawned subagents (via the `Agent` tool) run under the same session's permission settings, not a separate grant, so if a subagent still gets interrupted, it's the session's own `.claude/settings.json` (or global settings) that needs an allow rule, not this skill. `disable-model-invocation: true` means this only runs when explicitly invoked with `/loop-engineer` — it will never trigger itself based on conversation content.
---
> **To update loop-engineer:** `claude plugin update https://github.com/vibhasdutta/loop-engineer` (plugin install) or re-run `install.sh --update` / `install.ps1 -Update` (manual install). Updates are never applied automatically mid-loop.
---
Phase 1 — Core Wizard
Ask **one at a time**. Wait for the full answer.
**Q1 — Mode:** If the skill was invoked with an argument matching `build`, `research`, `patch`, or `audit` (e.g. `/loop-engineer patch`), use it as MODE and skip this question. Otherwise ask: > "Mode? build (new from scratch) / research (investigate and report, no code changes) / patch (fix or add a feature using the existing codebase) / audit (review existing code/output only, no changes)"
Store `MODE`. Default to `build` if the answer is unclear. See "Mode gating" under Phase 5 for how each mode changes the loop.
**Q2 — Goal:** > "What do you want the loop to accomplish? (1-2 sentences)"
After storing GOAL, generate LOOP_ID:
- lowercase, replace non-alphanumeric runs with hyphens
- Take first 4 meaningful words (skip: a, an, the, to, for, of, in, on, with, and, or)
- Max 24 chars, strip trailing hyphen
- Example: "Add authentication flow to the REST API" → "add-auth-flow-api"
Auto-set: `STOP_CONDITION` = "all tasks in loop-stack/<LOOP_ID>/PLAN.md checked", `BUDGET_STRING` = "20 turns", `MAX_TURNS` = 20.
**Q3 — Git integration:** > "Should the loop auto-commit after each verified task? (yes / no)"
Store: `MODE`, `GOAL`, `LOOP_ID`, `STOP_CONDITION`, `BUDGET_STRING`, `MAX_TURNS`, `USE_GIT`.
---
Phase 2+3 — Initialize Loop
Run the init script — creates all state files, copies agent files, and writes verifier in one command:
**Bash (macOS/Linux):**
bash ~/.claude/skills/loop-engineer/scripts/init-loop.sh \
--loop-id <LOOP_ID> \
--goal "<GOAL>" \
--stop "all tasks in loop-stack/<LOOP_ID>/PLAN.md checked" \
--git <yes/no> \
--mode <MODE> \
--platform claude
**PowerShell (Windows):**
& "$env:USERPROFILE\.claude\skills\loop-engineer\scripts\init-loop.ps1" `
-LoopId "<LOOP_ID>" `
-Goal "<GOAL>" `
-Stop "all tasks in loop-stack/<LOOP_ID>/PLAN.md checked" `
-Git <yes/no> `
-Mode <MODE> `
-Platform claude
If the script is missing, install the skill first:
- Plugin: `claude plugin install https://github.com/vibhasdutta/loop-engineer`
- Manual: `git clone https://github.com/vibhasdutta/loop-engineer && bash install.sh`
The script creates `loop-stack/<LOOP_ID>/`, `.claude/agents/` with all agent .md files + knowledge-sources/, and `verifier.md` with the actual stop condition substituted.
---
Phase 4 — Startup Sequence
**FULLY AUTONOMOUS from this point. Never pause or ask the user anything.**
Run in this order. Each step waits for completion before the next.
Step 1 — PARALLEL RESEARCHERS (dynamic count)
**Determine how many researchers to spawn based on goal complexity:**
- Simple, single-domain goal → 2 researchers
- Medium complexity or multi-domain goal → 3 researchers
- Large or multi-system goal (e.g. full-stack app, migration, complex refactor) → 4 researchers
**Spawn all researchers simultaneously in a single response** (call Agent tool N times at once).
Always assign each researcher a distinct focus area. Divide the following domains across however many you spawn — these apply to ANY goal type (coding, research, content, data, automation, etc.):
- **Context & Prior Work**: what already exists relevant to this goal — source files, documents, prior research, existing assets, related work, knowledge bases, prior loop learnings
- **External Knowledge & Resources**: what's available externally — APIs, documentation, datasets, libraries, services, reference materials, skills, MCP capabilities (use WebSearch/WebFetch)
- **Requirements & Constraints**: what must be true about the output — quality standards, format requirements, accuracy, edge cases, stakeholder needs, access restrictions, performance criteria (include this for 3+ researchers)
- **Environment & Integration**: how everything fits together — tools available, configuration, system dependencies, data flow, integration points, deployment targets (include this for 4 researchers)
For each researcher spawn:
Loop directory: loop-stack/<LOOP_ID>/
Focus: {ASSIGNED_DOMAIN} — {specific files and concerns for that domain}
GLOBAL DATA FIRST: read loop-stack/.global/MEMORY.md and loop-stack/.global/TOOLS.md.
Write findings to loop-stack/<LOOP_ID>/RESEARCH.md under "##Read more
name: loop-engineer description: > Domain-agnostic autonomous loop for any goal — coding, research, content, data, automation, or any objective. Asks 3 questions, then orchestrates a self-assembling agent team (resource-scout, researcher, planner, agent-factory, executor, verifier, auditor, memory-keeper) that researches, discovers resources, builds specialized agents for the goal, executes, and iterates until done. Modes: build (from scratch), research (investigate only), patch (fix/extend existing code), audit (review only, no changes). Supports persistent memory, git integration, and generates a completion report. disable-model-invocation: true allowed-tools: - Bash - Read - Write - Edit - Agent - Glob - Grep - TodoWrite
Loop Engineer
You are running a loop engineering wizard. Follow these phases in order.
**On permission prompts:** `allowed-tools` above pre-approves Bash/Read/Write/Edit/Agent/Glob/Grep/TodoWrite for the top-level orchestrator while this skill is active — you should not be interrupted for those. Spawned subagents (via the `Agent` tool) run under the same session's permission settings, not a separate grant, so if a subagent still gets interrupted, it's the session's own `.claude/settings.json` (or global settings) that needs an allow rule, not this skill. `disable-model-invocation: true` means this only runs when explicitly invoked with `/loop-engineer` — it will never trigger itself based on conversation content.
---
> **To update loop-engineer:** `claude plugin update https://github.com/vibhasdutta/loop-engineer` (plugin install) or re-run `install.sh --update` / `install.ps1 -Update` (manual install). Updates are never applied automatically mid-loop.
---
Phase 1 — Core Wizard
Ask **one at a time**. Wait for the full answer.
**Q1 — Mode:** If the skill was invoked with an argument matching `build`, `research`, `patch`, or `audit` (e.g. `/loop-engineer patch`), use it as MODE and skip this question. Otherwise ask: > "Mode? build (new from scratch) / research (investigate and report, no code changes) / patch (fix or add a feature using the existing codebase) / audit (review existing code/output only, no changes)"
Store `MODE`. Default to `build` if the answer is unclear. See "Mode gating" under Phase 5 for how each mode changes the loop.
**Q2 — Goal:** > "What do you want the loop to accomplish? (1-2 sentences)"
After storing GOAL, generate LOOP_ID:
- lowercase, replace non-alphanumeric runs with hyphens
- Take first 4 meaningful words (skip: a, an, the, to, for, of, in, on, with, and, or)
- Max 24 chars, strip trailing hyphen
- Example: "Add authentication flow to the REST API" → "add-auth-flow-api"
Auto-set: `STOP_CONDITION` = "all tasks in loop-stack/<LOOP_ID>/PLAN.md checked", `BUDGET_STRING` = "20 turns", `MAX_TURNS` = 20.
**Q3 — Git integration:** > "Should the loop auto-commit after each verified task? (yes / no)"
Store: `MODE`, `GOAL`, `LOOP_ID`, `STOP_CONDITION`, `BUDGET_STRING`, `MAX_TURNS`, `USE_GIT`.
---
Phase 2+3 — Initialize Loop
Run the init script — creates all state files, copies agent files, and writes verifier in one command:
**Bash (macOS/Linux):**
bash ~/.claude/skills/loop-engineer/scripts/init-loop.sh \ --loop-id <LOOP_ID> \ --goal "<GOAL>" \ --stop "all tasks in loop-stack/<LOOP_ID>/PLAN.md checked" \ --git <yes/no> \ --mode <MODE> \ --platform claude
**PowerShell (Windows):**
& "$env:USERPROFILE\.claude\skills\loop-engineer\scripts\init-loop.ps1" ` -LoopId "<LOOP_ID>" ` -Goal "<GOAL>" ` -Stop "all tasks in loop-stack/<LOOP_ID>/PLAN.md checked" ` -Git <yes/no> ` -Mode <MODE> ` -Platform claude
If the script is missing, install the skill first:
- Plugin: `claude plugin install https://github.com/vibhasdutta/loop-engineer`
- Manual: `git clone https://github.com/vibhasdutta/loop-engineer && bash install.sh`
The script creates `loop-stack/<LOOP_ID>/`, `.claude/agents/` with all agent .md files + knowledge-sources/, and `verifier.md` with the actual stop condition substituted.
---
Phase 4 — Startup Sequence
**FULLY AUTONOMOUS from this point. Never pause or ask the user anything.**
Run in this order. Each step waits for completion before the next.
Step 1 — PARALLEL RESEARCHERS (dynamic count)
**Determine how many researchers to spawn based on goal complexity:**
- Simple, single-domain goal → 2 researchers
- Medium complexity or multi-domain goal → 3 researchers
- Large or multi-system goal (e.g. full-stack app, migration, complex refactor) → 4 researchers
**Spawn all researchers simultaneously in a single response** (call Agent tool N times at once).
Always assign each researcher a distinct focus area. Divide the following domains across however many you spawn — these apply to ANY goal type (coding, research, content, data, automation, etc.):
- **Context & Prior Work**: what already exists relevant to this goal — source files, documents, prior research, existing assets, related work, knowledge bases, prior loop learnings
- **External Knowledge & Resources**: what's available externally — APIs, documentation, datasets, libraries, services, reference materials, skills, MCP capabilities (use WebSearch/WebFetch)
- **Requirements & Constraints**: what must be true about the output — quality standards, format requirements, accuracy, edge cases, stakeholder needs, access restrictions, performance criteria (include this for 3+ researchers)
- **Environment & Integration**: how everything fits together — tools available, configuration, system dependencies, data flow, integration points, deployment targets (include this for 4 researchers)
For each researcher spawn:
Loop directory: loop-stack/<LOOP_ID>/
Focus: {ASSIGNED_DOMAIN} — {specific files and concerns for that domain}
GLOBAL DATA FIRST: read loop-stack/.global/MEMORY.md and loop-stack/.global/TOOLS.md.
Write findings to loop-stack/<LOOP_ID>/RESEARCH.md under "##Loop engineering skill for AI — scaffold a 8-agent team that discovers, implements, verifies, and iterates until your goal is met.
Repo: vibhasdutta/loop-engineer

