Skip to main content
skill CX Codex

swarm-resume — Claude Code skill: what it does, how to install

swarm-resume is a Claude Code skill that restores swarm plan state and clears stale git branches to resume work on an approved plan.

MIT ★ 539 updated 2026-10-29

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

What swarm-resume does

This skill provides the RESUME mode execution details for opencode-swarm. The architect runtime pulls it dynamically when resuming work recorded in .swarm/plan.md or migrating between local and cloud execution contexts.

The routine inspects the Swarm: field in the plan header. When the active swarm ID matches, it drives /swarm reset-session to prune lingering .swarm-worktrees/ directories and swarm-lane/* branches before touching the next task. If the swarm ID differs, the agent wipes SME Cache data from context.md, discards previous agent identities, and updates the active swarm ID.

Direct manual edits to .swarm/plan.md break runtime state because the file is a derived projection that must change only through save_plan.

What it helps with

  • resume task execution from an existing .swarm/plan.md
  • prune orphaned .swarm-worktrees/ lanes and swarm-lane/* branches
  • reconcile an approved plan with a new active swarm ID
  • clear outdated SME Cache blocks from context.md

Example prompts for the agent

  • Resume the approved swarm plan from the current task
  • Clean up leftover swarm worktrees and continue execution
  • Update the plan context to the active swarm ID and proceed

How to install swarm-resume

1Skills CLI (Vercel)

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

2Manually: put the files in place

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

Copy the whole skill folder; for one project use .claude/skills/swarm-resume/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swarm-resume

How do I install swarm-resume in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill swarm-resume -a claude-code in your terminal.

What happens if .swarm/plan.md is missing?

The runtime treats the workspace as a new project and switches to MODE: SPECIFY. It then runs complexity_hotspots across 90 days and gathers dependency data with sbom_generate.

Why does the protocol clean git branches before resuming?

It triggers /swarm reset-session to prune orphaned swarm-lane/* branches and lanes in .swarm-worktrees/, ensuring the resumed run starts from a clean provisioning state.

Source text

SKILL.md · MIT
---
name: swarm-resume
description: >
  Full execution protocol for MODE: RESUME -- continuing an existing approved plan safely from current state.
metadata:
  audience: swarm-plugin
---

# Resume Protocol

This protocol is loaded on demand by the architect runtime. The architect prompt keeps only activation, action, and hard safety constraints; the full execution details live here.

### MODE: RESUME
If .swarm/plan.md exists:
  1. Read plan.md header for "Swarm:" field
  2. If Swarm field missing or matches the active swarm id:
     - Reconcile stale worktree state before resuming: prune/adopt stale `.swarm-worktrees/` lane directories and `swarm-lane/*` git branches left from the prior session. Drive this via the `/swarm reset-session` recovery command (internal: `cleanupOrphanedBranches`) so the resumed run starts from a clean provisioning state.
     - Resume at current task
  3. If Swarm field differs (e.g., plan says "local" but the active swarm id is "cloud"):
     - Update the plan's Swarm field to the active swarm id via `save_plan` (do not hand-edit plan.md — it is a derived projection).
     - Purge any memory blocks (persona, agent_role, etc.) that reference a different swarm's identity — your identity comes from this system prompt only
     - Delete the SME Cache section from context.md (stale from other swarm's agents)
     - Update context.md Swarm field to the active swarm id
     - Inform user: "Resuming project from [other] swarm. Cleared stale context. Ready to continue."
     - Reconcile stale worktree state before resuming: prune/adopt stale `.swarm-worktrees/` lane directories and `swarm-lane/*` git branches left from the prior session. Drive this via the `/swarm reset-session` recovery command (internal: `cleanupOrphanedBranches`) so the resumed run starts from a clean provisioning state.
     - Resume at current task
If .swarm/plan.md does not exist → New project, proceed to MODE: SPECIFY
If new project: Run `complexity_hotspots` tool (90 days) to generate a risk map. Note modules with recommendation "security_review" or "full_gates" in context.md for stricter QA gates during QA gate selection (stricter gates). Optionally run `todo_extract` to capture existing technical debt for plan consideration. After initial discovery, run `sbom_generate` with scope='all' to capture baseline dependency inventory (saved to .swarm/evidence/sbom/).

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set121

The whole set →
commit-pr commit-pr — a checklist the agent must clear before it commits, pushes or opens a PR. Built for the case where an AI agent publishes the branch, not a person. CX Codex +1 ★ 539repo stars skill-edit-validation skill-edit-validation sweeps test suites for stale assertions after modifying skill markdown files, preventing unexpected CI breaks. CX Codex +1 ★ 539repo stars discover This skill delegates repository discovery and maps project rules, code structure, and risk areas. Use it before a complex change when you need to understand the existing project first. CX Codex +1 ★ 539repo stars ci-fix-monitor ci-fix-monitor is a Claude Code skill that monitors pull request check runs and resolves CI failures. It tracks builds until every required job turns green. CX Codex +1 ★ 539repo stars ci-failure-batching ci-failure-batching collects failed PR checks before planning fixes. Use it to group related CI problems and avoid a separate push cycle for each one. CX Codex +1 ★ 539repo stars mock-to-internals-migration mock-to-internals-migration is a Claude Code skill for moving mocks from Vitest to Bun and checking the _internals seam. It activates for mock migrations and related test-structure changes. CX Codex +1 ★ 539repo stars gate-attribution gate-attribution assigns reviewer and test engineer verdicts to individual plan tasks during swarm batch runs. Activates when dispatches return multi-task rows. CX Codex +1 ★ 539repo stars merge-queue-readiness The merge-queue-readiness skill simulates a PR merged with the latest main before it enters a GitHub merge queue. Use it to catch integration failures that isolated PR checks can miss. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open