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

workspace · sethgammon — скилл для Claude Code: координатор кампаний по репозиториям

Скилл workspace координирует изменения в нескольких репозиториях в рамках одной задачи. Разбивает работу на волны, запускает кампании по репозиториям, проверяет контракты между ними.

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

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local
Открыть на GitHub

Что делает workspace

Разбивает задачу на кампании по репозиториям и выполняет их волнами: сначала те, от которых зависят другие, затем зависимые. Для каждого репозитория создаёт ветку, запускает /archon, /fleet или /marshal с инструкцией, собирает результаты и передаёт контекст следующей волне. Перед запуском потребителей проверяет, что производители создали обещанные артефакты — типы в пакете, эндпоинты API, переменные окружения.

Если один репозиторий падает, остальные продолжают работу: откат не делается, решение за пользователем. Все репозитории должны быть локально доступны и быть git-репозиториями. Для монорепозиториев каждый пакет считается отдельной единицей работы.

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

  • Добавить новую БД или сервис, который затрагивает фронтенд, бэкенд и инфраструктуру
  • Разбить монолит на сервисы с согласованными контрактами
  • Провести изменение API-контракта через все зависимые репозитории
  • Синхронизировать обновление типов и роутов между shared-types, backend и frontend
  • Развернуть новый микросервис с координацией CI/CD и конфигов

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

  • Добавь Redis в backend-repo и настрой клиент в frontend-repo с учётом общих типов из shared-types
  • Разбей монолит в ./app на три сервиса: auth-service, api-service, worker-service с общими типами
  • Обнови эндпоинт /users в backend и соответствующий хук в frontend, сначала типы в types-package

Как установить workspace

1Через маркетплейс плагинов

/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local

Команда ставит плагин citadel целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add SethGammon/Citadel --skill workspace -a claude-code

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

~/.claude/skills/workspace/SKILL.md

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

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

Вопросы о workspace

Как установить workspace в Claude Code?

Запусти /plugin marketplace add SethGammon/Citadel, затем /plugin install citadel@citadel-local. Или через CLI: npx skills add SethGammon/Citadel --skill workspace -a claude-code.

Что делает workspace?

Координирует изменения в нескольких репозиториях: разбивает задачу на кампании, выполняет их волнами с учётом зависимостей, проверяет контракты между репозиториями и передаёт контекст между волнами.

Что нужно для работы workspace?

Все репозитории должны быть локально доступны и быть git-репозиториями. Node.js для запуска скриптов из .citadel/scripts/. Если в репозитории есть активная кампания, workspace сообщит о конфликте.

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

SKILL.md · MIT
---
name: workspace
license: MIT
description: >-
  Multi-repo campaign coordinator. Same lifecycle as fleet -- scope claims,
  discovery relay, wave-based execution -- but the unit of work is a repo,
  not a file. Coordinates campaigns across repositories with shared context.
user-invocable: true
auto-trigger: false
trigger_keywords:
  - workspace
  - multi-repo
  - cross-repo
  - across repos
  - multiple repos
  - coordinate repos
  - add redis and snowflake
  - split into repos
last-updated: 2026-03-29
effort: high
---

# /workspace -- Multi-Repo Campaign Coordinator

## When to Use

- Adding infrastructure that spans repos (new database, shared service, API contract)
- Coordinating changes across a frontend repo, backend repo, and infra repo
- Breaking a monolith into services (each service becomes a repo-scoped campaign)
- Any task where changes in repo A depend on or inform changes in repo B

**Do not use when:**
- All work is in one repo (use `/fleet` or `/archon`)
- The repos are truly independent with no shared contracts (just run separate campaigns)

## Protocol

### Step 1: ORIENT

1. Check for existing workspace session: `.planning/workspace/session-{slug}.md` — resume if `status: active` or `needs-continue`
2. If starting fresh: identify repos, verify each path is a git repo, read each repo's `CLAUDE.md`, check `.planning/campaigns/` for active campaigns (avoid collisions)
3. **Load prior session context and start watcher**:
   ```bash
   node .citadel/scripts/momentum-watch-start.cjs
   node .citadel/scripts/momentum-read.cjs
   ```
   Skip momentum injection if output is empty.

### Step 2: DECOMPOSE

Break the direction into repo-scoped work items (one campaign per repo per wave). Table format: `# | Repo | Campaign Direction | Scope | Deps | Wave`.

**Rules:** items with no deps → Wave 1; dependents → Wave 2+. Max 3 repo-campaigns per wave. Scope format: `{repo}:{path}`.

