# Give Your AI Agent Superpowers — Stop Spaghetti Code with a Senior-Engineer Workflow

Ever get frustrated when your AI coding agent (like Claude or Cursor) takes your prompt and immediately starts writing a tangled mess of code without thinking it through?

> [https://github.com/obra/superpowers](https://github.com/obra/superpowers)

**Superpowers** (`obra/superpowers`) isn’t just a prompt library—it’s a complete **Agentic Skills Framework & Software Development Methodology** that forces your AI to work like a disciplined Senior Engineer.

Here is everything you need to know to transform how your AI builds software.

#### 🧠 The Philosophy

The core principles of Superpowers are mandatory workflows, not mere suggestions:

*   **Systematic over ad-hoc:** Process over guessing.
    
*   **Test-Driven Development (TDD):** Write tests first, always. It enforces the RED-GREEN-REFACTOR cycle. It even deletes code written before a test exists.
    
*   **Complexity reduction:** Simplicity as the primary goal. Emphasizes YAGNI (You Aren't Gonna Need It) and DRY.
    
*   **Evidence over claims:** Verify before declaring success.
    

#### ⚙️ The Basic Workflow

Superpowers takes over from the moment you fire up your agent:

1.  **Brainstorming (Spec First):** It stops the AI from jumping into code. It asks Socratic questions to tease out a spec, showing you the design in short, digestible chunks for sign-off.
    
2.  **Writing Plans:** Once approved, the agent builds a crystal-clear implementation plan broken into 2-5 minute tasks. Each task gets exact file paths, expected code, and verification steps.
    
3.  **Execution & TDD:** After you say "go", it launches into action. It creates an isolated Git worktree on a new branch, runs project setup, and verifies a clean test baseline.
    
4.  **Subagent-Driven Development:** It dispatches a fresh subagent per task with a two-stage review process (spec compliance, then code quality). The AI can work autonomously for hours without deviating from your plan.
    
5.  **Finishing Up:** When tasks complete, it verifies tests, presents options to merge/PR/discard, and cleans up the worktree.
    

#### 🧰 What’s Inside? (The Core Skills)

Because these skills trigger automatically based on your conversation, you don't need to do anything special. Just ask for help, and the agent invokes the right superpower:

*   `brainstorming`: Socratic design refinement before writing code.
    
*   `using-git-worktrees`: Parallel development branches to keep your main workspace clean.
    
*   `writing-plans`: Detailed, step-by-step implementation plans.
    
*   `subagent-driven-development` / `executing-plans`: Dispatches subagents or executes in batches with human checkpoints.
    
*   `test-driven-development`: The rigid RED-GREEN-REFACTOR cycle.
    
*   `requesting-code-review`: A pre-review checklist that blocks progress if critical issues are found.
    
*   `systematic-debugging`: A 4-phase root cause process to fix bugs properly.
    

#### 🚀 Installation Guide

Installation varies depending on your AI coding platform:

**Claude Code:** Available via the official marketplace.

```bash
/plugin install superpowers@claude-plugins-official
```

*(Alternatively, add the custom marketplace first:* `/plugin marketplace add obra/superpowers-marketplace` *then install* `superpowers@superpowers-marketplace`*)*

**Cursor:** In the Cursor Agent chat, type:

```bash
/add-plugin superpowers
```

*(Or search for "superpowers" in the plugin marketplace).*

**OpenCode / Codex:** Tell your agent:

> "Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.opencode/INSTALL.md" *(swap* `.opencode` *with* `.codex` *for Codex).*

**Gemini Extensions:**

```bash
gemini extensions install https://github.com/obra/superpowers
```
