/swarm:update-workflow <workflow name>from swarm
Regenerates the plugin-owned wiring of an existing custom workflow shortcut command from the current swarm template, preserving consumer-owned sections like Settings and User-Provided Context.
Ships in swarm. Installing the plugin adds it to Claude Code.
You are updating an existing custom workflow's shortcut command to match the current swarm template. This command regenerates only the plugin-owned wiring of .claude/commands/<name>.md — the ## Workflow section and default wiring that comes from swarm. It never touches the mode skill at .claude/skills/<name>-mode/SKILL.md — that file is consumer-owned.
$ARGUMENTS
The argument is the workflow name (kebab-case, matching the existing file name without .md). If $ARGUMENTS is empty, ask the user (plain text, not AskUserQuestion): "Which workflow should I update? (Pass the name — e.g., triage-gh-issue.)" Wait for their response.
The target file is .claude/commands/<name>.md in the current working directory.
.claude/commands/<name>.md. This command updates existing workflows — use /swarm:create-workflow to create a new one." Stop.Do not read or modify .claude/skills/<name>-mode/SKILL.md. That file is consumer-owned.
From the existing shortcut command, extract these consumer-owned values and blocks verbatim. These will be preserved:
description, argument-hint, disable-model-invocation, and any other fields present. Preserve all of them.## Settings section — the entire block under the ## Settings heading, including Mode, Outcomes question, Defaults, and any other settings the consumer has added.## User-Provided Context section — the block under that heading (typically $ARGUMENTS).## Pre-flight section if present — the block under that heading (intake-specific actions, bash commands, arg parsing). This is consumer-owned.Consumer ownership rule: anything that is not the plugin-owned wiring (the template preamble and the ## Workflow section) belongs to the consumer.
The plugin-owned parts of a custom shortcut command are:
swarm:workflow-rules and the "No lead research unless enabled." paragraph.## Workflow section — the numbered steps that wire the run.Use this current template for the plugin-owned parts, substituting <name> with the workflow name:
# /<name>
You MUST use the **Skill** tool to invoke `swarm:workflow-rules`. It returns the governance spec for this team run: pre-flight check, hard rules, briefing templates, and launch mechanics. Follow that spec for the entire run.
**No lead research unless enabled.** Unless the user explicitly enables lead research, do not read codebase files, spawn subagents, or perform research. Delegate all research to teammates.
And for the Workflow section:
## Workflow
1. **Pre-flight.** Follow the pre-flight check from `swarm:workflow-rules`.
2. **Outcomes.** If User-Provided Context is non-empty, use as outcomes. Otherwise ask the outcomes question (plain text, not AskUserQuestion). Do not echo the outcomes back verbatim — run the outcome reflection per `swarm:workflow-rules`: invoke `swarm:reflect-outcome` with the user's exact words. On `NO FORK`, carry the outcome forward to the step 5 confirmation summary with no echo or confirm beat. On a fork, present it with AskUserQuestion exactly as returned (the transport contract in `swarm:workflow-rules`) and resolve the user's pick per the skill (Option A keeps the wording; Option B re-authors into a new verbatim). Store no separate supplement.
3. **Setup.** Render the Setup gate with AskUserQuestion. The cost tier is this explicit pick — outcomes passed inline do not skip it. Wait for the selection.
4. **Team.** Invoke `<name>-mode` via the Skill tool (unqualified name) — this is your mode skill. If its frontmatter declares `extends:` (a thin wrapper), also invoke the declared base mode via the Skill tool immediately after and combine per the extension contract in `swarm:workflow-rules` — the base provides lead identity, facilitator, phase arc, and base rules; the wrapper's sections are additive. Then invoke `swarm:suggest-members`, passing the mode skill's Suggest-Members Guidance (for wrappers: the base's guidance plus the supplement) and the confirmed outcomes; no lead research. Present the suggestion by rendering the Team gate (roster handles in the question text, full identity lines in each option's `preview`); "I want to adjust" is free text — swap a member, add more, or remove some; re-confirm through the same gate. Wait for the team to be confirmed.
5. **Confirmation.** Render the Plan gate (launch variant) with AskUserQuestion — the launch-variant digest in the question text, the elaboration preview on each option. If "I have changes": ask what to change (free text) and apply it — a changed outcome re-enters step 2's reflection; team changes go through step 4's adjust flow; the step 3 tier can be re-picked; lead research defaults to no (yes lets the lead delegate research to Explore subagents) — then re-present this confirmation. Repeat until the user launches.
6. **Launch.** Follow the launch mechanics from `swarm:workflow-rules`. The mode skill is already invoked — apply its spec, read any Pre-flight Reads files, then spawn the team.
Compose the new file by merging consumer-owned sections (Step 2) with regenerated plugin-owned sections (Step 3):
generated-by is missing from the frontmatter, add generated-by: swarm@<current version> by reading the version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json; if present, update its value to the current version). If ${CLAUDE_PLUGIN_ROOT} is unset or the plugin.json read fails, skip the stamp rather than aborting the update — provenance is informational, not load-bearing, and the update must still succeed.## Settings section (consumer-owned, preserved as-is — with one mechanical migration: replace the stale phrase tier picked at the launch gate with tier picked at setup, since the regenerated Workflow asks the tier at its Setup step and the launch confirmation no longer carries a tier. This migration appears in the Step 5 diff like any other change, so the user confirms it).## User-Provided Context section (consumer-owned, preserved as-is).## Pre-flight section if present in the original (consumer-owned, preserved as-is).## Workflow section (from Step 3).5a. Proactive consumer-edit scan. Before presenting the diff, compare the original ## Workflow section (extracted from the file read in Step 1) against the current template's ## Workflow section (from Step 3) line-by-line. For every line present in the original that is NOT present in the template, surface it explicitly above the diff as a warning:
Consumer edit detected in the Workflow section — this content will be removed if you apply:
- "[quoted line]"
- "[quoted line]"
If you still want this content after the update, copy it now and re-add it manually after the update is applied.
If no consumer edits are detected in the Workflow section, omit this warning.
5b. Show the diff and ask. Compute the textual diff between the current file contents (from Step 1) and the proposed file contents (from Step 4).
<name> is already in sync with the current swarm template. No changes needed." Stop..claude/commands/<name>.md?"The Step 5a warning is load-bearing. A user who accepts the diff without noticing a single deleted sentence inside the Workflow section loses consumer content silently; the explicit line-by-line callout prevents that.
If "Apply the update": use the Write tool to write the composed file from Step 4 to .claude/commands/<name>.md. Then tell the user:
Updated
.claude/commands/<name>.mdto swarm@. The mode skill at.claude/skills/<name>-mode/SKILL.mdwas not touched (consumer-owned).
If "Skip": tell the user "Skipped. No changes written." Stop.
This command updates the shortcut command only. It never reads or writes the mode skill. Mode skill drift — including the Refine and Deliver phase stubs in full custom modes that are plugin-owned boilerplate at generation time — is out of scope for this command. The mode skill is consumer-owned in its entirety from the moment it is generated; the consumer decides whether to update it manually.
To convert an existing full custom mode to a thin wrapper, run /swarm:create-workflow and select "Thin wrapper" at Step 0.5 — it will generate a wrapper mode skill and shortcut in the same location, overwriting the old files. Move any domain content (Rules, Allowlist additions, Suggest-Members guidance) from the old mode skill into the new wrapper's additive sections manually before running, or merge afterward.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub dheerg/swarms --plugin swarm10 commands in this plugin
/code/swarm:codeLaunch a code-mode agent team/create-workflow/swarm:create-workflowScaffold a custom workflow — generates a mode skill and shortcut command/launch/swarm:launchInteractively launch an agent team with guided setup/onboard/swarm:onboardWalk through swarm's core concepts and launch your first team/refine/swarm:refineRun recursive refinement on the current branch and PR/triage/swarm:triageLaunch a triage-mode agent team — diagnose an issue without changing itOther plugins' commands for the same job