For each inter-wave dependency, specify the cross-repo contract: what the producer will produce, what the consumer expects, and where the contract lives (shared types package, OpenAPI spec, env var).

### Step 3: WORKSPACE SESSION FILE

Create `.planning/workspace/session-{slug}.md` with frontmatter: `version`, `id`, `status: active`, `started`, `completed_at: null`, `direction`, `repos` (path + name + branch per repo), `wave_count`, `current_wave: 1`, `campaigns_total`, `campaigns_complete: 0`.

Body sections: Direction, Repos table (name/path/branch/status), Work Queue (table from Step 2), Cross-Repo Contracts (producer/consumer/contract/location), Wave Execution Log (per wave: status, campaigns, started, completed), Shared Context (discovery relay accumulation).

### Step 4: WAVE EXECUTION

For each wave:

#### 4a. Pre-flight
- Verify all dependency campaigns from prior waves completed successfully
- Check cross-repo contracts: did producer repos create the expected outputs?
- If a dependency failed: park the dependent campaign, flag for user decision

#### 4b. Spawn campaigns
For each repo-campaign in this wave:

1. Create branch: `git checkout -b workspace/{slug}/{repo-name}`
2. Spawn agent with direction: `/archon` for complex (3+ phases), `/fleet` if parallelizable, `/marshal` or direct skill for simple (1-2 steps)
3. Inject context: discovery briefs from prior waves, prior session context (re-read `momentum.json` via `node .citadel/scripts/momentum-read.cjs`, inject as `=== PRIOR SESSION CONTEXT ===`, skip if empty), cross-repo contracts, relevant `CLAUDE.md` sections from other repos

#### 4c. Collect results
Extract HANDOFF blocks, compress into cross-repo discovery brief, write persistent discovery records:
  ```bash
  node .citadel/scripts/discovery-write.cjs \
    --session {session-slug} --agent {repo-name}-{campaign-type} \
    --wave {wave-number} --status {success|partial|failed} \
    --scope "{repo-name}:{scope-path}" --handoff "{json-array}" \
    --decisions "{json-array}" --files "{json-array}" --failures "{json-array}"
  ```

#### 4d. Discovery relay
Write `workspace/briefs/wave{N}-{repo-name}.md` for each completed campaign.
Also write `workspace/briefs/wave{N}-cross-repo.md` summarizing:
- New API endpoints or types created
- Config changes that affect other repos
- Contract fulfillment status (did the producer deliver what was promised?)

#### 4e. Contract verification
For each cross-repo contract: verify the producer created the expected output (file + export for types, route existence for endpoints). If verification fails, flag and do not proceed with consumers.

#### 4f. Update session
Mark completed campaigns, update wave status, write discovery relay, advance `current_wave`.

### Step 5: COMPLETION

1. Run typecheck/build for each repo in isolation (build shared types package first if present)
2. Set session `status: completed`, `completed_at: {ISO timestamp}`
3. Run `node .citadel/scripts/momentum-synthesize.cjs`
4. List all branches created across repos with suggested merge order based on dependency graph
5. Output HANDOFF

## Fringe Cases

- **Repo not a git repo:** Skip it. Report which repos were skipped and why.
- **Repo has uncommitted changes:** Stash before branching. Record stash ref in session file.
  Pop on completion or failure.
- **Active campaign in target repo:** Do not start a second campaign. Report the conflict
  and ask the user whether to wait, park the existing campaign, or merge scopes.
- **`.planning/workspace/` does not exist:** Create it (and `workspace/briefs/`).
- **Cross-repo contract broken:** Park all downstream campaigns. Report which contract
  failed, which producer was responsible, and what the consumer expected. Do not
  attempt to fix the producer -- surface the issue for the user or re-run the producer campaign.
- **One repo fails, others succeed:** Mark the failed repo-campaign. Do not roll back
  successful repos. The user decides whether to fix-and-continue or abandon.
- **Repos on different machines or remotes:** Not supported. All repos must be locally
  accessible. If a repo is remote-only, the user must clone it first.
- **Monorepo with multiple packages:** Treat each package as a "repo" for scoping purposes.
  Use `{monorepo}:{package-path}` as the scope identifier.

## Contextual Gates

**Disclosure:** "Running multi-repo campaign across [repos]. Changes committed to each repo independently."
**Reversibility:** red — coordinates changes across multiple repositories; cross-repo commits are hard to revert in bulk.
**Trust gates:**
- Familiar (5+ sessions): coordinates multi-repo campaigns autonomously; novices should use /marshal per repo.

