Skip to content
Back to skills

Superpowers

ASecurity

Routing table the agent reads to pick a skill for a task: test first, verify, debug, plan, review, isolate a branch, check a deploy. Rows name skills bundled in this plugin and in four optional companion plugins (Obra superpowers, addy agent-skills, ruflo-swarm, oh-my-claudecode), with inline steps for when none is installed. Use when unsure which skill fits a task. Not for doing the work itself. Law activator for the 7 Laws: guidance only. Its one hook, hooks/companion-preference.mjs, refuse...

  • 11 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 28, 2026
ai-agentsgoshellbashawstestingdebuggingcode-reviewgitsecurity

Works with

  • claude code

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add naimkatiman/continuous-improvement --skill superpowers --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Superpowers?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Superpowers
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/naimkatiman-superpowers/badge)](https://www.skillsdirectory.com/skills/naimkatiman-superpowers)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: superpowers
tier: companion
description: "Routing table the agent reads to pick a skill for a task: test first, verify, debug, plan, review, isolate a branch, check a deploy. Rows name skills bundled in this plugin and in four optional companion plugins (Obra superpowers, addy agent-skills, ruflo-swarm, oh-my-claudecode), with inline steps for when none is installed. Use when unsure which skill fits a task. Not for doing the work itself. Law activator for the 7 Laws: guidance only. Its one hook, hooks/companion-preference.mjs, refuses a route only in strict-companions mode."
origin: https://github.com/obra/superpowers
---

# Superpowers: Routing Table for Agent Workflows (Four-Source Dispatcher)

This skill is a routing table the agent reads. It names a workflow order and, for each kind of task, which skill to use. Nothing forces the agent to follow it: no skill here activates by itself, and no hook checks that a stage was done. The one hook behind this skill is `hooks/companion-preference.mjs`, and it only acts on the setting described under "Companion-Preference Override".

## Philosophy

AI agents skip steps, guess, and declare "done" without verifying. This skill answers that by naming each workflow stage and the skill that covers it, so the agent has a route to look up instead of improvising one. Naming the route is all it does.

## Sources: this plugin plus four optional companions

The table routes across this plugin and four companion plugins. The companions are optional. All four install from the same marketplace as this plugin:

```
/plugin install superpowers@continuous-improvement       # Obra's 14 workflow skills
/plugin install agent-skills@continuous-improvement      # Addy's 21 SDLC skills
/plugin install ruflo-swarm@continuous-improvement       # Agent swarm + Monitor stream
/plugin install oh-my-claudecode@continuous-improvement  # 37 skills + 19 agents
```

The CI plugin (this dispatcher + `tdd-workflow`, `verification-loop`, `gateguard`, `deploy-receipt`, etc.) installs by default. The four companions are opt-in — install only what you need.

**How to tell what is installed.** A companion is installed when its skills appear in the agent's skill list under its prefix: `superpowers:`, `agent-skills:`, `ruflo-swarm:` or `oh-my-claudecode:`. Check the list before you route to one.

**When a companion is not installed.** Use the next skill in the row's chain. If nothing in the chain is installed, use the matching inline section near the end of this file (Test-Driven Development, Brainstorming Protocol, Plan Format, Code Review Severity, Subagent Development, Git Worktrees). If no inline section matches, use any available method that can complete the task. Ask about installing a companion only when its missing capability is essential. Do not pretend the skill ran.

Product-management coverage (PRD, OKRs, personas, GTM, etc.) is provided by `phuryn/pm-skills` via an out-of-band Claude Code marketplace install:

```
claude plugin marketplace add phuryn/pm-skills
claude plugin install pm-toolkit@pm-skills
claude plugin install pm-product-strategy@pm-skills
claude plugin install pm-product-discovery@pm-skills
claude plugin install pm-market-research@pm-skills
claude plugin install pm-data-analytics@pm-skills
claude plugin install pm-marketing-growth@pm-skills
claude plugin install pm-go-to-market@pm-skills
claude plugin install pm-execution@pm-skills
```

See `docs/THIRD_PARTY.md` for plugin-by-plugin scope.

## The Basic Workflow

Use the rows relevant to the requested work. The first seven are optional companion skills; `deploy-receipt` ships in this plugin. Handle routine work independently and honor decisions the user already made or delegated. Follow the user's steering preference. With milestone steering, bring a choice to the user when a milestone needs their judgment. When you ask, offer three concise, viable options when available. If fewer are viable, use only those. Recommend one and explain why. Pause only the work that depends on that choice. Ask directly for an essential missing fact or required permission.

| Stage | Skill | Use it when |
|---|---|---|
| Design | **brainstorming** | The user wants a design session or needs to choose a direction. A clear implementation task can proceed directly. |
| Isolation | **using-git-worktrees** | Work needs a separate checkout. |
| Planning | **writing-plans** | Several dependent changes need a shared plan. |
| Implementation | **subagent-driven-development** or **executing-plans** | A scoped plan benefits from parallel or staged work. |
| Testing | **test-driven-development** | A behavior change needs a failing check before implementation. |
| Review | **requesting-code-review** | Work is ready for the review required by the project. |
| Integration | **finishing-a-development-branch** | Integrate according to the approved scope and repository rules. |
| Live proof | **deploy-receipt** | Verify an authorized automatic deployment against the merged SHA. |

## Four-Source Routing Table

Find the row that matches the task and use the first skill in its chain that is installed. Order = preference order. Items prefixed with `ci:` are bundled in this plugin (`ci:tdd-workflow` is the `tdd-workflow` skill); others are namespaced by their installed plugin name. "The dispatcher" in this file means the agent reading this table. No program does the routing.

| Trigger | Law | Preferred → Fallback chain |
|---|---|---|
| Write a failing test before code | 3+4 | `ci:tdd-workflow` → `superpowers:test-driven-development` → `agent-skills:test-driven-development` |
| Verify before declaring done | 4 | `ci:verification-loop` → `superpowers:verification-before-completion` |
| About to edit a file not yet read, or to run a destructive shell command (the hook asks for investigation facts before an edit only under `CI_GATEGUARD_FILE_GATE=strict`) | 1 | `ci:gateguard` (no equivalents) |
| Diagnose root cause across layers | 6 | `superpowers:systematic-debugging` → `agent-skills:debugging-and-error-recovery` |
| Refine vague request into design | 2 | `superpowers:brainstorming` → `agent-skills:idea-refine` |
| Decompose plan into atomic tasks | 2 | `superpowers:writing-plans` → `agent-skills:planning-and-task-breakdown` → `ci:planning-with-files` |
| Execute plan with checkpoints | 3+6 | `superpowers:executing-plans` → `agent-skills:incremental-implementation` |
| Spawn fresh subagent per task | 3 | `superpowers:subagent-driven-development` → `superpowers:dispatching-parallel-agents` |
| Fan out N parallel agents on isolated worktrees | 3 | `superpowers:dispatching-parallel-agents` → `ruflo-swarm:swarm-init` |
| Stream live observation of long agent runs | 4 | `ruflo-swarm:monitor-stream` (only source) |
| Isolate work on a new branch | 3 | `superpowers:using-git-worktrees` (only source) |
| Decide merge / PR / discard at branch end | 3+4 | `superpowers:finishing-a-development-branch` → `agent-skills:shipping-and-launch` |
| Pre-review checklist before requesting review | 4 | `superpowers:requesting-code-review` → `agent-skills:code-review-and-quality` |
| Respond to reviewer feedback | 4 | `superpowers:receiving-code-review` |
| Verify deployed SHA matches merge SHA | 4 | `ci:deploy-receipt` (only source) |
| Run autonomous PRD loop | 6 | `oh-my-claudecode:ralph` → the story loop in the first row of `ci:proceed-with-the-recommendation`'s routing table |
| Audit-then-execute production fix sweep | all | `ci:proceed-with-the-recommendation` (only source) |
| Spec-first contract before implementation | 2 | `agent-skills:spec-driven-development` (only source) |
| Source-first reading before writing | 1 | `agent-skills:source-driven-development` (only source) |
| Curate the right context window | 1 | `agent-skills:context-engineering` → `ci:context-budget` |
| Simplify code, remove duplication | 6 | `agent-skills:code-simplification` → `simplify` |
| Security review for auth/input/secrets | 4 | `agent-skills:security-and-hardening` → `security-review` |
| Browser-level visual regression | 4 | `oh-my-claudecode:visual-verdict` (only source) |
| Reflect after session, extract patterns | 5+7 | `ci:continuous-improvement` → `ci:skill-distillation` |
| Long autonomous run with quality gates | 6 | `oh-my-claudecode:ultragoal` → `oh-my-claudecode:ralph` |
| Coordinator role for staged hand-off | 3 | `ruflo-swarm:agents/coordinator` (when ruflo installed) |
| Product-management work (PRD, OKRs, personas, GTM, growth, market research, analytics) | 1+2+5 | Install `phuryn/pm-skills` via Claude Code marketplace — see docs/THIRD_PARTY.md. Eight installable plugins (`pm-toolkit`, `pm-product-strategy`, `pm-product-discovery`, `pm-market-research`, `pm-data-analytics`, `pm-marketing-growth`, `pm-go-to-market`, `pm-execution`) cover the full lifecycle. Out of band — not a `/plugin install <name>@continuous-improvement` target. |

Four entries in the table are not skill files in this plugin:

- `ci:planning-with-files` is a slash command: `/planning-with-files`.
- `ci:context-budget` names a skill this plugin does not ship. For that row, use `agent-skills:context-engineering` if it is installed. Otherwise trim the context by hand: keep only the files the task needs in scope.
- `simplify` and `security-review` are built into some hosts, Claude Code among them. They are not part of this plugin.

When nothing in a row's chain is installed, fall back to the inline sections near the end of this file (Test-Driven Development, Brainstorming Protocol, Plan Format, etc.), as described under "When a companion is not installed" above. A route is done when you can name the skill or inline section you used for the task.

## Companion-Preference Override

The four-source routing table above is **CI-first by default**: where a skill bundled in this plugin and a companion skill cover the same trigger, use the bundled one. That is the conservative default: the bundled skills arrive with this plugin, and the companions are separate installs that may not be there. The rows this applies to are listed under "Which rows the override affects".

Once the operator has explicitly installed a companion plugin (`superpowers@continuous-improvement`, `agent-skills@continuous-improvement`, `ruflo-swarm@continuous-improvement`, `oh-my-claudecode@continuous-improvement`), the default starts working against them: the installed companion is shadowed by the CI fallback for the same trigger. This override flag respects the operator's explicit install choice without forcing every user to relitigate routing per task.

### Setting the flag

Add a `continuous_improvement.companion_preference` key to `~/.claude/settings.json`:

```json
{
  "continuous_improvement": {
    "companion_preference": "companions-first"
  }
}
```

Valid values:

| Value | Behavior |
|---|---|
| `"ci-first"` (default) | Unchanged from the routing tables above. For the four rows listed below, use the bundled skill. |
| `"companions-first"` | For the four rows listed below, use the companion first, and the bundled skill only if the companion plugin is not installed. The hook prints a one-line advisory naming the companion and allows the call. CI-only rows (`ci:gateguard`, `ci:deploy-receipt`, `ci:proceed-with-the-recommendation`) are unaffected because no companion exists. |
| `"strict-companions"` | Same rows, and the bundled route is refused: `hooks/companion-preference.mjs` denies a `Skill` call to the bundled skill. The deny reason names the companion when its plugin is installed, or the install line when it is not. Then use the companion, install it, or change the flag. The hook refuses the bundled call. It does not check that the companion ran. See "Runtime enforcement" for the calls it cannot see. |

### Which rows the override affects

These are the routing rows where the override changes the resolved target. Rows not listed here are CI-only or companion-only and route the same under any setting. The reflect row was listed here until OMC 5.x: its companion `oh-my-claudecode:retrospective` never existed upstream, so the row is CI-only and the override cannot change it.

| Trigger | `ci-first` (default) | `companions-first` |
|---|---|---|
| Write a failing test before code | `ci:tdd-workflow` | `superpowers:test-driven-development`, then `agent-skills:test-driven-development` |
| Verify before declaring done | `ci:verification-loop` | `superpowers:verification-before-completion` |
| Curate the right context window | `ci:context-budget` | `agent-skills:context-engineering` |
| Long autonomous run with quality gates | `ci:ralph` | `oh-my-claudecode:ultragoal` |

`superpowers:writing-plans` already wins the planning chain under both settings — it is the first entry, with `ci:planning-with-files` as the third fallback — so that row is unchanged.

Two of the four rows need a note, because neither has a bundled skill to prefer. This plugin ships no `context-budget` skill, so under every setting the context-window row resolves to `agent-skills:context-engineering` when that is installed and to trimming the context by hand when it is not. The `ralph` skill was retired from this plugin, so under every setting the long-run row resolves to `oh-my-claudecode:ultragoal` when that is installed and to the story loop in the first row of `proceed-with-the-recommendation`'s routing table when it is not. The hook still matches both names, as described under "Runtime enforcement".

### What the flag does not change

The `gateguard` PreToolUse hook still checks blind edits and destructive shell commands. The fact list applies in `CI_GATEGUARD_FILE_GATE=strict` mode (Law 1, in `hooks/gateguard.mjs`).

The routing guidance and the selected-work preflight still apply:

- The contextual routing guidance in the `/superpowers` command.
- Phase 0 P-MAG in `proceed-with-the-recommendation` (Law 5 + Law 7)

The flag only changes which of two skills to use for the four rows above.

### Runtime enforcement

One part of the override is backed by code: `hooks/companion-preference.mjs`, a PreToolUse hook on Claude Code. When a `Skill` tool call names one of the four mapped skills, the hook reads `companion_preference` from `~/.claude/settings.json` and:

- `ci-first` (default): allows the call.
- `companions-first`: prints a one-line stderr advisory naming the preferred companion, then allows the call.
- `strict-companions`: denies the call. The reason names the companion when its plugin is installed, or the `/plugin install <plugin>@continuous-improvement` hint when it is not.

What the hook cannot do:

- It matches four skill names only: `tdd-workflow`, `verification-loop`, `context-budget` and `ralph`, bare or with a `ci:` prefix. This plugin ships neither `context-budget` nor `ralph`, so a call that matches one of those two names a skill from somewhere else, and under `strict-companions` the hook denies it all the same. A plugin-namespaced name such as `continuous-improvement:tdd-workflow` does not match, so on a plugin install the hook usually sees nothing to act on and `strict-companions` denies nothing.
- It treats a companion as installed when the directory `~/.claude/plugins/<plugin>` exists. It does not check that the companion skill loaded or ran.
- It never starts a skill. Choosing the companion after a deny or an advisory is still the agent's step.

The override map inside `hooks/companion-preference.mjs` stays row-aligned with the "Which rows the override affects" table above. Drift surfaces in the hook test suite, which walks the same pairs and fails on any new CI→companion row that the hook does not recognize.

The hook fails open on its settings. If `~/.claude/settings.json` is missing, malformed, or unreadable, the hook treats the mode as `ci-first`, prints nothing and exits 0, which allows the call. A payload that is not valid JSON is allowed the same way.

### Telemetry

Every hook invocation that touches a mapped CI skill appends one JSONL line to `~/.claude/instincts/<project-hash>/companion-preference.jsonl`. The line carries `ts`, `mode`, `action`, `ci_skill`, `companion`, `plugin`, and `companion_installed`. The action enum is:

- `observation` — mode is `ci-first`; this is the shadow row showing what `companions-first` would have done.
- `advisory` — mode is `companions-first`; stderr advisory was emitted.
- `block` — mode is `strict-companions`; companion installed; tool call blocked.
- `block-not-installed` — mode is `strict-companions`; companion missing; blocked with install hint.

Non-mapped skills and non-`Skill` tool calls write nothing. The writer wraps `appendFileSync` in try/catch — telemetry failure never changes the hook decision, preserving the fail-open invariant. The JSONL file shows an operator which routing rows the override would touch, how often, and whether the companion was installed at the time, which is the evidence for choosing a setting. Read it with grep, or with `/companion-preference`, which runs the bundled report for the current project.

## Planning a release train

Use a stacked-PR plan when the user asks for a release train or independently releasable changes need an ordered rollout. A routine change spanning several files can stay one concern. Follow the repository's own branch, plan and review rules.

Record a **Per-PR table** (scope, verification and merge order), dependencies, the checkout or branch for each step and any exclusions. Use the `/release-train` command only within its approved rollout scope.

## Skill Library

Every skill in this list comes from the optional `superpowers` companion plugin, except `deploy-receipt`, which ships in this plugin. When the companion is not installed, the inline sections after this list cover testing, brainstorming, plans, review, subagents and worktrees; for debugging, use `agent-skills:debugging-and-error-recovery` if installed, or follow step 3 of the bundled `ship` skill: reproduce the failure, measure how often it fails if it is intermittent, and find its cause before changing code.

### Testing
- **test-driven-development** — RED-GREEN-REFACTOR cycle (includes testing anti-patterns reference)

### Debugging
- **systematic-debugging** — 4-phase root cause process (includes root-cause-tracing, defense-in-depth, condition-based-waiting techniques)
- **verification-before-completion** — Ensure it's actually fixed

### Collaboration
- **brainstorming** — Socratic design refinement
- **writing-plans** — Detailed implementation plans
- **executing-plans** — Batch execution with checkpoints
- **dispatching-parallel-agents** — Concurrent subagent workflows
- **requesting-code-review** — Pre-review checklist
- **receiving-code-review** — Responding to feedback
- **using-git-worktrees** — Parallel development branches
- **finishing-a-development-branch** — Merge/PR decision workflow
- **subagent-driven-development** — Fast iteration with two-stage review (spec compliance, then code quality)

### Deployment Verification
- **deploy-receipt** — Closes the merge-to-production gap on auto-deploy targets (CI-side companion to `finishing-a-development-branch`)

### Meta
- **writing-skills** — Create new skills following best practices (includes testing methodology)
- **using-superpowers** — Introduction to the skills system

## Test-Driven Development (inline fallback)

Use this section when no TDD skill in the routing table is installed.

```
RED: Write failing test → Watch it fail
GREEN: Write minimal code → Watch it pass
REFACTOR: Improve while staying green → Commit
```

Delete code you wrote in this session before its test, then write the test first. Keep code the user wrote or that was there before the session: write the test around it and show the test can fail without the change. Each step is done when you have seen the test run: failing for RED, passing for GREEN and after REFACTOR.

## Brainstorming Protocol

Read the project first. If a material design choice remains, use the decision rule above. Once the direction is settled, proceed with the authorized work.

## Plan Format

For a task needing a written plan, record enough to carry it out and check it. Example:

```yaml
- task: "Specific action"
  file: "exact/path/to/file.ext"
  code: "Complete implementation"
  verify: "How to confirm it works"
  estimate: "2-5 minutes"
```

## Code Review Severity

| Level | Action |
|-------|--------|
| Critical | Stop the task. Fix it before continuing. |
| Warning | Should fix. Note and continue. |
| Info | Noted for later. No action required. |

## Subagent Development

For an independently delegated implementation task, check:

1. **Spec compliance** — Does it match the plan?
2. **Code quality** — Is it clean, tested, and maintainable?

Resolve findings that affect the requested result. Small routine work can stay with the current agent.

## Git Worktrees

Use an isolated workspace when the repository requires it or another writer may overlap:

```bash
git worktree add -b feature-name ../feature-name
```

Clean separation, parallel development, easy cleanup.

## Using Superpowers

Match the request to a row of the four-source routing table above and follow its chain. Each example below shows the companion route; when that companion is not installed, take the next entry in the row or the inline section.

- "Help me choose a feature design" → `superpowers:brainstorming` when that design interview is requested.
- "Fix this bug" → `superpowers:systematic-debugging` → `superpowers:verification-before-completion`
- "Review this PR" → `superpowers:requesting-code-review`
- "Draft a PRD" / "Write OKRs" / "Build a persona" → install `phuryn/pm-skills` (out of band — see docs/THIRD_PARTY.md)
- "Run this PRD autonomously" → `oh-my-claudecode:ralph`
- "Fan out parallel provider migration" → `superpowers:dispatching-parallel-agents` → `ruflo-swarm:swarm-init`
- "Visual regression check the landing page" → `oh-my-claudecode:visual-verdict`

The agent does this matching itself, from the table. Two optional hooks touch routing and neither picks a skill for you: `hooks/route-prompt.mjs` (off by default, turned on with `CI_ROUTE_PROMPT=1`) adds a short skill suggestion when a prompt matches its table, and `hooks/companion-preference.mjs` acts only on the setting described under "Companion-Preference Override".

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.