gate-attribution · zaxbyhub, generated — Claude Code skill: per-task gate dispatch
gate-attribution sets the rule that keeps reviewer and test_engineer checks attributable: one taskId per dispatch, with lanes run in parallel to save overhead.
MIT ★ 539 updated 2026-10-29
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a claude-codeWhat gate-attribution does
The skill records a single rule for the gate tracker. A reviewer or test_engineer dispatch counts per task only when the prompt carries exactly one taskId. A batch covering several tasks does not count, even when every task gets its own verdict.
The protocol has four steps. Each task that needs a gate gets its own dispatch with one taskId in it. To keep overhead down, dispatch_lanes_async takes a shared common_prompt plus one lane per task, with max_concurrent set up to 3. Every lane result lands on its own taskId automatically.
Trivial ceremony checks, a one-line doc fix for instance, use a short prompt template that names the task and runs skill-mirrors.test.ts for PASS or FAIL. The reason sits in src/hooks/delegation-gate.ts: delegation chains are keyed by taskId, so a prompt listing several ids creates no separate chains and the gate never registers.
What it helps with
- keep gate dispatches tied to a single task
- run reviewer and test_engineer checks for several tasks in parallel without losing attribution
- shrink the prompt for a documentation-only gate
- debug why a delegation chain never shows up in the gate tracker
- split a batched review into per-task lanes
Example prompts for the agent
- Fan the reviews for tasks 3.1 and 3.2 out through
dispatch_lanes_async, onetaskIdper lane - Send a reviewer to task 5.4 and keep a single
taskIdin the prompt - Run the short doc gate on task 2.1:
skill-mirrors.test.ts, PASS or FAIL
How to install gate-attribution
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a claude-code2Manually: put the files in place
~/.claude/skills/gate-attribution/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gate-attribution/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a codex2Manually: put the files in place
.agents/skills/gate-attribution/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a cursor2Manually: put the files in place
.cursor/skills/gate-attribution/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ZaxbyHub/opencode-swarm .opencode/skills/generated/gate-attribution2Manually: put the files in place
.github/skills/gate-attribution/SKILL.md1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a gemini-cli2Platform CLI
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .opencode/skills/generated/gate-attributionManually: put the files in place
.devin/skills/gate-attribution/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about gate-attribution
How do I install gate-attribution in Claude Code?
Run npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a claude-code. The skill then sits at ~/.claude/skills/gate-attribution/SKILL.md.
What is gate-attribution for?
It states the one-taskId-per-dispatch rule for reviewer and test_engineer gates and shows how to spread checks across parallel lanes with dispatch_lanes_async.
Why does a batched reviewer dispatch over several tasks fail the gate?
The tracker in src/hooks/delegation-gate.ts keys delegation chains by taskId, and a prompt with several ids produces no separate chains.
Source text
SKILL.md · MIT
--- name: gate-attribution description: Per-task gate dispatch protocol. Documents the single-taskId attribution rule and parallel-lane optimization for reviewer/test_engineer gates. --- # Gate Attribution ## The rule The gate tracker attributes reviewer/test_engineer dispatches PER TASK (single taskId in the prompt). Set-dispatches covering multiple tasks do NOT count per-task, even with per-task verdicts. ## Protocol 1. **For each task requiring a gate:** Dispatch a separate reviewer and/or test_engineer with exactly ONE taskId 2. **Minimize overhead via parallel dispatch:** ``` dispatch_lanes_async with: - common_prompt: shared verification context - lanes: one lane per task, each with a single taskId - max_concurrent: up to 3 ``` 3. **Collect + attribute:** Each lane result auto-attributes to its taskId 4. **Do NOT batch:** Even for identical reviews, dispatch separately ## Optimization for trivial tasks For pure ceremony gates (1-line doc fix): ``` TASK: Verify task X.Y. Run skill-mirrors.test.ts. PASS/FAIL. taskId: X.Y ``` ## Why this exists The gate tracker (`src/hooks/delegation-gate.ts`) keys delegation chains by taskId. Multi-taskId prompts don't create separate chains. Tracked in issue #1746 item 6.
© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm
Similar skills
All skills for Agent setup: memory, context, orchestration →gate-attribution by other authors comes first.