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
npx skills add ZaxbyHub/opencode-swarm --skill swarm-resume -a claude-codeWhat 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 andswarm-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-code2Manually: put the files in place
~/.claude/skills/swarm-resume/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swarm-resume/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill swarm-resume -a codex2Manually: put the files in place
.agents/skills/swarm-resume/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill swarm-resume -a cursor2Manually: put the files in place
.cursor/skills/swarm-resume/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ZaxbyHub/opencode-swarm .claude/skills/swarm-resume2Manually: put the files in place
.github/skills/swarm-resume/SKILL.md1Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill swarm-resume -a gemini-cli2Platform CLI
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .claude/skills/swarm-resumeManually: put the files in place
.devin/skills/swarm-resume/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ZaxbyHub/opencode-swarm --skill swarm-resume -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 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