/agents-skills:kill count | allfrom agents-skills
Emergency load-shedding when sub-agents overload the machine — kills newest agents first until memory pressure stabilizes, then salvages their worktrees. Accepts optional count or 'all'.
Ships in agents-skills. Installing the plugin adds it to Claude Code.
Arguments: $ARGUMENTS — empty means stabilize automatically (kill newest-first until pressure recovers); a number kills exactly that many newest agents; all stops every running sub-agent. This is an emergency command: act immediately, measure, report after — do not ask for confirmation mid-incident.
Why newest-first (LIFO): the newest agents have invested the least work; the oldest are closest to a push or PR. Killing newest-first sheds the same load while destroying the least progress — and killed agents' worktrees survive, so their work is salvageable either way (see step 5).
Measure once, fast. Memory pressure (memory_pressure on macOS — read the percentage and state; vm_stat for compressor/swap activity; on Linux, free -m + /proc/pressure/memory), load average (uptime), and the top memory consumers (ps aux | sort -rk4 — look for agent-spawned trees: test runners like vitest/playwright/jest workers, bundlers, language servers spawned under worktree paths). One snapshot is enough — the situation is degrading while you measure.
Stop new spending immediately. No new dispatches, no new pushes (each push may fan out a pre-push hook test suite — that is usually the very load source). If an orchestration loop is running, hold all free slots (see orchestrating-slots backpressure).
Kill newest-first, in waves. List running sub-agents (TaskList / your harness's running-task view), order by start time descending:
kill (TERM) the process group first, escalate to -9 only for survivors after a few seconds.all, do the whole batch in one wave.Re-measure and repeat. After each wave, re-read memory pressure and load. Stabilized means: pressure back to normal/warn (not critical), no swap death-spiral, load average heading under core count. If two waves haven't moved the needle, the load source may not be agents — check for runaway non-agent processes and report instead of blindly killing more.
Salvage, then report. Killed agents' worktrees retain all committed and uncommitted work. For each: git -C <worktree> log <integration-branch>..HEAD --oneline + git status --short — per the dispatching-subagents salvage protocol, finished work gets pushed/PR'd by you (one at a time, serialized — see why below), partial work resumes from the last commit on re-dispatch, only empty worktrees need a from-scratch re-dispatch. Report: pressure before/after, agents killed (and what each had completed), salvage plan, and the recommended lower slot count.
Prevent the recurrence. The classic cause is N simultaneous pushes each running a full local pre-push suite — N × the suite's footprint. Recommend to the operator: lower <slot-count> (re-issue /dispatch with fewer slots), and serialize pushes when slots are high (orchestrator-performed pushes are naturally serial; agent-performed pushes are not). Note the incident in the session log so the next orchestration round starts at the reduced cap.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
31 commands in this plugin
/dispatch/dispatch — fill orchestration slotsStart an event-driven orchestration session — fill N concurrency slots with sub-agent dispatches, split across dev slots (new issues), rescue slots (CI failures, review threads, stuck PRs), and flex slots (dev work that yields to incidents). Example — /dispatch 8, or /dispatch dev:5 rescue:1 flex:2/figma-init-spec/figma-init-spec — snapshot the design system into living specsSnapshot a Figma file into living design specs anchored to stable identity (node IDs, component/style keys) with a repo-owned design→code map, so reorganization doesn't break the links. Code Connect optional. For taming design drift. Optional scope arg. Example — /figma-init-spec, or /figma-init-spec "Checkout flow"/figma-refresh-spec/figma-refresh-spec — detect design drift and produce a re-touch listRe-read Figma and diff it against the design specs by stable id, then report drift — separating pure reorganization (no code change) from real token/size/state changes (a precise re-touch list routed to code via Code Connect). Run after designs or the Figma file get moved around. Optional scope arg. Example — /figma-refresh-spec, or /figma-refresh-spec "Checkout flow"npx claudepluginhub skyfox675/agents-skills --plugin agents-skillsOther plugins' commands for the same job