Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a claude-code
Open on GitHub

What 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, one taskId per lane
  • Send a reviewer to task 5.4 and keep a single taskId in 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-code

2Manually: put the files in place

~/.claude/skills/gate-attribution/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gate-attribution/

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.

From the same set121

The whole set →
running-tests running-tests — a skill to safely run tests in opencode-swarm from Claude Code, Codex, or OpenCode. Runs focused tests, checks file isolation, validates changes as in CI, and diagnoses errors without stalling the session. CX Codex +1 ★ 539repo stars widen-return-type widen-return-type — a TypeScript skill for widening a function's return type with overloads, so callers keep their narrow types. CX Codex +1 ★ 539repo stars swarm-pr-review The swarm-pr-review skill for Claude Code and Codex is a thin adapter for swarm pull request reviews that delegates execution to the canonical workflow in .opencode. CX Codex +1 ★ 539repo stars spread-real-module-exports-as-base-of-every-mock-module-return-o spread-real-module-exports-as-base-of-every-mock-module-return-o is a Claude Code skill that sets a pattern for objects returned by mock.module. It activates around that pattern and Node’s built-in mocking. CX Codex +1 ★ 539repo stars swarm-implement Adapts the canonical opencode-swarm implementation workflow for multi-file features, refactoring, and structured validation. CX Codex +1 ★ 539repo stars opt-in-tool-registration The opt-in-tool-registration skill sets a pattern for registering opt-in tools through a separate map and conditional merging in agents/index.ts. Use it when adding a feature controlled by a flag. CX Codex +1 ★ 539repo stars ensure-all-tests-pass-after-code-changes ensure-all-tests-pass-after-code-changes — a skill that keeps the agent honest about tests: run them after an edit, and don't hand a failing branch to review. Test updates ship with the code. CX Codex +1 ★ 539repo stars codebase-review-swarm codebase-review-swarm executes quote-grounded codebase audits across security, QA, and performance. Suitable for full-repository assessments where no source files may be touched. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open