skills/iterate/SKILL.md
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.
npx skillsauth add SZoloth/skill-pack iterateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
/iterate <task description>
/iterate 3 <task description> # explicit count (default: 3)
/iterate 2 redesign the settings page using shadcn
Parse $ARGUMENTS to extract:
If no arguments provided, ask the user:
Before spawning agents, generate N distinct approaches. These should be meaningfully different, not just cosmetic variations.
Example for "redesign the settings page":
Example for "implement caching":
Present the angles to the user for approval before spawning. The user may adjust, add, or remove angles.
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.
Wait for all agents to complete. As each finishes, collect:
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).
Ask the user: "Which variant do you want to keep?"
Options:
If single winner:
git worktree remove)If cherry-pick:
If none:
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/null
package.json scripts (dev, start, serve) or common framework commands to determine if/how to start a preview serverdevelopment
Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts. Also use proactively when you are about to render a complex ASCII table (4+ rows or 3+ columns) — present it as a styled HTML page instead.
development
Expert coach for learning, mastering, and upskilling in any domain. Use when the user wants to learn, master, improve, upskill, get better at, or get coached on any topic. Helps build consistent practice habits, identify prerequisites, design efficient learning loops, avoid common pitfalls, maintain discipline, and measure progress. Based on evidence-based principles from "Advice on Upskilling" by Justin Skycak.
development
Cognitive engagement coach based on "Think First, AI Second" principles. This skill should be used when the user asks strategic, architectural, or high-stakes questions, OR when they explicitly request challenge/critique (e.g., "poke holes", "devil's advocate", "challenge this"). Promotes active thinking over passive AI consumption.
development
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.