devloop
Skill0 starsChanged 6 months agoMITView on GitHub
Run an autonomous, self-paced "dev loop" — work through a queue of issues/tasks on a git repo one at a time: branch → implement (small steps) → build & test hard → PR → independent sub-agent code review → merge → verify the deploy → update the issue → log it → next. Self-paced via ScheduleWakeup; keeps going unattended (e.g. overnight) until the queue is exhausted, then stops. Invoke when the user says things like "work through these issues", "run the loop", "knock out the backlog", "do all the doable issues" — especially if they want it to run while they're away. NOT for one-off single tasks (just do those directly).
- Deletes or force-pushes
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- elad-cohen-dev/claude-skillstheir own version, first seen Oct 13, 2026
- Mitscherlich/skillstheir own version, first seen Aug 10, 2026
- vincentvella/devlooptheir own version, first seen Jun 26, 2026
- ssv445/claude-skillstheir own version, first seen Mar 24, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- Mitscherlich/skills★ 3same name
- ssv445/claude-skills★ 2same name
- vincentvella/devloop★ 2same name
- elad-cohen-dev/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 57
If the queue / build / guardrails aren't clear, ASK — don't guess.
- Very specific: line 70
Verify deploy: curl -s URL -o /tmp/site.html then grep PATTERN /tmp/site.html — SEPARATE commands, no pipe.
- Very specific: line 87
Build & test hard: Run the build — it must pass AND be idempotent (run it twice.
- Very specific: line 95
Open the PR: write the body to /tmp/pr.md (Write tool), then gh pr create -R owner/repo --head feat/<name> --base main --title "..." …
- Distinctive: line 119
Commit + push it to main (docs-only commit.
- Very specific: line 127
If multiple wakeups queue up and a prompt's "STATE:" looks stale, ALWAYS git -C <repo> log at the top of the turn and reason from the real …
- Very specific: line 192
After §5 (Loop complete written, before the final user message), invoke /iterate devloop.
- Very specific: line 204
If ~/.claude/skills/iterate/ is not installed, skip the handoff silently — LOOP-FRICTION.jsonl just keeps accumulating for the next time …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
devloop — autonomous dev loop
You run a queue of dev tasks autonomously and self-paced, with the user away. Each task lands as a
reviewed, merged, deploy-verified PR. You pace yourself with ScheduleWakeup and keep going until
the queue is done, then stop. You don't wait on the user — but you keep them informed (issue
comments, a LOOP-LOG.md, occasional status messages).
0. Kickoff — do this BEFORE touching anything
Confirm the project-specific bits with the user, concisely (one message / AskUserQuestion):
- The queue. Which issues/tasks, in what order? Which are explicitly OUT — theirs to do, blocked on something only they can do (a 2FA OTP, a credential, an external account), or needing a decision you shouldn't make?
- Build & verify. Build command (e.g.
node scripts/build.js,npm run build)? Test suite (npm test)? If no test suite, "test" = build passes + idempotent + manual output checks +curlthe deployed site. How is "deployed" verified (a live URL? a preview?) and roughly how long does a deploy take? - Guardrails. Anything you must NOT touch without showing a plain-text draft first (content files, copy, secrets, infra/deploy config, CMS config)? Any "always do X" conventions?
- Permissions (so the loop runs unattended without prompting them every command): permission
mode = "Accept Edits" (Shift+Tab cycles to it, or
/config), PLUS a bash allowlist in the user-level settings file (~/.claude/settings.json— that's the project root when Claude Code was launched from the home dir; verify) underpermissions.allow:Bash(git:*),Bash(gh:*), the build runner (Bash(node:*)/Bash(npm:*)/Bash(npx:*)),Bash(curl:*),Agent,WebFetch,WebSearch, and read-only utils (ls/cat/grep/rg/find/head/tail/wc/sed/awk/sort/uniq/diff/mkdir/touch/cp/mv/echo/printf/true/xxd/jq/pwd); underpermissions.deny:Bash(rm:*),Bash(sudo:*),Bash(git push --force:*),Bash(git push -f:*),Bash(git push --force-with-lease:*),Bash(git reset --hard:*),Bash(git clean:*),Bash(git rebase:*),Bash(git filter-branch:*),Bash(git update-ref:*),Bash(gh repo delete:*),Bash(gh secret:*),Bash(gh auth:*). NOTE: that allowlist is global if it's in~/.claude/settings.json— say so. The nuclear alternative (--dangerously-skip-permissions) needs a CLI restart and loses the session — don't recommend it. Offer to write the allowlist yourself (the user approves the one settings-file edit) OR have them set it up; either way, confirm it actually works (run one harmlessgit -C <repo> statusand check it didn't prompt).
If the queue / build / guardrails aren't clear, ASK — don't guess.
1. Command-pattern constraints — THIS is the thing that bites you
The harness only auto-approves bash commands that are SIMPLE and START WITH an allowlisted command:
- ✅
git -C /abs/path/to/repo status -sb·gh pr create -R owner/repo --head feat/x --base main --title "..." --body-file /tmp/pr.md·node /abs/path/scripts/build.js·node -c /abs/path/scripts/x.js·curl -s URL -o /tmp/site.html·grep -c PATTERN /tmp/site.html - ❌
cd /repo && git ...— thecdprefix triggers an "untrusted hooks" warning AND the command no longer starts withgit. Usegit -C <repo>and absolute paths instead; nevercd. - ❌
REPO=... && git ...(starts with a var assignment) ·git ... && git ... && git ...(compound&&) ·... | grep ...(pipe) ·git commit -m "$(cat <<'EOF' ... EOF)"($(...)substitution). - Multi-line commit messages: repeated
-m "..."flags (one per paragraph). Add aCo-Authored-By:trailer via a final-mif the environment expects one. - PR bodies / issue comments containing
## headings(i.e. a newline followed by#): write the text to a temp file with the Write tool, thengh pr create ... --body-file /tmp/pr.md/gh issue comment N -R owner/repo --body-file /tmp/c.md. Inline--body "...##..."trips a gh prompt. Single-line--body "..."(no#) is fine. - Verify deploy:
curl -s URL -o /tmp/site.htmlthengrep PATTERN /tmp/site.html— SEPARATE commands, no pipe. - Append to a log file:
cat >> /abs/path/LOOP-LOG.md <<'EOF' ... EOF— works (single command starting withcat).
2. The per-task loop
For each task in the queue, in order:
git -C <repo> log --oneline -3first — confirm the ACTUAL repo state. (If you're resuming from a ScheduleWakeup whose prompt has a stale "STATE:" claim — which happens — trust git, not the prompt.)- Branch:
git -C <repo> checkout main→git -C <repo> pull --ff-only origin main→git -C <repo> checkout -b feat/<short-name>(use the repo's branch-naming convention if it has one —feat//fix//perf// etc.). - Implement in small steps. Read the surrounding code first; match its conventions, comment density, naming, idioms.
- Build & test hard. Run the build — it must pass AND be idempotent (run it twice; no diff on
the second run).
node -c(or the equivalent lint) any new/changed source files. Grep the built output for the markup/strings you expect. Run the test suite if there is one. Goal: "force no problems" — don't rush. - Self-review the diff (
git -C <repo> diff main...feat/<name>) before committing. - Commit (
git -C <repo> add <files>thengit -C <repo> commit -m "..."— conventional-commit style;-magain for body paragraphs / the Co-Authored-By trailer). - Push the branch:
git -C <repo> push -u origin feat/<name>. - Open the PR: write the body to
/tmp/pr.md(Write tool), thengh pr create -R owner/repo --head feat/<name> --base main --title "..." --body-file /tmp/pr.md. Body: what changed, why, what was tested + results, anything out of scope / known follow-ups. - Independent review: spawn a fresh general-purpose sub-agent (
Agenttool,subagent_type: general-purpose) to code-review the PR — instruct it to use ONLY Read/Grep/Glob (NO Bash, NO Edit — so it doesn't trigger permission prompts), give it context + the files to read, ask for: bugs/logic errors, build breakage, regressions to existing behaviour, a11y, edge cases, codebase consistency, console errors / leaked globals — ending with a one-line verdict ("OK to merge" / "OK to merge after fixing: …" / "Do not merge: …"). Post a brief summary of the review on the PR (single-line--bodyor--body-file). - Address anything serious it flags — NEW commits to the branch (never amend a pushed commit; force-push is denied). Cheap nits: fix them; the rest: note in the PR / LOOP-LOG.
- Merge:
gh pr merge <N> -R owner/repo --squash --delete-branch. - Sync:
git -C <repo> checkout main→git -C <repo> pull --ff-only origin main. - Verify the deploy. ScheduleWakeup ~150s (or the deploy duration). Next turn:
curl -s <live-url> -o /tmp/site.html;head -c 50 /tmp/site.html(it's HTML) ;grep -c '<marker for the feature you just shipped>' /tmp/site.html(=1) plus a couple of unrelated markers (=1, regression check). If it's not live yet, ScheduleWakeup ~90s and retry once — don't assume failure on the first try. - Update the issue:
gh issue comment <N> -R owner/repo --body-file /tmp/c.md(or single-line--body "..."if no#headings). Close the issue if it's fully done:gh issue close <N> -R owner/repo. - Log it. Append an entry to
LOOP-LOG.mdat the repo root (create it on the first task) — branch, what was done, what was tested + results, PR + commit, the review verdict, any follow-ups. Commit + push it to main (docs-only commit; won't trigger build/CI if your paths-filter excludes it). - Next task. ScheduleWakeup with a prompt that re-enters this loop. Short delay (~60s) when you're just continuing; ~150s when waiting on a deploy/CI.
3. Pacing
ScheduleWakeup is how you span turns. ~60s for "just keep working"; ~150s for "waiting on a deploy";
longer (1200s+) only if there's genuinely nothing to check. The harness re-invokes you when it fires.
If multiple wakeups queue up and a prompt's "STATE:" looks stale, ALWAYS git -C <repo> log at the
top of the turn and reason from the real state.
4. STOP conditions — pause, leave a note (in LOOP-LOG.md + a user message), don't guess
- A build won't pass and you can't fix it cleanly.
- A merge conflicts (don't force anything — leave it).
- The sub-agent reviewer flags something serious you can't resolve.
- A task needs a product/design decision that's the user's to make.
- A task is blocked on something only the user can do (2FA OTP, an external account, a credential, an asset they have to produce).
- You'd hit a guardrail (something you said you wouldn't touch without a draft).
- Permissions break — you start prompting the user repeatedly. Stop, explain why, let them fix it; don't keep firing prompts.
5. When the queue is exhausted
- Append a "Loop complete" section to
LOOP-LOG.md: a short summary + all PR/commit links + what's still on the user (with the why for each). Commit + push. - Hand off to
/iteratefor retrospective analysis (see §7 below). This runs BEFORE the final user message so the message can reference the RETRO file + any auto-opened PRs. - Post a final user-facing message: what shipped (with PR numbers), what still needs them (and why),
housekeeping (permission mode they can revert, the allowlist — note if it's global, any temp
files / the LOOP-LOG that can be deleted), and pointers to the RETRO report + any iteration
PRs
/iterateopened. - Stop. Do not ScheduleWakeup again.
6. Friction logging during the run
Throughout the loop, append one JSON line per friction event to LOOP-FRICTION.jsonl at the
working repo root. This feeds /iterate (§7). Init at start of loop:
touch <repo>/LOOP-FRICTION.jsonl.
When to log (and the type):
| When | type | Notes |
| A bash command hits a permission prompt | permission_blocked | log even if user approves inline |
| Same command blocked ≥2× in one run | permission_thrash | indicates real allowlist gap |
| A command had to retry (build failure, network, etc.) | retry | include attempts + reason |
| ScheduleWakeup undershot a deploy / CI wait | pacing_mismatch | include scheduled_wait_s vs actual_ready_s |
| Sub-agent reviewer rejected ≥2 cycles on one PR | subagent_flag_persistent | include cycle count |
git log showed unexpected state vs a STATE: claim | unexpected_state | log assumption vs actual |
| A STOP condition fired (see §4) | stop_condition_hit | include which one |
A deny: rule blocked a destructive command you didn't mean to fire | safety_intentional | inverse of friction — flags the guardrail working as designed; /iterate won't propose relaxing it |
Format (one line per event):
{"ts": "2026-05-13T16:42:11Z", "run_id": "<this-loop-id>", "task": "issue-42", "type": "pacing_mismatch", "details": {"step": "deploy_verify", "scheduled_wait_s": 150, "actual_ready_s": 245}, "lesson_hint": "Default 150s undershoots this repo's deploy"}How to append (one of the allowed bash patterns — single command starting with cat,
no compound):
cat >> /abs/path/to/repo/LOOP-FRICTION.jsonl <<'EOF'
{"ts": "...", "run_id": "...", "task": "...", "type": "...", "details": {...}, "lesson_hint": "..."}
EOFGenerate run_id once at loop start (e.g. timestamp-based) and reuse for every event in this
run. Keep lesson_hint short and concrete — that's what /iterate's analyzer reads as a
human-authored hypothesis.
7. Iteration handoff (/iterate)
After §5 (Loop complete written, before the final user message), invoke /iterate devloop.
The /iterate meta-skill reads this skill's iteration: frontmatter to know where the
artifacts are, runs a retrospective sub-agent over LOOP-FRICTION.jsonl + LOOP-LOG.md +
recent git history, produces a RETRO-<YYYY-MM-DD>.md in the working repo, accumulates
friction counts in .iteration-state.json across runs, and — when a class crosses
threshold (default 3) — opens a PR to AntaresYuan/claude-devloop with a proposed
SKILL.md diff backed by friction evidence.
/iterate never auto-merges and never proposes weakening safety entries (deny list,
hooks, force-push protections). PRs are for human review.
If ~/.claude/skills/iterate/ is not installed, skip the handoff silently — LOOP-FRICTION.jsonl
just keeps accumulating for the next time /iterate is available. Note the missing iteration
in the final user message so they can install it: git clone
https://github.com/AntaresYuan/claude-skill-iterate ~/.claude/skills/iterate.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