## Quality Gates

- [ ] All repos verified as accessible git repositories before starting
- [ ] Work queue has no scope overlaps within the same repo
- [ ] Cross-repo contracts specified for every inter-wave dependency
- [ ] Discovery relay written after each wave
- [ ] Contract verification run before spawning consumer campaigns
- [ ] Each repo's typecheck/build passes independently after completion
- [ ] Session file updated after every wave (not just at the end)
- [ ] No campaigns left in `active` state on completion

## Exit Protocol

```
---HANDOFF---
- Workspace: {slug} -- {direction summary}
- Repos: {N} repos, {M} campaigns across {W} waves
- Results: {completed}/{total} campaigns succeeded
- Branches: {list branches ready for review}
- Merge order: {suggested order based on dependency graph}
- Unresolved: {any failed campaigns or broken contracts}
---
```

© SethGammon · MIT · SethGammon/Citadel

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

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

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

workspace alinaqi Скилл workspace анализирует архитектуру монорепозиториев и связанных проектов. Находит общие контракты API и типы, чтобы агент не ломал связи между сервисами. CX Codex +1 198установок multi-repo-swarm ruvnet Субагент multi-repo-swarm для Claude Code, который координирует агентов сразу в нескольких репозиториях организации. Запускает синхронизированные задачи, управляет зависимостями и связывает pull request'ы между проектами. CX Codex ★ 850звёзд репо habitat-usage lynx-community Скилл habitat-usage для Claude Code, Codex, Cursor и других платформ помогает настроить Habitat — инструмент синхронизации зависимостей из нескольких репозиториев и внешних файлов через .habitat/DEPS и hab sync. CX Codex +1 253установок nx-workspace nrwl Скилл nx-workspace для Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode, который даёт агенту команды для навигации по Nx-монорепозиторию. CX Codex +1 100 600установок link-workspace-packages nrwl Скилл link-workspace-packages для Claude Code настраивает зависимости между пакетами монорепозитория через менеджер пакетов и разрешает импорты из соседних пакетов. CX Codex +1 3 200установок multi-repo-git-ops bmad-labs Скилл multi-repo-git-ops для Claude Code управляет Git в проектах с родительским репозиторием и подмодулями. Создаёт ветки, коммитит изменения и синхронизирует указатели подмодулей между репозиториями. CX Codex +1 104установок pnpm-workspace oakoss Скилл pnpm-workspace настраивает монорепозитории на базе pnpm и каталоги версий. Помогает агенту связывать локальные пакеты через протокол workspace:. CX Codex +1 195установок

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

Весь набор →
postmortem Скилл postmortem разбирает завершённую кампанию или инцидент по файлам проекта, телеметрии и истории Git. Помогает выяснить, что сломалось и что поймали защитные проверки. CX Codex +1 ★ 937звёзд репо map Скилл map строит компактный JSON-индекс кодовой базы с файлами, экспортами, импортами и графом зависимостей, чтобы агент находил нужные файлы без лишних Glob и Grep. CX Codex +1 ★ 937звёзд репо phase-validator Субагент phase-validator сверяет отчёт о завершении этапа с условиями выхода и выносит вердикт pass или fail. Помогает контролировать автоматические конвейеры разработки. CX Codex ★ 937звёзд репо fleet Субагент fleet для Claude Code делит работу на кампании и ведёт их волнами по 2–3 агента, передавая находки следующей волне. Разбивает задачи, не пересекающиеся по файлам. CX Codex ★ 937звёзд репо create-skill Скилл create-skill интервьюирует разработчика и упаковывает повторяющийся сценарий в готовый SKILL.md с проверкой на реальном коде проекта. CX Codex +1 ★ 937звёзд репо arbiter arbiter — субагент для Claude Code, который повторно запускает проверки проекта и выносит итоговый вердикт по изменениям. Его подключают после исчерпания повторных попыток рабочего агента или для оценки целостности результата. CX Codex ★ 937звёзд репо infra-audit Скилл infra-audit сканирует docker-compose, env-файлы, ORM-конфиги и строки подключения, чтобы собрать карту инфраструктуры проекта и найти, какого слоя не хватает. CX Codex +1 ★ 937звёзд репо refactor Скилл refactor для Claude Code выполняет рефакторинг нескольких файлов с автооткатом через Git, проверкой типов и тестами до и после правок. CX Codex +1 ★ 937звёзд репо

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

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