dispatch
Skill2 starsChanged 4 months agoMITView on GitHub
Use when dispatching background subagents for substantial tasks, especially fanning out parallel work that needs progress checkpointing.
40 other projects use a version of this.
Adopted by
Most recently taken up by
- renzrollon/interlocktheir own version, first seen Nov 5, 2026
- dan-myles/skillstheir own version, first seen Nov 1, 2026
- bestony/skillstheir own version, first seen Nov 1, 2026
- AcKeskin/contexturetheir own version, first seen Nov 1, 2026
- mhlaghari/stuntmantheir own version, first seen Nov 1, 2026
- vu1n/pillboxtheir own version, first seen Oct 26, 2026
Used with
Projects with it also use edge-detection, odds-analysis and 8 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.
noahowshSkilledge-detection
Comparing a tennis model's probability with the market: no-vig close, expected value at the best available price, closing line value, fractional Kelly sizing, and the checks that separate an estimated edge from noise. Use when the user has a probability and wants to know whether a price is better than fair, how large a stake is reasonable, or whether an edge is real. Requires a probability the user trusts. Do not use for fetching prices: see odds-explorer. Do not use for devig math alone: see odds-analysis. Do not use for historical testing: see backtesting.
Also in 4 projects that use this
noahowshSkillodds-analysis
Odds math for two-way tennis markets: American to implied probability, margin, devigging (multiplicative, power, Shin), no-vig fair odds, consensus across books, favorite-longshot bias, and expected value of a price. Use when the user asks what a price implies, how to remove the vig, what the true probability is, or how to compare books. Do not use for fetching or comparing live prices: see odds-explorer. Do not use for deciding a bet against a model: see edge-detection.
Also in 4 projects that use this
agiprolabsSkillwalk-forward-validation
Walk-forward validation framework for trading strategies and ML models with time-series-aware splits, overfit detection, and regime-aware validation
Also in 4 projects that use this
Yahmez3Skillbacktesting
Use when backtesting a trading strategy — evaluating a signal series against historical price data and computing performance metrics (Sharpe, Sortino, max drawdown, CAGR, win rate, expectancy). Triggers on "backtest this strategy", "what's the Sharpe on X", "run a walk-forward test", or "compare strategies A and B". Produces equity curves, trade logs, and tear sheets.
Also in 4 projects that use this
ffsshhttiikkSkillfeature-engineering
Machine learning feature engineering
Also in 4 projects that use this
varun29ankuSSkillorchestrate
This skill should be used when the user asks to 'orchestrate a task', 'break down work into parallel agents', 'coordinate subtasks', 'run agents in parallel', or mentions 'multi-agent'. Decomposes complex tasks into tracked subtasks, dispatches parallel subagents, and coordinates until completion.
Also in 4 projects that use this
- +3 more from noahowsh
Other versions40 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 40
- your-papa/obsidian-Smart2Brain★ 1.3ksame name
- s2b-dev/smart-second-brain★ 1.3ksame name
- bassimeledath/dispatch★ 411same name
- renzrollon/interlock★ 61same name
- fagemx/edda★ 36same name
- phj128/autoworker★ 18same name
- clonable-eden/cekernel★ 17same name
- mhlaghari/stuntman★ 16same name
- YippeeXuXu/dsh-collab-mode★ 5same name
- BigY0shi/super-skills★ 4same name
30 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 repository27 other files it gives its agents.
- capture-collaboration-evidenceSkill
- clarify-before-buildingSkill
- cross-platform-project-build-archSkill
- deep-code-reviewSkill
- erect-agent-stackSkill
- fix-zig-deps-hashSkill
- gather-project-intentionsSkill
- handoffSkill
- i18nSkill
- lean4-developmentSkill
- llvm-guided-optimizationSkill
- mechatron-ciSkill
- memoriesSkill
- mficSkill
- no-ai-slopSkill
- onboardSkill
- performance-profilingSkill
- planning-workSkill
- scaffold-zig-projectSkill
- shipSkill
- test-isolationSkill
- universal-app-frontendSkill
- walking-decisionsSkill
- writing-bendSkill
- writing-nixSkill
- writing-rocSkill
- zig-microbenchmarksSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 18 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 38 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
After every completed checklist item OR after every 5 tool calls (whichever first), re-write the file with updated checkboxes and append …
- Very specific: line 52
Before you finish (whether success, partial success, or stuck), write /tmp/dispatch-log/<slug>-final.md containing:
- Distinctive: line 59
Before/after measurements if relevant
- Very specific: line 72
NEVER use sleep N && tail ...
- Distinctive: line 73
NEVER sleep to "wait for a build to finish" — use run_in_background.
- Distinctive: line 82
If you suspect another agent is concurrently editing the same files:
- Distinctive: line 86
If a build is broken by a peer's WIP, say so explicitly in the progress doc instead of silently fixing it.
- Distinctive: line 88
If you're about to touch shared infrastructure (top-level build files, dependency manifests, lockfiles, CI config), re-read the file …
- Very specific: line 95
Before doing manual work, check if a project-local or user-level skill already solves it (run Skill tool list at session start, or check …
- Distinctive: line 99
Commit + push + CI-watching when work is done.
- Distinctive: line 104
Write a failing test FIRST that expresses the expected behavior.
- Distinctive: line 105
Run it, confirm it fails (if it passes, the test is wrong).
- Distinctive: line 106
Write the minimal implementation to pass.
- Distinctive: line 107
Run it, confirm pass.
- Distinctive: line 108
Run the full project test suite, confirm no regressions.
- Distinctive: line 109
Only commit if all tests pass.
- Very specific: line 131
If you are running inside a git worktree AND the parent project has a .codescan/ index, clone it into the worktree's root and start a local …
- Distinctive: line 160
Run this as the first thing in the worktree, before any codescan tool call or edit.
- Very specific: line 173
Run this BEFORE writing the final report (so the report can confirm the watcher state) but AFTER your last codescan tool call.
- Very specific: line 178
If you crash or hit a turn-budget cutoff before reaching teardown, the parent will reap orphaned watchers via codescan watcher status — not …
- Distinctive: line 185
When parallel agents would modify shared build files or manifests, the parent may allocate separate worktrees within the repository-wide …
- Distinctive: line 193
Default limits are five registered working checkouts (including the primary) and five local branches (including the primary), shared by …
- Distinctive: line 221
After one or more agents complete, the parent should:
- Very specific: line 223
Read each agent's <slug>-final.md (small, bounded — safe).
- Distinctive: line 226
If an agent was cut off, spawn a summarizer on its JSONL transcript:
- Very specific: line 237
Use short, kebab-case, task-indicative slugs.
“Common” is measured: kept by at least 6 in 10 of the 38 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
Dispatch
Wraps subagent dispatch with a standard discipline preamble. The goal is that any agent you fan out, whether one or five, behaves predictably: it keeps state externalized, fails honestly, and leaves a trail even if cut off.
<when_to_use>
- Dispatching any subagent for non-trivial work (> 5 minutes of expected wall-time).
- Fanning out 2+ parallel agents, especially when they'll touch shared infrastructure (build files, lockfiles, dependency manifests, top-level config — anything multiple agents would want to edit at once).
- Tasks where turn-budget cutoff is a realistic risk (large dependency integrations, cross-platform validation, multi-step debugging). </when_to_use>
<when_not_to_use> Simple one-shot queries ("summarize this file", "count foo in bar") — the overhead isn't worth it. Use Agent directly. </when_not_to_use>
<invocation>
The skill doesn't have a dedicated CLI; it's a prompt-composition discipline. When the user or the parent agent decides to dispatch, this skill's **Preamble** (below) gets prepended to the task prompt before it goes to `Agent(...)`. For parallel fan-outs, optionally use git worktrees per agent (see *Worktree isolation* below).
</invocation>Preamble (inject into every dispatched prompt)
<template>
## Dispatch discipline (from /dispatch skill)State externalization — MANDATORY
At the very start, create a progress doc at /tmp/dispatch-log/<slug>-progress.md
with this template:
# <task> — progress log
Agent ID: <the id printed after spawn>
Started: <iso8601 timestamp>
Brief: <one sentence describing the task>
## Plan checklist
- [ ] <first concrete step>
- [ ] <second>
- [ ] ... (fill in before you start)
## Activity log
<append one line with timestamp + 5-15 words per meaningful step>After every completed checklist item OR after every 5 tool calls (whichever first), re-write the file with updated checkboxes and append the new activity lines. If you hit a turn-budget cutoff, this file is the only trail we have — treat it as the most important output after the actual code.
Final report — MANDATORY, even if incomplete
Before you finish (whether success, partial success, or stuck), write
/tmp/dispatch-log/<slug>-final.md containing:
- Status (done / partial / blocked)
- Where you stopped and why
- Files created/modified/reverted (with paths)
- Commits (with hashes) if any
- Before/after measurements if relevant
- What went wrong and pitfalls to warn the next agent
- Minimum next-steps for a retry"I got 80% done and ran out" with a clear list is MUCH more valuable than a polished summary that papers over failures.
Harness wait patterns
- Long-running commands: use
run_in_background: trueon Bash, THEN wait for the completion notification. You are automatically told when a background task finishes — do not poll. - Multiple events from a running process: use Monitor with a proper
untilloop that emits on every terminal state, not just success. - NEVER use
sleep N && tail ...— the harness explicitly blocks it. - NEVER sleep to "wait for a build to finish" — use run_in_background.
Peer-agent coordination (for parallel dispatches)
The parent owns branch/worktree allocation. Use only the assigned checkout and branch; request an allocation from the parent before creating another. Do not enable automatic worktree isolation when an assigned worktree already exists. Report the final commit, remaining uncommitted work and cleanup readiness before returning; the parent integrates results and retires the allocation safely.
If you suspect another agent is concurrently editing the same files:
- Never revert another agent's uncommitted work to clean your build. Preserve your own changes and request a parent-owned worktree allocation or coordinate a wait; do not destroy theirs or allocate an extra checkout yourself.
- If a build is broken by a peer's WIP, say so explicitly in the progress doc instead of silently fixing it. The parent will reconcile.
- If you're about to touch shared infrastructure (top-level build files, dependency manifests, lockfiles, CI config), re-read the file IMMEDIATELY before each edit — version snapshots go stale under concurrent writes. Tools that edit by line number or content hash will silently no-op on version mismatch.
Project skills — USE THEM
Before doing manual work, check if a project-local or user-level skill
already solves it (run Skill tool list at session start, or check
~/.claude/skills/). Common reusable ones include skills for:
- Dependency / lockfile hash recovery after a failed build.
- Commit + push + CI-watching when work is done.
- Microbenchmark setup for perf-sensitive paths.
TDD discipline
For bugfixes and new features:
- Write a failing test FIRST that expresses the expected behavior.
- Run it, confirm it fails (if it passes, the test is wrong).
- Write the minimal implementation to pass.
- Run it, confirm pass.
- Run the full project test suite, confirm no regressions.
- Only commit if all tests pass.
Exception: pure refactors under adequate existing coverage.
Honest-failure preference
A commit that says "I got to X, Y remains because Z" is always better than a commit that LOOKS done but isn't. If you can't make tests pass, don't commit; report what's broken. If you can't add a feature cleanly, don't half-add it; report why and what the clean path would be.
Time calibration
LLM wall-time ≠ human wall-time. Tasks that a human would estimate as "1-2 weeks" are often a single session for you. Don't pre-decide a task is too big — start, make progress, report where you got.
Coding standards (when touching this repo)
Refer to CLAUDE.md / AGENTS.md / CONTRIBUTING.md in the project root
for project-specific conventions (indentation, naming, comment style,
test conventions). When in doubt, mirror the surrounding code. Avoid
mocking the thing under test; prefer deterministic, seeded tests.
Codescan worktree co-location (run ONCE at agent startup)
If you are running inside a git worktree AND the parent project has a
.codescan/ index, clone it into the worktree's root and start a local
watcher. Without this, codescan tools resolve paths against the parent's
index and your edits leak there instead of staying in your worktree.
# Detect parent .codescan/ — walk up from the worktree root until found.
PARENT_CODESCAN=""
# Locate the worktree/repo root; Git is the supported SCM.
# walk up until a .git file (worktree) or dir (repo) is found.
DIR="$PWD"; while [ "$DIR" != "/" ] && [ ! -e "$DIR/.git" ]; do DIR="$(dirname "$DIR")"; done
[ -e "$DIR/.git" ] || DIR=""
while [ -n "$DIR" ] && [ "$DIR" != "/" ]; do
PARENT="$(dirname "$DIR")"
if [ -d "$PARENT/.codescan" ]; then
PARENT_CODESCAN="$PARENT/.codescan"
break
fi
DIR="$PARENT"
done
if [ -n "$PARENT_CODESCAN" ] && [ ! -d "./.codescan" ]; then
# APFS clonefile — instant, ~zero disk until divergence.
cp -c -R "$PARENT_CODESCAN" ./.codescan 2>/dev/null \
|| cp -R "$PARENT_CODESCAN" ./.codescan # non-macOS fallback
codescan watch start 2>/dev/null || true
fiRun this as the first thing in the worktree, before any codescan tool call or edit. Idempotent — safe to skip if already done.
Codescan watcher teardown (run as part of final report)
Pair the startup with a teardown. Watchers outlive the worktree if not explicitly stopped, and orphaned watchers are wasteful (they keep re-indexing a directory tree that may be about to be cleaned up).
# In the same shell where the worktree's .codescan exists:
codescan watch stop 2>/dev/null || trueRun this BEFORE writing the final report (so the report can confirm
the watcher state) but AFTER your last codescan tool call. The
worktree's .codescan/ directory itself goes with the worktree on
cleanup-on-no-changes; only the watcher process needs explicit stop.
If you crash or hit a turn-budget cutoff before reaching teardown,
the parent will reap orphaned watchers via
codescan watcher status — not catastrophic, just untidy.
</template>
Worktree isolation (for parallel fan-outs touching shared infra)
When parallel agents would modify shared build files or manifests, the parent may allocate separate worktrees within the repository-wide budget. Inspect existing allocations first and reuse a suitable one. Automatic harness isolation also consumes a slot; never request it without accounting for the resulting worktree and any new branch. If no slot is free, integrate and safely retire completed work or serialize the tasks. Isolation does not require a new checkout for every short review or research subtask.
Default limits are five registered working checkouts (including the primary)
and five local branches (including the primary), shared by every agent using
the same Git common directory. Warn at four, announce the maximum at five, and
block an increase beyond five. Remote-tracking refs do not count. The owner can
configure agentLimits.maxBranches and agentLimits.maxWorktrees independently;
agents must not raise limits or bypass the gate to finish an assignment.
PATH-based Git enforcement is an accident control, not an OS permission boundary;
custom harnesses or libraries must honor the same allocation contract.
Use Git worktrees for both tool-driven and manual isolation; do not create Jujutsu workspaces. Inspect git worktree list --porcelain and preserve uncommitted files and unpublished commits before authorized cleanup with git worktree remove. A detached review or build worktree can be intentional: do not attach it to a branch already used by another checkout or remove it merely because HEAD is detached.
<remember>
Worktrees separate working files, but still share refs and repository state.
The parent must coordinate integration, limits and cleanup across all of them.
</remember>Codescan + worktrees
A subtle gotcha: codescan resolves the project root by walking up the directory tree until it finds the nearest .codescan/. Without intervention, an agent in a worktree finds the parent project's .codescan/ (because the worktree itself doesn't have one) — and codescan's path-edit tools land back on the parent's main checkout, leaking edits out of the agent's worktree.
The preamble's "Codescan worktree co-location" step fixes this by clonefile-copying the parent's .codescan/ into the worktree at agent startup and starting a local watcher. The clone is near-zero disk on macOS APFS and gets cleaned up with the worktree.
<important>
This behavior is automatic via the preamble. You do NOT need to do it manually before dispatching — the agent runs the snippet itself as its first action. But if the dispatch is on a system without `.codescan/` indexing, the snippet is a no-op. Confirm codescan is the active path-resolution tool before relying on it.
</important>Post-dispatch review (for the parent agent)
After one or more agents complete, the parent should:
- Read each agent's
<slug>-final.md(small, bounded — safe). - Cross-check that final claims match
git log,git statusand the actual file state. - For parallel dispatches, check whether any agent reverted another's work and whether that revert was intentional.
- If an agent was cut off, spawn a summarizer on its JSONL transcript:
<example>
Summarize `/private/tmp/claude-.../tasks/<agentId>.output`. Report what got built, what was reverted, where it stopped, and minimum next-steps.
</example>(The summarizer's output fits in your context even though the raw JSONL would overflow.)
Slug naming
<important>
Use short, kebab-case, task-indicative slugs. Good: `auth-refactor`, `pdf-streams`, `api-rate-limit`. Bad: `task-1`, `agent-2`, `foo`.
</important>The slug appears in both progress and final doc paths and becomes the parent's primary handle for reviewing the work.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

