From dev-loop
You are running an autonomous dev loop. You MUST NOT stop until the phase
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-loop:dev-loopThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are running an autonomous dev loop. You MUST NOT stop until the phase
You are running an autonomous dev loop. You MUST NOT stop until the phase is "done". Follow this workflow exactly.
YOUR VERY FIRST ACTION must be to check if .claude/dev-loop-state.json
exists:
Do NOT skip this. Do NOT do anything else first.
Run these steps in order. Do NOT proceed to the Workflow until all are done:
git checkout -b dev-loop/<short-slug> (2-3 word
kebab-case summary of the prompt)..claude/dev-loop-state.json, .claude/dev-loop.log.md, and
.claude/dev-loop-plan.md are gitignored..claude/dev-loop-state.json NOW with this exact content (fill
in the values):
{
"phase": "plan",
"prompt": "<the user prompt>",
"pr_url": null,
"iteration": 0,
"max_iterations": <4 or parsed from args>,
"last_codex_thread": null,
"last_review_source": null,
"last_review_summary": null,
"branch": "<the branch you just created>",
"ref_files": [],
"codex_lgtm": false,
"next_phase": null,
"slack_channel": null,
"slack_thread_ts": null
}
If this was triggered from a Slack thread, populate slack_channel and
slack_thread_ts from the trigger context so that progress updates can be
posted back to the thread..claude/dev-loop.log.md with the header.ref_files
in state.{
"phase": "plan|improve|implement|commit|codex-review|codex-fix|claude-review|claude-fix|done",
"prompt": "the original work prompt",
"pr_url": "url if PR is created",
"iteration": 0,
"max_iterations": 4,
"last_codex_thread": "thread id if resuming codex",
"last_review_source": "codex|claude",
"last_review_summary": "summary of last review findings",
"branch": "branch name",
"ref_files": ["optional list of files referenced in the prompt"],
"codex_lgtm": false,
"next_phase": null,
"slack_channel": "channel ID if triggered from Slack, else null",
"slack_thread_ts": "thread timestamp if triggered from Slack, else null"
}
iteration tracks full loops (each loop = codex-review + claude-review).
Default max_iterations is 4 (so up to 8 total review cycles: 4 codex + 4 claude).
The user can override this by passing e.g. /dev-loop:go max_iterations=2 <prompt>.
IMPORTANT: After completing ANY phase, immediately continue to the next phase. NEVER stop between phases. The only phase where you may stop is "done".
.claude/dev-loop-plan.md..claude/dev-loop-plan.md.Read .claude/dev-loop-plan.md and .claude/dev-loop-state.json.
If ref_files are listed in state, read those too.
Implement the plan fully. Follow all instructions in the plan.
Do not create commits — just make the code changes.
When done, list all files you created or modified.
Use subagent_type: "general-purpose".next_phase in state, default "codex-review").gh pr create.last_review_source is set — meaning we're coming
from codex-fix or claude-fix, not the initial implementation), add a PR
comment via gh pr comment summarizing the iteration that just finished.
The comment should include:
## Dev Loop — Iteration N Review Summarynext_phase (default
"codex-review"). Reset next_phase to null after reading it.codex_lgtm to false in state..claude/dev-loop.log.md to get the history of prior iterations. Build
a short summary of what was already reviewed and fixed/dismissed (if any).mcp__codex__codex) with these exact parameters:
model: "gpt-5.4"config: {"model_reasoning_effort": "high"}approval-policy: "on-failure"sandbox: "read-only"prompt — include the prior iteration summary so Codex doesn't re-raise
already-resolved issues:Review the changes in the current branch compared to main. Focus on:
- Bugs and logic errors
- Security issues
- Missing edge cases
- Code quality issues
Give a structured list of issues to fix, with file paths and line numbers.
If there are genuinely no issues worth addressing, say "LGTM".
PRIOR REVIEW HISTORY — an issue dismissed once may be re-raised ONE more
time for reconsideration. If dismissed twice, it is settled — do not
raise it again:
<paste the prior iteration summary here>
If the Codex MCP call fails or times out, log the error, set
codex_lgtm to false, and skip to phase "claude-review" (let Claude
review alone rather than getting stuck)."codex_lgtm": true in state and move to phase "claude-review"."codex_lgtm": false in state and move to phase "codex-fix".mcp__codex__codex-reply,
same thread ID, model: "gpt-5.4", sandbox: "read-only") to
ask for clarification before fixing.mcp__codex__codex-reply
(same thread, sandbox: "read-only"):
I've applied fixes for the issues you raised. Review the current state of
the changed files. Are the fixes correct? Any remaining concerns?
codex_lgtm to true.next_phase to "claude-review" in state. Update state to phase "commit".╔══════════════════════════════════════════════════════════════════╗ ║ YOU MUST RUN REVIEW AGENTS. DO NOT REVIEW THE DIFF YOURSELF. ║ ║ DO NOT skip this. DO NOT do a manual review instead. ║ ║ DO NOT just read the diff. LAUNCH THE AGENTS BELOW. ║ ║ This is MANDATORY. Not optional. Not a suggestion. ║ ╚══════════════════════════════════════════════════════════════════╝
Get the diff: run git diff main...HEAD.
Read .claude/dev-loop.log.md to get the history of prior iterations. Build
a short summary of what was already reviewed, fixed, and dismissed. You will
pass this to each agent so they don't re-raise resolved issues.
Launch these 3 review agents in parallel using the Task tool.
Each gets the diff and reviews the changed files. These agents are
bundled in this plugin under agents/.
IMPORTANT: Include the prior iteration summary in each agent prompt. Agents must focus on new issues only — not re-raise things already fixed or dismissed as false positives in earlier iterations.
Agent A — code-reviewer (subagent_type: "general-purpose"):
You are a code reviewer. Read .claude/dev-loop-state.json to understand
the project context. Read any CLAUDE.md or project rules files.
Review all changes in `git diff main...HEAD`. Focus on: bugs, logic
errors, style violations, guideline compliance, best practices.
Give a structured list of issues with file:line references and
confidence scores (only report confidence >= 80).
PRIOR REVIEW HISTORY — an issue dismissed once may be re-raised ONE more
time for reconsideration. If dismissed twice, it is settled — do not
raise it again:
<paste the prior iteration summary here>
Agent B — silent-failure-hunter (subagent_type: "general-purpose"):
You are an error handling and security auditor. Read all changes in
`git diff main...HEAD`. Focus on: silent failures, missing error
handling, swallowed exceptions, broad catch blocks, security issues
(injection, XSS, auth bypass), missing input validation.
Give a structured list of issues with file:line references and severity.
PRIOR REVIEW HISTORY — an issue dismissed once may be re-raised ONE more
time for reconsideration. If dismissed twice, it is settled — do not
raise it again:
<paste the prior iteration summary here>
Agent C — code-simplifier (subagent_type: "general-purpose"):
You are a code simplification specialist. Read any CLAUDE.md for project
standards. Review all changes in `git diff main...HEAD`. Focus on:
unnecessary complexity, dead code, redundant logic, opportunities to
simplify while preserving behavior.
Give a structured list of suggestions with file:line references.
PRIOR REVIEW HISTORY — an issue dismissed once may be re-raised ONE more
time for reconsideration. If dismissed twice, it is settled — do not
raise it again:
<paste the prior iteration summary here>
Collect all agent results. For each issue raised by any agent:
Compile a validated review summary of real, new issues only.
╔══════════════════════════════════════════════════════════════════╗ ║ EXIT GATE — YOU MAY ONLY MOVE TO PHASE "done" IF: ║ ║ ║ ║ ✓ codex_lgtm is TRUE (Codex found ZERO issues) ║ ║ ✓ After validating all agent findings, ZERO real issues remain ║ ║ (all agent findings were confirmed as false positives) ║ ║ ║ ║ IF EITHER codex OR validated agent review has real issues ║ ║ → phase "claude-fix". No exceptions. ║ ╚══════════════════════════════════════════════════════════════════╝
gh pr comment summarizing this
last cycle (same format as the commit-phase comment: iteration number,
codex verdict, claude verdict, note that all reviews passed clean).iteration by 1.iteration >= max_iterations, update state to phase "done" and add a
PR comment listing any remaining concerns.gh pr comment with:
## Dev Loop — Final Summary.claude/dev-loop-state.json. commit ──► codex-review ──► codex-fix ──► commit ──► claude-review
▲ │ │ │
│ │(LGTM) (both (issues)
│ └──────────────► claude-review LGTM) │
│ │ │ ▼
│ │ ▼ claude-fix
│ │ done │
│ └──────────────────────┘
│ iteration++
│ │
└────── if iteration < max_iterations ─────────┘
│
if iteration >= max_iterations ──► done
Write a running log to .claude/dev-loop.log.md. This file is gitignored and
serves as a human-readable history of the entire loop. Append to it after
each phase transition — never overwrite.
Format:
# Dev Loop: <prompt>
Branch: `<branch>`
Started: <ISO timestamp>
Max iterations: <N>
---
## Iteration 0
### Plan
<timestamp>
- Summary of the plan (3-5 bullets)
### Plan Improvements
<timestamp>
- What was improved
### Implementation
<timestamp>
- Files changed (list)
- Brief description of what was built
### Commit
<timestamp>
- Commit SHA: `<sha>`
- PR: <url> (if created)
### Codex Review
<timestamp>
- **Verdict:** <LGTM | N issues found>
- Issues: (bullet list, or "none")
- Dismissed: (issues considered but dismissed as false positives, with reason)
### Codex Fix
<timestamp>
- What was fixed (bullet list)
### Claude Review
<timestamp>
- **Verdict:** <clean | N issues found>
- Issues: (bullet list, or "none")
- Dismissed: (issues considered but dismissed as false positives, with reason)
### Claude Fix
<timestamp>
- What was fixed (bullet list)
---
## Iteration 1
...
---
## Done
<timestamp>
- Total iterations: N
- PR: <url>
- Summary of all changes across rounds
Rules for the log:
If slack_channel and slack_thread_ts are set in state (meaning this loop
was triggered from Slack), post a one-liner progress update to the Slack
thread after every phase transition that updates the log. Use the Slack MCP
tool (e.g., mcp__slack__send_message) if available. Keep it short — one line,
no formatting overkill. Examples:
"Planning done, starting implementation.""Implementation committed, PR created: <url>""Codex review: 3 issues found, fixing now.""Codex fixes committed, moving to Claude review.""Claude review: clean. All reviews passed.""Iteration 1 complete — 2 codex issues + 1 claude issue fixed.""Done! 2 iterations, all reviews clean. PR: <url>"If no Slack MCP tool is available or the call fails, skip silently — Slack updates are best-effort and should never block the loop.
.claude/dev-loop-state.json. If it exists, resume from the recorded phase.
This is critical for surviving compaction.ref_files is
non-empty, re-read those files to restore context that may have been lost
to compaction.git branch --show-current). If not, switch to it
(git checkout <branch>). This handles cases where compaction or a restart
left you on the wrong branch.mcp__codex__codex for the first Codex call per
iteration and mcp__codex__codex-reply to continue a thread.npx claudepluginhub mintmcp/dev-loop --plugin dev-loopProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.