run
Skill2 starsChanged 9 months agoMITView on GitHub
Ephemeral parallel executor. Spawns agents in worktrees, serializes merges. Used by /think or standalone.
23 other projects use a version of this.
Adopted by
Most recently taken up by
- GavinGreenwood/agentic-workflow-templatetheir own version, first seen Oct 2, 2026
- NVIDIA/nvcftheir own version, first seen Oct 1, 2026
- talayash/spring-fleettheir own version, first seen Sep 29, 2026
- mindattic/Prosetheir own version, first seen Sep 26, 2026
- wangqiqi/cursor-aitheir own version, first seen Sep 23, 2026
- JinukMoon/oh-my-mliptheir own version, first seen Sep 21, 2026
Used with
Projects with it also use debug, review and 1 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.
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 4 projects that use this
BlockSkillplan
Draft a TDD, PRD, or lightweight plan in the conversation without committing it.
Also in 3 projects that use this
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 23
- NVIDIA/nvcf★ 230same name
- jjanczur/tyran★ 81same name
- Hassaan146/claude-skills★ 18same name
- Aloim/phaneslightplugin★ 5same name
- GavinGreenwood/agentic-workflow-template★ 4same name
- JinukMoon/oh-my-mlip★ 4same name
- mindattic/Prose★ 4same name
- Zmoki/zmoki-astro-starter★ 4same name
- wangqiqi/cursor-ai★ 3same name
- csiddhant796-blip/claude-skills-collection★ 2same name
13 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 repository18 other files it gives its agents.
- affirmationSkill
- auditSkill
- councilSkill
- doSkill
- gitSkill
- infoSkill
- kill-playgroundSkill
- memorySkill
- mergeSkill
- opsSkill
- qSkill
- refineSkill
- scopeSkill
- sim-sourceSkill
- stateSkill
- thinkSkill
- ui-brainSkill
- worktree-managerSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 74
Use the provided list directly, skip splitting.
- Very specific: line 122
Batch processing: If tasks > --workers, spawn first batch.
- Very specific: line 128
Wait for all spawned agents to return.
- Distinctive: line 140
After all workers complete, run specialist review agents against each completed worktree.
- Very specific: line 244
Ensure $TARGET_BRANCH is checked out at the end.
- Distinctive: line 258
If any tasks have unresolved review issues, print them after the summary so the user can address them manually.
- Very specific: line 278
If no /run is active: "No active /run session."
- Very specific: line 297
Merge conflict cascade: If task 001 conflicts, tasks 002+ may also conflict (they were based on the same target).
- Distinctive: line 304
Always rebase before merge: Every branch gets rebased onto latest target before merging.
- Distinctive: line 306
One agent per task: No drain loops, no relay, no queue files.
“Common” is measured: kept by at least 6 in 10 of the 19 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
Run
Parallel execution with serialized merges. Spawns agents in isolated worktrees, waits for completion, then rebases and merges each result sequentially — eliminating merge race conditions.
/run {instructions} — analyze, split, spawn, merge
/run status — show active agents and progressFlags:
--workers N— max concurrent agents (default 3, max 5)
When to use /run vs /do vs /q
/run | /do | /q | |
| Tasks | 1–N parallel | 1 | 1–N parallel |
| Persistence | Ephemeral | Ephemeral | Queue files (survives interruption) |
| Merge owner | Orchestrator (serialized) | Self (with confirmation) | Self or /scope orchestrator |
| Use when | Local parallel work, /think | Quick single change | Tracked work, /scope |
Flow
/run {instructions}
│
ANALYZE — split into file-disjoint tasks
│
SPAWN — create worktrees, launch agents (up to --workers)
│
MONITOR — wait for agents to complete
│
REVIEW — specialist agents review each worktree (read-only)
│
MERGE — sequential rebase + merge for each completed branch
│
CLEANUP — remove worktrees, report resultsPhase 1: ANALYZE
Record target branch: git rev-parse --abbrev-ref HEAD → $TARGET_BRANCH.
Standalone (/run {instructions}):
- Research the codebase to understand scope
- Split into file-disjoint tasks (each touches different files)
- Print task list:
/run — {N} tasks ───────────────────────── 001: {title} — {files} 002: {title} — {files} 003: {title} — integration Target: {$TARGET_BRANCH}
Called with pre-split tasks (from /think):
- Use the provided list directly, skip splitting.
/thinkpasses the full plan text./runparses numbered steps into tasks.
Phase 2: SPAWN
For each task (up to --workers N concurrent):
- Create worktree:
git worktree add -b run-{NNN} .worktrees/run-{NNN} $TARGET_BRANCH ln -sf "$(pwd)/node_modules" .worktrees/run-{NNN}/node_modules - Spawn agent:
Agent( prompt: <worker prompt below>, mode: "bypassPermissions", description: "run: {first 5 words of task}" )
Worker prompt:
You are a worker. Execute this task completely:
{task instructions}
Your working directory is: {absolute path to worktree}
All file reads, edits, and git commands MUST use this directory.
Do NOT modify files outside this worktree.
Do NOT merge to any branch. Just commit your work.
Rules:
- Implement the task fully. Do not ask questions.
- Commit your work with a conventional commit message.
- If you encounter a blocker you cannot resolve, commit what you have
and note the blocker in your commit message.
- Read any relevant CONSTITUTION.md, *.spec.md, or *.ai.md files
before making changes.
- All styling via STL (styled() or stl prop). No plain style={}.
- Use STL shorthands (bg, p, px, radius, etc).Launch all agents in a single batch — multiple parallel Agent() calls in one message. This maximizes concurrency.
Batch processing: If tasks > --workers, spawn first batch. After that batch completes and merges, spawn next batch. Each batch gets the latest target (including prior batch merges).
Phase 3: MONITOR
Wait for all spawned agents to return. The Agent tool returns when each agent completes — this is the completion signal. No relay needed.
Track status per task:
·Pending (not yet spawned)⟳Running (agent spawned, waiting for return)✓Done (agent returned successfully)✗Failed (agent returned with error)
Phase 4: REVIEW
After all workers complete, run specialist review agents against each completed worktree. Reviews are read-only — they produce verdicts, not edits.
Reviewer selection
The orchestrator selects reviewers conservatively per task: include by default, skip only when clearly irrelevant. Use the task description and changed files to decide.
| Agent | Skip when |
design-critic | No UI/visual changes (e.g. pure logic, config, build scripts) |
a11y-reviewer | No interactive/visible UI changes |
stl-enforcer | No files importing STL or using styled()/stl prop |
bundle-checker | No new dependencies and no new exports |
ui-tester | No UI changes, or no .claude/test-context.md in repo |
test-writer | Tests already included by worker, or task is test-only |
Reviewers with the Output Contract (design-critic, a11y-reviewer, stl-enforcer, bundle-checker) end their response with a fenced ```json block for machine consumption. ui-tester and test-writer return prose/artifacts.
When in doubt, include the reviewer. False positives (reviewer says "pass") are cheap. Missed issues are expensive.
Execution
For each completed worktree, spawn selected review agents in parallel (they're read-only, no conflicts):
Agent(
name: "{reviewer}-run-{NNN}",
prompt: "Review the changes in {worktree path}. Focus on files: {changed files list}.",
// model + effort inherited from agent definition
)Verdicts
For contract reviewers, parse the fenced ```json block at the end of each response:
{ "severity": "ok|warning|error", "blocking": true, "summary": "...", "findings": [...] }Aggregate per task:
| Aggregate | Action |
All severity: "ok" (and any prose reviewers clean) | Proceed to MERGE |
Warnings only, no blocking: true | Proceed to MERGE, surface warnings in results summary |
Any blocking: true | Re-spawn worker with collected findings, max 1 retry, re-review |
| Still blocking after retry | Proceed to MERGE anyway, flag blocking findings prominently in results summary |
Agent(
prompt: "Fix these review issues in {worktree path}:\n\n{collected findings}\n\nCommit fixes.",
mode: "bypassPermissions"
)Malformed or missing JSON block from a contract reviewer → treat as warning, surface in summary, never retry on malformed output.
Phase 5: MERGE
Sequential, in task-number order. This is the core serialization guarantee.
For each completed task (in order 001, 002, 003...):
# Ensure we're on the target branch
git checkout $TARGET_BRANCH
# Incorporate any remote changes + prior merges
git fetch origin $TARGET_BRANCH 2>/dev/null || true
git rebase origin/$TARGET_BRANCH 2>/dev/null || true
# Rebase the worker branch onto latest target (includes prior task merges)
git checkout run-{NNN}
git rebase $TARGET_BRANCH
git checkout $TARGET_BRANCH
# Merge with merge commit
git merge --no-ff run-{NNN} -m "merge: run-{NNN} {task-title}"On rebase conflict:
- Skip this task
- Record conflict details
- Continue with remaining tasks
- Report at end
On agent failure (no commit):
- Skip, record failure, continue
No push. /run operates locally. Push is the caller's responsibility.
Phase 6: CLEANUP
For each task (merged, skipped, or failed):
git worktree remove .worktrees/run-{NNN} --force 2>/dev/null
git worktree prune
git branch -D run-{NNN} 2>/dev/nullEnsure $TARGET_BRANCH is checked out at the end.
Print results:
/run complete
─────────────────────────
✓ run-001: {title} — merged (reviews: all pass)
✓ run-002: {title} — merged (reviews: pass after retry)
⚠ run-003: {title} — merged (reviews: 1 unresolved issue)
✗ run-004: {title} — conflict (skipped)
Target: {$TARGET_BRANCH}If any tasks have unresolved review issues, print them after the summary so the user can address them manually.
/run status
Show current state:
/run — active
─────────────────────────
Target: {$TARGET_BRANCH}
Workers: 2/3
✓ run-001: {title} — merged
⟳ run-002: {title} — running
⟳ run-003: {title} — running
· run-004: {title} — pendingIf no /run is active: "No active /run session."
Error Recovery
Orchestrator interrupted (leftover worktrees):
# List orphaned run worktrees
git worktree list | grep 'run-'
# Clean up
git worktree remove .worktrees/run-{NNN} --force
git worktree prune
git branch -D run-{NNN}Agent dies mid-task: The Agent tool returns (with error). /run records the failure and continues with remaining tasks. No orphan recovery protocol needed — /run owns the full lifecycle.
Merge conflict cascade: If task 001 conflicts, tasks 002+ may also conflict (they were based on the same target). /run continues attempting remaining merges — some may succeed if they touch different files.
Rules
- Never push. Local merges only. Caller pushes if needed.
- Always rebase before merge. Every branch gets rebased onto latest target before merging.
- Sequential merge order. 001 before 002 before 003. Never parallel merges.
- One agent per task. No drain loops, no relay, no queue files.
- Session-tracked. Registered with
stateMCP for/statedashboard visibility.session_start(skill: "run", repo: {cwd})at ANALYZE,session_checkpointat SPAWN/MERGE,session_completeat CLEANUP. If interrupted, worktrees may remain —/stateshows the stale session; user cleans up or/rundetects them on next invocation. - Never use
Agent(isolation: "worktree")— it branches fromorigin/main, not the target branch. Always create worktrees manually. - File-disjoint tasks. Each task must touch different files for safe parallel execution.
- Target = current branch.
/runmerges to whatever branch is checked out when invoked.
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.

