iterate
Skill1 starsChanged 5 months agoMITView on GitHub
Lightweight ad-hoc execution loop for bug fixes, debugging, small features, or recovery from a stuck state. Invoke with /iterate when /execute is overkill but unstructured coding loses context.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- 5thlayer/skillworkstheir own version, first seen Nov 8, 2026
- viktorsboroviks/skillstheir own version, first seen Nov 8, 2026
- devjiwonchoi/skillstheir own version, first seen Nov 8, 2026
- jingzhao-l/iterate-skilltheir own version, first seen Nov 7, 2026
- lalulali/vespyrtheir own version, first seen Nov 6, 2026
- bkraad47/ramentheir own version, first seen Nov 1, 2026
Used with
Projects with it also use test, writing-for-agents and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkilltest
Also in 3 projects that use this
MicrosoftSkillwriting-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
Also in 3 projects that use this
AWSSkillretro
Conduct a retrospective on a coding session.
Also in 3 projects that use this
NVIDIASkillresearch
Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.
Also in 4 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 3 projects that use this
Hugging FaceSkillimplement
Make tests pass. Invoke after /write-tests produces failing tests.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- OpenHands/extensions★ 167same name
- lalulali/vespyr★ 11same name
- bkraad47/ramen★ 4same name
- devjiwonchoi/skills★ 2same name
- jingzhao-l/iterate-skill★ 2same name
- marcuskrogh/skills★ 1same name
- scottlivingston/claude-skills★ 1same name
- viktorsboroviks/skills★ 1same name
- 5thlayer/skillworks★ 0same name
- AntaresYuan/claude-skill-iterate★ 0same name
1 more not listed
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.
In this repository7 other files it gives its agents.
- build-planSkill
- executeSkill
- github-syncSkill
- initSkill
- reviewSkill
- saveSkill
- skill-forgeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 12 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 50
If ambiguous → AskUserQuestion: "Which iteration mode?
- Distinctive: line 52
Read the matching reference for mode-specific guidance:
- Distinctive: line 61
Read the most recent context snapshot — prefer the newer of:
- Very specific: line 79
Read the last 3 iterate changelog entries:
- Distinctive: line 83
Read git state: branch, uncommitted files, last 3 commits.
- Distinctive: line 92
If no prior context exists, skip the summary.
- Distinctive: line 120
Read relevant files. Make the change.
- Distinctive: line 121
After each meaningful step, append to changelog:
- Distinctive: line 126
Update the checklist in place — strike/check completed bullets, add new ones if scope expanded.
- Distinctive: line 128
Do NOT batch changelog entries.
- Distinctive: line 132
After the mode's threshold (see references), offer:
- Distinctive: line 145
No explicit "iterate complete" step.
- Distinctive: line 151
Read the matching mode reference at Phase 0 for goal-capture and threshold details:
- Very specific: line 159
Append-only changelog: Never db_upsert over a changelog entry.
- Distinctive: line 160
One-question goal capture: No multi-round interview. The checklist is a living document.
- Very specific: line 195
Before completing, read and follow ../../references/cross-cutting-rules.md.
“Common” is measured: kept by at least 6 in 10 of the 11 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
Iterate
Append-only execution loop for the "tweaking phase" — the gap between unstructured ad-hoc coding and a full /execute build plan. Session-aware and lightweight.
Three sub-modes share the same core loop. Differences are in goal capture and review thresholds.
When to use
| Mode | Use for | Don't use for |
/iterate | Bug fixes, refactors, ad-hoc tweaks, debugging, exploratory changes | Net-new features that need a plan |
/execute | Implementing an approved project-plan.md | One-off tweaks |
| Unstructured | Single-line change, a question, read-only exploration | Anything you want recorded |
/iterate does NOT auto-activate. The user invokes it explicitly. Once active, it stays active for the session until /save runs or the user switches modes.
Inputs
| Input | Source | Required |
| Iteration goal (1-2 sentences) | User prompt | Yes |
| Last context snapshot | Artifact DB (save/compact/* or save/snapshot/*) | Optional |
| Current branch + git status | git | Auto |
Outputs
- Append-only changelog in DB:
db_write 'iterate' 'changelog' '<ISO-8601>' "$ENTRY" - Lightweight checklist in DB:
db_upsert 'iterate' 'checklist' 'current' "$CHECKLIST"(updated in place) - Review offer prompted after threshold per mode (see below)
Instructions
Phase 0: Mode detection
Detect from user words if possible:
| User says | Mode |
| "fix the X bug", "debug Y" | bug-fix |
| "I'm stuck", "this isn't working", "I keep going in circles" | stuck |
| "TDD", "write tests first" | tdd |
If ambiguous → AskUserQuestion: "Which iteration mode? Bug-fix, stuck-recovery, or TDD-loop?"
Read the matching reference for mode-specific guidance:
- bug-fix →
references/bug-fix.md - stuck →
references/stuck.md - tdd →
references/tdd.md
Phase 1: Session wake-up
On first invocation in a session:
- Read the most recent context snapshot — prefer the newer of:
source references/db.sh LATEST_COMPACT=$(db_read_all 'save' 'compact' 2>/dev/null \ | jq -s 'sort_by(.label) | last | .content // empty' -r) # Legacy backwards-compat: sessions saved before the meta-context-save → save rename if [ -z "$LATEST_COMPACT" ]; then LATEST_COMPACT=$(db_read_all 'meta-context-save' 'compact' 2>/dev/null \ | jq -s 'sort_by(.label) | last | .content // empty' -r) fi LATEST_SNAPSHOT=$(db_read_all 'save' 'snapshot' 2>/dev/null \ | jq -s 'sort_by(.label) | last | .content // empty' -r) # Legacy backwards-compat: snapshot namespace fallback if [ -z "$LATEST_SNAPSHOT" ]; then LATEST_SNAPSHOT=$(db_read_all 'meta-context-save' 'snapshot' 2>/dev/null \ | jq -s 'sort_by(.label) | last | .content // empty' -r) fi - Read the last 3
iteratechangelog entries:db_read_all 'iterate' 'changelog' | tail -3 - Read git state: branch, uncommitted files, last 3 commits.
- Summarize for the user in 3-4 lines:
Resuming iteration on branch `feature/x`. Last activity: 2 file edits to src/api.ts (2026-05-23 14:30). Open todos: <count from checklist if present>. Uncommitted: 3 files.
If no prior context exists, skip the summary.
Phase 2: Goal capture (one question)
Ask:
"What are we working on this iteration?"
Capture as a 1-2 sentence goal. Append to changelog:
source references/db.sh
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
db_write 'iterate' 'changelog' "$TIMESTAMP" "GOAL ($MODE): $GOAL_TEXT"Generate a 3-5 bullet checklist tailored to the mode (see references for shape):
db_upsert 'iterate' 'checklist' 'current' "$CHECKLIST_BULLETS"Present to the user. Accept revisions. No multi-round planning — the checklist is a living draft.
Phase 3: Execution loop
The user drives the loop. For each task:
- Read relevant files. Make the change. Test it.
- After each meaningful step, append to changelog:
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ") db_write 'iterate' 'changelog' "$TIMESTAMP" "STEP: <description> | FILES: <a,b,c> | RESULT: <pass|fail|partial>" - Update the checklist in place — strike/check completed bullets, add new ones if scope expanded.
Do NOT batch changelog entries. One entry per step keeps the audit trail honest.
Phase 4: Review offer (automatic)
After the mode's threshold (see references), offer:
"$N files touched this iteration. Want me to run a review lens before continuing? Options:
/review refactor(code quality),/review tests(coverage),/review security(sensitive changes),/review integration(wiring), or skip."
The user can accept, pick a different lens, or decline. Track the offer ack so it doesn't fire again until the next threshold.
Phase 5: Wrap-up (user-initiated)
The user ends the iteration by:
- Running
/save(snapshots; or/saveclear-mode commits + clears), - Running
/github-sync(commits + pushes), or - Just stopping.
No explicit "iterate complete" step. The append-only changelog is the record.
Pattern E terminal handoff (intentional skip). Most lifecycle skills end by naming the next skill (Pattern E). /iterate deliberately doesn't — it's a loop, not a phase in a chain. The user picks the exit (/save, /github-sync, /review, or just leave the session). The review-offer at Phase 4 is the closest thing to a Pattern E nudge.
References (on-demand)
Read the matching mode reference at Phase 0 for goal-capture and threshold details:
references/bug-fix.md— reproduce-locate-fix-verify checklist shape; review threshold 5 filesreferences/stuck.md— explicit "what have I tried" log, premortem prompt; review threshold 3 files (lower bar to break the loop)references/tdd.md— red-green-refactor; review threshold every commit on the test file
Constraints
- Append-only changelog. Never
db_upsertover a changelog entry. Usedb_writewith a unique timestamped label. - One-question goal capture. No multi-round interview. The checklist is a living document.
- No auto-commit, no auto-doc-update. The user runs
/github-syncand/saveexplicitly when ready. - Review threshold is automatic but advisory. Offer the lens; the user decides.
- Stays active across the session. Subsequent user messages stay within iterate's loop until the user explicitly switches modes (e.g., starts
/execute).
Examples
User: /iterate — fix the broken pagination in the orders list
→ Mode = bug-fix. Phase 1 reads last snapshot (none), git status (clean on main).
Phase 2 captures goal, generates 3-bullet checklist (reproduce, locate, fix+test).
Phase 3 runs: read OrdersList.tsx, find offset bug, patch, test.
Each step appended to changelog. After 5 files, Phase 4 offers /review tests.User: /iterate — I keep changing the auth middleware and breaking the same tests
→ Mode = stuck. Reads `stuck.md`. Goal capture also asks for "what have you tried?".
Generates a checklist that includes a premortem: "what would make this fail again?".
Lower review threshold (3 files) so a lens runs before the loop tightens further.User: /iterate write tests for the rate limiter first
→ Mode = tdd. Reads `tdd.md`. Generates red-green-refactor checklist.
Each commit on the spec file triggers a /review tests offer.User: I'm just exploring, don't track anything
→ Don't invoke /iterate. The user is in unstructured mode by choice.Before completing, read and follow ../../references/cross-cutting-rules.md.
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.

