iterate
Skill14 starsChanged 3 months agoMITView on GitHub
Diverge-converge workflow: spin up N agents on isolated worktrees, each exploring a different approach to the same problem. Compare results side-by-side (with optional preview ports), pick a winner, merge it back. Use when the user says /iterate, 'try multiple approaches', 'explore different directions', or wants to compare implementations.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- jingzhao-l/iterate-skilltheir own version, first seen Oct 4, 2026
- scottlivingston/claude-skillstheir own version, first seen Sep 8, 2026
- blyatiful1/ultrawebtheir own version, first seen Sep 2, 2026
- zeroonething/ultrashiptheir own version, first seen Aug 19, 2026
- trevorbyrum/claude-skills-suitetheir own version, first seen Jun 8, 2026
- AntaresYuan/claude-skill-iteratetheir own version, first seen May 14, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- blyatiful1/ultraweb★ 1same name
- jingzhao-l/iterate-skill★ 1same name
- scottlivingston/claude-skills★ 1same name
- trevorbyrum/claude-skills-suite★ 1same name
- zeroonething/ultraship★ 1same name
- AntaresYuan/claude-skill-iterate★ 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.
In this repository22 other files it gives its agents.
- pstack-fullSkill
- pstack-projectSkill
- agentic-reviewSkill
- b2b-expert-advisorSkill
- design-swarmSkill
- doc-coauthoringSkill
- frontend-designSkill
- masterSkill
- mcp-builderSkill
- napkinSkill
- orchestrating-swarmsSkill
- plan-ceo-reviewSkill
- prompt-engineerSkill
- qaSkill
- shapingSkill
- skill-creatorSkill
- storytelling-influenceSkill
- tasteSkill
- tddSkill
- think-firstSkill
- upskilling-coachSkill
- visual-explainerSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 19
Must be inside a git repository with a clean working tree (or stashable changes)
- Distinctive: line 38
If no arguments provided, ask the user:
- Distinctive: line 44
Before spawning agents, generate N distinct approaches.
- Distinctive: line 49
Search-first — spotlight-style search with categorized results
- Distinctive: line 92
Wait for all agents to complete.
- Distinctive: line 113
Ask the user: "Which variant do you want to keep?"
- Very specific: line 122
Remove VARIANT_NOTES.md from the merge
- Distinctive: line 127
Ask which parts from which variants
- Distinctive: line 137
Always clean up worktrees when done, even if the user abandons the process:
- Distinctive: line 155
Git safety: Never force-push or modify the user's current branch until they explicitly pick a winner
- Distinctive: line 156
Port conflicts: Check if ports are in use before assigning.
- Very specific: line 159
Dev server detection: Look for package.json scripts (dev, start, serve) or common framework commands to determine if/how to start a preview …
“Common” is measured: kept by at least 6 in 10 of the 6 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 — Diverge, Compare, Converge
Spin up N parallel agents on isolated git worktrees, each exploring a different direction for the same problem. Review all variants, pick the best, merge it back.
When to Use
- User wants to explore multiple approaches to a problem
- Design/UI work where visual comparison matters
- Refactoring where there are multiple valid strategies
- Any task where "try a few things and pick the best" is the right move
Prerequisites
- Must be inside a git repository with a clean working tree (or stashable changes)
- The repo should have committed state to branch from
Usage
/iterate <task description>
/iterate 3 <task description> # explicit count (default: 3)
/iterate 2 redesign the settings page using shadcnHow It Works
Phase 1: Parse Arguments
Parse $ARGUMENTS to extract:
- N (number of variants): First token if it's a number 1-5, otherwise default to 3
- Task: Everything after the count (or all of $ARGUMENTS if no count)
If no arguments provided, ask the user:
- What task/problem should the agents explore?
- How many variants? (default 3)
Phase 2: Generate Divergent Angles
Before spawning agents, generate N distinct approaches. These should be meaningfully different, not just cosmetic variations.
Example for "redesign the settings page":
- Minimal — strip to essentials, single scrollable page, maximum whitespace
- Tabbed — group settings into logical tabs with a sidebar nav
- Search-first — spotlight-style search with categorized results
Example for "implement caching":
- In-memory LRU cache with TTL
- Redis-backed with cache invalidation events
- Service worker + Cache API for edge caching
Present the angles to the user for approval before spawning. The user may adjust, add, or remove angles.
Phase 3: Spawn Agents
For each variant, spawn an agent using:
Agent tool with:
- isolation: "worktree"
- subagent_type: "general-purpose"
- run_in_background: true (to run all N in parallel)Each agent gets this prompt structure:
You are variant {i} of {N} exploring: {task}
YOUR ANGLE: {angle_description}
INSTRUCTIONS:
1. Implement the solution following the angle described above
2. Make it complete and functional — this will be compared against other approaches
3. If this is a web project with a dev server, start it on port {base_port + i}
(use the project's dev command with --port flag)
4. When done, write a brief VARIANT_NOTES.md at the repo root with:
- Approach taken
- Key decisions and tradeoffs
- What you'd improve with more time
5. Commit all changes with message: "iterate: variant {i} — {angle_name}"Port assignment: Base port = 3100, so variants get 3101, 3102, 3103, etc.
Phase 4: Monitor & Report
Wait for all agents to complete. As each finishes, collect:
- Worktree path and branch name (from agent result)
- Whether a dev server is running and on which port
- Summary from VARIANT_NOTES.md if it exists
Present a comparison table:
┌─────────┬──────────────────────┬──────────┬─────────────────────────┐
│ Variant │ Angle │ Port │ Summary │
├─────────┼──────────────────────┼──────────┼─────────────────────────┤
│ 1 │ Minimal │ :3101 │ Single page, 3 sections │
│ 2 │ Tabbed │ :3102 │ 4 tabs, sidebar nav │
│ 3 │ Search-first │ :3103 │ Spotlight + categories │
└─────────┴──────────────────────┴──────────┴─────────────────────────┘Tell the user to review each variant (visit the ports, check the code).
Phase 5: Converge
Ask the user: "Which variant do you want to keep?"
Options:
- Pick a single winner (1, 2, or 3)
- Cherry-pick pieces from multiple variants
- None — discard all and try again with different angles
If single winner:
- Merge the winning branch into the current branch
- Remove VARIANT_NOTES.md from the merge
- Clean up all worktrees (
git worktree remove) - Kill any running dev servers on the variant ports
If cherry-pick:
- Ask which parts from which variants
- Apply changes manually from the relevant worktrees
- Clean up all worktrees
If none:
- Clean up all worktrees
- Offer to re-run with new angles
Cleanup
Always clean up worktrees when done, even if the user abandons the process:
# List worktrees
git worktree list
# Remove each variant worktree
git worktree remove <path> --force
# Delete variant branches
git branch -D iterate-variant-1 iterate-variant-2 iterate-variant-3
# Kill dev servers on variant ports
lsof -ti:3101 -ti:3102 -ti:3103 | xargs kill 2>/dev/nullImportant Notes
- Git safety: Never force-push or modify the user's current branch until they explicitly pick a winner
- Port conflicts: Check if ports are in use before assigning; shift base port if needed
- Large repos: Worktrees share the git object store, so disk usage is minimal
- Context isolation: Each agent starts fresh — no context pollution between variants
- Dev server detection: Look for
package.jsonscripts (dev, start, serve) or common framework commands to determine if/how to start a preview server
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.

