К основному содержанию
скилл CX Codex

swarm-implement · zaxbyhub, opencode — скилл для Claude Code: что делает и как установить

Скилл swarm-implement ведёт фичу, багфикс или рефакторинг роем: параллельная разведка, план с границами, независимое ревью дифа и финальный критик.

MIT ★ 539 обновлён 2026-10-29

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add ZaxbyHub/opencode-swarm --skill swarm-implement -a claude-code
Открыть на GitHub

Что делает swarm-implement

Скилл ведёт задачу по лестнице: параллельная разведка по репозиторию, план с границами, правки мелкими кусками, затем объективная проверка. Любая правка в рабочем дереве проходит независимого ревьюера по свежему диффу и отдельного критика после его одобрения — без этого работа не считается законченной.

Перед вызовом субагентов скилл требует чистого дерева (git status --porcelain) и выкаченной ветки PR: агенты читают файлы из рабочей копии, а не из истории, поэтому устаревший checkout уводит разведку на базовую ветку. Каждому субагенту в промпт попадает запрет на git stash, git reset, git restore и git checkout -- .: это операции над всем деревом, и они молча стирают работу соседних агентов.

Записи ограничиваются через declare_scope({ taskId, files, replace_existing: true }) — в списке должны быть и генерируемые файлы вроде dist/* или bun.lock. Ответ SCOPE_CONFLICT лечится сужением конфликтующего источника, а не расширением области: раздутый scope скрывает неточный план.

Какие задачи решает

  • провести многофайловый рефакторинг, не потеряв контекст
  • разложить фичу на куски, которые ревьюер успевает прочитать
  • поймать конфликт областей записи до того, как агенты затрут друг друга
  • отделить объективную проверку от самооценки кодера
  • собрать отчёт: что изменилось, что проверено, что осталось рискованным

Примеры запросов агенту

  • /swarm-implement переведи очередь ретраев на новый клиент, начни с тестов в src/queue/
  • /swarm-implement отрефактори платёжный модуль и прогони по диффу ревьюера с критиком
  • /swarm-implement добавь вход через OAuth, код авторизации разведай параллельно

Как установить swarm-implement

1Через Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill swarm-implement -a claude-code

2Вручную: положить файлы

~/.claude/skills/swarm-implement/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/swarm-implement/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о swarm-implement

Как установить swarm-implement в Claude Code?

Выполните npx skills add ZaxbyHub/opencode-swarm --skill swarm-implement -a claude-code, скилл появится в ~/.claude/skills/swarm-implement/SKILL.md.

Что делает swarm-implement?

Проводит задачу через параллельную разведку, план, мелкие правки и проверку. Изменения в рабочем дереве проходят независимого ревьюера по последнему диффу и отдельного критика после одобрения.

Какие инструменты нужны скиллу?

Он вызывает declare_scope и prepare_pr_workflow_checkout контроллера и подгружает file:.swarm/bundled-skills/parallel-work-check/SKILL.md. Без этих вызовов фазы разведки и записи не пройдут.

Исходный текст

SKILL.md · MIT
---
name: swarm-implement
description: Execute complex implementation work with a swarm-like workflow: parallel exploration, scoped planning, objective validation, mandatory independent implementation review for changed work, and final critic approval. Use for feature work, bug fixes, refactors, and multi-file changes.
disable-model-invocation: true
metadata:
  audience: swarm-plugin
---

# /swarm-implement

Use this skill for implementation work when you want a fast, high-quality swarm
workflow rather than a single-threaded assistant.

## Purpose

Complete real coding tasks while preserving speed and adding swarm-style quality
discipline.

## Core operating model

Use this execution ladder:

1. Explore in parallel.
2. Build a scoped plan.
3. Implement in small, coherent units.
4. Run objective validation.
5. For any worktree edit, use independent reviewer validation on the latest diff
   and evidence.
6. For any worktree edit, use a separate final critic after reviewer approval.
7. Synthesize and report what changed, what was verified, and what remains risky.

## Command Namespace

Swarm commands always use `/swarm <subcommand>`. Never invoke bare subcommand
names that collide with host commands such as `/plan`, `/reset`, `/checkpoint`,
or `/status`.

## High-risk work

Always use the deeper validation path for auth, permissions, payments,
destructive actions, dependency changes, public APIs, schemas, migrations,
concurrency, queues, retries, state machines, caching, file access, subprocesses,
parsing, secrets, security-sensitive logic, and large cross-file refactors with
correctness risk.

## Recommended workflow

### Phase 0 - Establish scope

Determine the exact task scope first:

- what changed or needs to change,
- what files are likely involved,
- what success looks like,
- what must not be broken,
- what verification is required.

If the task is unclear, ask targeted questions or create a short written plan
before coding.

### Phase 0a - Parallel work check

Load and follow
`file:.swarm/bundled-skills/parallel-work-check/SKILL.md`. Then, before
starting implementation on an existing branch:

1. Fetch remote state and compare with local (`git fetch` plus HEAD hashes).
2. If parallel swarm work is detected on the target branch, read the new commits,
   decide whether to integrate, supersede, or proceed, and document the decision.
3. Prefer the parallel work unless you can clearly articulate why your approach
   is better.

### Phase 0b - PR branch checkout pre-flight

When implementation or review-scoping work depends on explorer agents reading a
PR branch or commit range, complete this before Phase 1 explorer dispatch:

1. Verify the working tree is clean with `git status --porcelain`. If
   uncommitted changes exist, **you (the orchestrator)** must handle them
   before Phase 1 dispatch — use `prepare_pr_workflow_checkout` (the
   controller-owned path; it preserves every dirty path — including untracked
   files when called with no `paths` argument — and returns a recovery command),
   or a git worktree (see `running-tests` skill precedent). Note: `git branch
   tmp/save-<topic>` only moves the HEAD ref — it does not record or preserve
   uncommitted working-tree changes, so do not rely on it to save dirty work.
   **Never delegate `git stash`, `git reset`, `git checkout -- .`,
   or `git restore` to subagents** — these are worktree-global operations that
   destroy sibling agents' in-flight work under parallel execution.
2. Fetch and check out the PR head branch locally. Explorer agents read files
   from the working tree (`Read`/`Glob`/`Grep`), not from git history, so a stale
   checkout makes them inspect the base branch.
3. Pass the exact commit range (`base_ref..head_ref`) in every explorer
   delegation so agents have revision context for targeted `git show`
   inspection.

### Phase 1 - Parallel exploration

Launch parallel subagents for disjoint investigation tasks such as repository
mapping, locating existing patterns, finding tests/contracts, side-effect
analysis, and dependency or migration checks. Keep the main context focused.

**Subagent prohibition — must reach every subagent prompt:**
Include this line verbatim in every subagent dispatch prompt:
"You are a subagent sharing a worktree with sibling agents. You MUST
NOT run `git stash`, `git reset`, `git checkout -- .`, `git restore`,
or any other worktree-global destructive git command. These destroy
sibling agents' in-flight work without error."

### Phase 2 - Plan

Create a concrete implementation plan before editing for any non-trivial task.
Include files to change, intended behavior, risks, validation commands, and
whether reviewer and critic passes are required.

### Phase 3 - Implement in scoped units

Implement in coherent, reviewable chunks. Follow existing repository patterns.

**`declare_scope` discipline.** Before every coder or test-engineer delegation (and before every retry), call `declare_scope({ taskId, files, replace_existing: true })` with the exact workspace-relative file list the delegated agent may modify — including generated or lockfile paths the change will produce (for example, `dist/*`, `package-lock.json`, or `bun.lock`). Direct and shell writes are both scope-enforced. If the file list is not completely obvious, declare the containing workspace-relative directories instead. Treat `SCOPE_CONFLICT`, `SCOPE_BINDING_EXPIRED`, `SCOPE_BINDING_AMBIGUOUS`, and `SCOPE_WORKSPACE_MISMATCH` as architect-owned recovery signals: reconcile the named scope sources or lane root, replace the declaration, then redispatch. Never instruct the delegated agent to bypass the gate or switch write mechanisms.

**Smallest justified scope on `SCOPE_CONFLICT` (issue #1994 S4).** The replacement declaration must be the SMALLEST justified scope: first reconcile what the delegation actually intends to write (the task's files vs the conflicting scope source named in the diagnostic), then narrow the conflicting lower-precedence source to a subset of that list — repair stale plan scope with `save_plan` and/or the delegation's `FILE:` lines — and only then re-declare exactly that file list; re-declaring alone leaves the non-subset relation and reproduces the same `SCOPE_CONFLICT`. Split the task into separate delegations if the conflict reveals two disjoint write sets. NEVER resolve a `SCOPE_CONFLICT` by widening to a plan-inferred superset: auto-widening over-authorizes writes and hides an inaccurate plan or delegation prompt behind a bigger scope. This matches the execute skill's scope-recovery contract ("Do not widen scope just to make the sets agree"); a `save_plan` scope repair is a bookkeeping change covered by the critic-gate plan-freeze rule.

If the project exposes `sast_scan` with `capture_baseline`, capture the
phase-scoped SAST baseline before first coder delegation so later scans fail only
on new findings rather than pre-existing infrastructure noise.

### Phase 4 - Objective validation

Run the strongest objective checks available for the task: tests, lint,
typecheck, build, targeted repro scripts, and local runtime verification where
relevant. If you cannot verify it, do not claim it is done.

### Phase 5 - Independent reviewer validation

Use an independent reviewer subagent when the task edits code, tests, docs,
package metadata, release notes, or skill files. The reviewer must inspect the
actual current diff and validation evidence after implementation. Any later edit
invalidates approval and requires re-review.

Reviewer responsibilities:

- inspect the implementation with fresh context,
- look for correctness bugs, edge cases, regressions, claim-vs-actual
  mismatches, and test blind spots,
- default to disbelief until evidence supports the change,
- classify issues as `CONFIRMED`, `DISPROVED`, `UNVERIFIED`, or `PRE_EXISTING`
  when useful,
- verify that at least one regression test in the diff has falsification
  evidence when the task claims regression coverage: the fix was temporarily
  removed or bypassed, the test failed for the expected reason, the fix was
  restored, and the test passed again. If no regression test is applicable, the
  reviewer must record why,
- return `APPROVE`, `NEEDS_REVISION`, or `BLOCKED`.

`NEEDS_REVISION` or `BLOCKED` blocks completion until fixed and re-reviewed.

### Phase 6 - Critic challenge

Use a critic subagent after independent reviewer approval for any task that edits
code, tests, docs, package metadata, release notes, or skill files. The critic
must challenge the reviewer-approved current diff and evidence. Any later edit
invalidates critic approval and requires another critic pass.

### Phase 7 - Final synthesis

Before calling work complete, verify:

- objective validation ran and results were recorded,
- the independent reviewer approved the latest diff and evidence,
- a separate critic approved after reviewer approval,
- every `NEEDS_REVISION` or `BLOCKED` item was fixed and re-reviewed,
- no edit occurred after the latest reviewer/critic approval,
- no behavior is unwired or deferred without explicit user instruction.

## Adapter notes

Runtime-specific adapter skills in `.claude/skills/swarm-implement/` and
`.agents/skills/swarm-implement/` must stay thin and delegate to this canonical
`.opencode` workflow.

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →

Сначала — swarm-implement от других авторов.

swarm-implement ZaxbyHub Скилл swarm-implement для Claude Code ведёт фичу или баг-фикс от разведки до проверки по каноническому SKILL.md репозитория. CX Codex +1 ★ 539звёзд репо swarm-implement ZaxbyHub Скилл swarm-implement адаптирует канонический воркфлоу opencode-swarm под сложные доработки кода, фиксы в нескольких файлах и многоэтапный рефакторинг. CX Codex +1 ★ 539звёзд репо implement-task NeoLabHQ Скилл implement-task ведёт задачу по шагам: на каждый шаг отдельный агент, в конце фазы — один ревьюер и правки до прохода. CX Codex +1 1 300установок gitnexus-pr-swarm-review abhigyanpatwari Скилл gitnexus-pr-swarm-review делегирует проверку pull request семи субагентам и собирает вывод о готовности изменений к production. Подходит для интерактивного ревью PR. CX Codex +1 438установок om-implement-feature open-mercato Скилл om-implement-feature для Claude Code ведёт разработку функции от спецификации до тестов и ревью. Останавливается после подготовки проверенной staged-ветки, до коммита и PR. CX Codex +1 503установок review-swarm Dimillian Скилл review-swarm для Claude Code параллельно проверяет git-дифф или выбранные файлы без изменений в рабочей копии. Ищет регрессии, риски безопасности и пробелы в тестах. CX Codex +1 820установок 02-implement AI-Driven Dev Скилл 02-implement для Claude Code реализует готовый план по фазам, пока не будут выполнены все критерии приёмки. CX Codex +1 ★ 571звёзд репо om-auto-implement-spec open-mercato Скилл om-auto-implement-spec берёт существующую спеку и доводит её до проверенного, отревьюенного, готового PR. На входе — ссылка на спеку: путь, имя, issue или номер spec-PR. CX Codex +1 4 300установок

Из того же набора121

Весь набор →
qa-sweep qa-sweep организует параллельную работу субагентов и независимую проверку изменений. Скилл пригодится при реализации функций, исправлении ошибок и разборе сбоев. CX Codex +1 ★ 539звёзд репо swarm-pr-subscribe Скилл swarm-pr-subscribe держит открытый пул-реквест под присмотром: разбирает приходящие события CI и ревью и сам решает, что чинить, о чём спросить, а что пропустить. CX Codex +1 ★ 539звёзд репо brainstorm Скилл brainstorm для Claude Code проводит пошаговый брейншторм: изучает кодовую базу, задаёт точечные вопросы и оформляет спецификацию для задачи без готовых требований. CX Codex +1 ★ 539звёзд репо bundle-safety Скилл bundle-safety помогает проверять минификацию бандла, сохранность имён идентификаторов и учёт реэкспортов. Пригодится перед изменениями сборки, которые могут переименовать или удалить код. CX Codex +1 ★ 539звёзд репо safe-rename Скилл safe-rename для Claude Code ведёт по безопасному переименованию экспортированных символов и файлов без поломки зависимостей и тестов. CX Codex +1 ★ 539звёзд репо subprocess-safety Скилл subprocess-safety задаёт правила для вызовов дочерних процессов. Подключайте его, когда пишете или проверяете код со spawn, spawnSync или child_process. CX Codex +1 ★ 539звёзд репо council Скилл включает режим COUNCIL в opencode-swarm: три агента разбирают вопрос, архитектор собирает источники и сводит ответ. CX Codex +1 ★ 539звёзд репо safe-extraction Скилл safe-extraction помогает безопасно распиливать крупные монолитные файлы на модули. Защищает от поломок тестов, сбоев моков в _internals и ошибок CI из-за путей в списках исключений. CX Codex +1 ★ 539звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой