Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

Feat/claude code plugin (#6)

RaghavChamadiya0881cc10631c
diff --git a/.gitignore b/.gitignore
index c0af38667..5d036515a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -137,3 +137,19 @@ providers/
# Private release notes
docs/PYPI_RELEASE.md
+
+# Frontend (separate repo, not part of OSS)
+frontend/
+
+# Local dev artifacts
+.mcp.json
+!plugins/**/.mcp.json
+BUILD_STATUS.md
+PLAN.md
+TESTING_GUIDE.md
+provider_config.json
+run_ingest.py
+run_test.ps1
+smoke_test.py
+integrations/
+providers/
diff --git a/README.md b/README.md
index fd8ce7b8c..976926c3a 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,20 @@ MCP server so AI coding assistants can query it in real time.
## Install
+### Claude Code Plugin (recommended)
+
+The fastest way to get started — Claude handles installation, configuration, and indexing for you:
+
+```
+/plugin marketplace add repowise-dev/repowise-plugin
+/plugin install repowise@repowise
+/repowise:init
+```
+
+That's it. Claude walks you through choosing a mode, setting up your API key, and indexing your codebase. The plugin also auto-registers the MCP server and teaches Claude to use Repowise tools proactively.
+
+### pip
+
```bash
pip install repowise
```
@@ -39,6 +53,12 @@ pip install "repowise[all]" # Everything
## Quick Start
+### With Claude Code (interactive)
+
+After installing the plugin, just run `/repowise:init` and Claude guides you through everything. Or ask naturally — "set up repowise for this repo" works too.
+
+### From the CLI
+
```bash
# Set your API key
export ANTHROPIC_API_KEY="sk-ant-..." # or OPENAI_API_KEY, GEMINI_API_KEY
@@ -47,6 +67,9 @@ export ANTHROPIC_API_KEY="sk-ant-..." # or OPENAI_API_KEY, GEMINI_API_KEY
cd /path/to/your-repo
repowise init
+# Or skip LLM docs — just graph + git + dead code (free, <60 seconds)
+repowise init --index-only
+
# Keep docs in sync after code changes
repowise update
@@ -98,7 +121,7 @@ Once connected via `repowise mcp`, your AI editor gets 8 tools:
| `get_dead_code` | Tiered dead code report grouped by confidence |
| `get_architecture_diagram` | Mermaid diagram with optional churn heat map |
-Works with Claude Code, Cursor, Windsurf, Cline, and any MCP-compatible editor.
+Works with Claude Code, Cursor, Windsurf, Cline, and any MCP-compatible editor. For Claude Code, the [plugin](https://github.com/repowise-dev/repowise-plugin) auto-registers the MCP server — no manual config needed.
## Web UI
diff --git a/plugins/claude-code/.claude-plugin/marketplace.json b/plugins/claude-code/.claude-plugin/marketplace.json
new file mode 100644
index 000000000..a7439ab10
--- /dev/null
+++ b/plugins/claude-code/.claude-plugin/marketplace.json
@@ -0,0 +1,21 @@
+{
+ "name": "repowise",
+ "owner": {
+ "name": "Repowise",
+ "email": "[email protected]"
+ },
+ "metadata": {
+ "description": "Codebase intelligence layer — graph, git, docs, and architectural decisions for AI coding agents.",
+ "version": "0.1.0"
+ },
+ "plugins": [
+ {
+ "name": "repowise",
+ "source": ".",
+ "description": "Codebase intelligence for Claude Code. Understand architecture, ownership, hotspots, and decisions.",
+ "version": "0.1.0",
+ "category": "productivity",
+ "tags": ["codebase", "documentation", "architecture", "mcp", "graph", "git-intelligence"]
+ }
+ ]
+}
diff --git a/plugins/claude-code/.claude-plugin/plugin.json b/plugins/claude-code/.claude-plugin/plugin.json
new file mode 100644
index 000000000..28ac17e98
--- /dev/null
+++ b/plugins/claude-code/.claude-plugin/plugin.json
@@ -0,0 +1,13 @@
+{
+ "name": "repowise",
+ "description": "Codebase intelligence for Claude Code. Indexes your codebase into four layers (Graph, Git, Docs, Decisions) and gives Claude deep understanding of architecture, ownership, hotspots, and why code is built the way it is.",
+ "version": "0.1.0",
+ "author": {
+ "name": "Repowise",
+ "email": "[email protected]"
+ },
+ "homepage": "https://repowise.dev",
+ "repository": "https://github.com/repowise/repowise",
+ "license": "AGPL-3.0",
+ "keywords": ["codebase", "documentation", "architecture", "mcp", "intelligence", "graph", "git"]
+}
diff --git a/plugins/claude-code/.mcp.json b/plugins/claude-code/.mcp.json
new file mode 100644
index 000000000..ded3c4932
--- /dev/null
+++ b/plugins/claude-code/.mcp.json
@@ -0,0 +1,9 @@
+{
+ "mcpServers": {
+ "repowise": {
+ "command": "repowise",
+ "args": ["mcp"],
+ "env": {}
+ }
+ }
+}
diff --git a/plugins/claude-code/DEVELOPER.md b/plugins/claude-code/DEVELOPER.md
new file mode 100644
index 000000000..d9edaf516
--- /dev/null
+++ b/plugins/claude-code/DEVELOPER.md
@@ -0,0 +1,267 @@
+# Repowise Claude Code Plugin — Developer Guide
+
+Internal reference for maintaining, updating, and releasing the plugin.
+
+## Repository Layout
+
+The plugin lives in two places:
+
+1. **Monorepo**: `plugins/claude-code/` inside the main `repowise` repo
+2. **Standalone**: `repowise-dev/repowise-plugin` on GitHub (what users install from)
+
+Changes should be made in the monorepo first, tested locally, then synced to the standalone repo for release.
+
+## File Structure
+
+```
+repowise-plugin/ # Standalone repo root
+├── .claude-plugin/
+│ ├── plugin.json # Plugin identity (name, version, author)
+│ └── marketplace.json # Marketplace manifest (enables /plugin install)
+├── .mcp.json # Auto-registers repowise MCP server
+├── commands/ # User-invoked slash commands
+│ ├── init.md # /repowise:init — full setup wizard
+│ ├── status.md # /repowise:status — health check
+│ ├── update.md # /repowise:update — incremental sync
+│ ├── search.md # /repowise:search — wiki search
+│ └── reindex.md # /repowise:reindex — rebuild embeddings
+├── skills/ # Model-invoked skills (Claude auto-activates)
+│ ├── codebase-exploration/
+│ │ └── SKILL.md # Teaches Claude to use get_overview, search_codebase
+│ ├── pre-modification/
+│ │ └── SKILL.md # Teaches Claude to check get_risk before edits
+│ ├── architectural-decisions/
+│ │ └── SKILL.md # Teaches Claude to query get_why
+│ └── dead-code-cleanup/
+│ └── SKILL.md # Teaches Claude to use get_dead_code
+├── .gitignore
+├── CHANGELOG.md
+├── LICENSE # AGPL-3.0 (same as main repo)
+└── README.md # User-facing docs
+```
+
+### What each file does
+
+**`.claude-plugin/plugin.json`** — The only required file. Defines plugin name (used as slash command namespace `repowise:`), version, and metadata. Claude Code reads this to register the plugin.
+
+**`.claude-plugin/marketplace.json`** — Makes the repo a self-hosted marketplace. The `plugins[].source: "."` tells Claude Code the plugin root is the repo root itself. Without this file, users can't `/plugin install` from this repo.
+
+**`.mcp.json`** — When the plugin is enabled, Claude Code auto-starts `repowise mcp` as an MCP server. This is what gives Claude access to the 8 tools. Uses `mcpServers` wrapper key. The `repowise` binary must be on PATH (the init command handles installation).
+
+**`commands/*.md`** — Markdown files that become `/repowise:<filename>` slash commands. Frontmatter defines `description`, `allowed-tools`, etc. The `$ARGUMENTS` placeholder captures user input after the command name.
+
+**`skills/*/SKILL.md`** — Model-invoked skills. Claude reads the `description` in frontmatter to decide when to activate them. Not shown in the `/` menu (`user-invocable: false`). Keep under 80 lines — bloated skills get ignored.
+
+## How Commands vs Skills Work
+
+| | Commands | Skills |
+|---|---|---|
+| **Trigger** | User types `/repowise:init` | Claude decides based on context |
+| **Location** | `commands/<name>.md` | `skills/<name>/SKILL.md` |
+| **Namespace** | `/repowise:<filename>` | `repowise:<dirname>` |
+| **Frontmatter** | `allowed-tools`, `description` | `name`, `description`, `user-invocable` |
+| **Content** | Step-by-step instructions for Claude to follow | Behavioral guidance for when/how to use tools |
+
+## Local Development
+
+### Testing the plugin
+
+From the monorepo root:
+
+```bash
+claude --plugin-dir ./plugins/claude-code
+```
+
+Then test:
+- `/repowise:init` — walks through setup
+- `/repowise:status` — shows sync state
+- Ask "how does the auth module work?" — should trigger codebase-exploration skill
+- Start editing a file — should trigger pre-modification skill
+
+After making changes, run `/reload-plugins` inside Claude Code to pick them up without restarting.
+
+### Testing with multiple plugins
+
+```bash
+claude --plugin-dir ./plugins/claude-code --plugin-dir ./other-plugin
+```
+
+## Syncing to the Standalone Repo
+
+The standalone repo is a flat copy of `plugins/claude-code/` plus standalone-only files (LICENSE, CHANGELOG.md, .gitignore).
+
+### First-time setup (already done)
+
+```bash
+# Clone the standalone repo somewhere
+git clone https://github.com/repowise-dev/repowise-plugin.git /tmp/repowise-plugin
+```
+
+### Syncing changes
+
+```bash
+# From the monorepo
+PLUGIN_SRC="plugins/claude-code"
+STANDALONE="/tmp/repowise-plugin"
+
+# Copy plugin files (overwrite)
+cp -r $PLUGIN_SRC/.claude-plugin $STANDALONE/
+cp $PLUGIN_SRC/.mcp.json $STANDALONE/
+cp -r $PLUGIN_SRC/commands $STANDALONE/
+cp -r $PLUGIN_SRC/skills $STANDALONE/
+cp $PLUGIN_SRC/README.md $STANDALONE/
+
+# Review, commit, push
+cd $STANDALONE
+git diff
+git add -A
+git commit -m "Sync from monorepo: <describe changes>"
+git push origin main
+```
+
+## Releasing a New Version
+
+### 1. Bump the version
+
+Update version in both files:
+- `.claude-plugin/plugin.json` → `"version": "0.2.0"`
+- `.claude-plugin/marketplace.json` → `"version": "0.2.0"` (in both `metadata` and `plugins[0]`)
+
+Version in `plugin.json` wins if they conflict, but keep them in sync.
+
+### 2. Update CHANGELOG.md
+
+Add a new section at the top:
+
+```markdown
+## 0.2.0 (YYYY-MM-DD)
+
+### Added
+- New skill for X
+
+### Changed
+- Updated init command to support Y
+
+### Fixed
+- Fixed Z in search command
+```
+
+### 3. Commit and tag
+
+```bash
+git add -A
+git commit -m "Release v0.2.0 — <summary>"
+git tag v0.2.0
+git push origin main
+git push origin v0.2.0
+```
+
+### 4. Create GitHub release
+
+```bash
+gh release create v0.2.0 --title "v0.2.0 — <title>" --notes-file CHANGELOG_EXCERPT.md
+```
+
+Or create it from the web at https://github.com/repowise-dev/repowise-plugin/releases/new.
+
+### 5. Users get the update
+
+Users run:
+```
+/plugin update repowise@repowise
+```
+
+This pulls the latest from the marketplace repo. The version bump in `plugin.json` drives cache invalidation — without bumping the version, users may get a stale cached copy.
+
+## Adding New Components
+
+### Adding a new command
+
+1. Create `commands/<name>.md` with frontmatter:
+ ```yaml
+ ---
+ description: One-line description of what it does
+ allowed-tools: Bash, Read
+ ---
+ ```
+2. Write the step-by-step instructions Claude should follow.
+3. It automatically becomes `/repowise:<name>`.
+
+### Adding a new skill
+
+1. Create `skills/<name>/SKILL.md` with frontmatter:
+ ```yaml
+ ---
+ name: <name>
+ description: >
+ When to activate this skill. Be specific — Claude uses this text to decide
+ whether to load the skill. Front-load keywords users would say.
+ user-invocable: false
+ ---
+ ```
+2. Write prescriptive instructions (not explanations). Keep under 80 lines.
+3. The description is critical — it's the activation trigger.
+
+### Adding supporting files to a skill
+
+Skills can include extra files in their directory:
+```
+skills/my-skill/
+├── SKILL.md # Required — main instructions
+├── reference.md # Loaded on demand
+└── scripts/
+ └── helper.sh # Claude can execute this
+```
+
+Reference them from SKILL.md so Claude knows they exist.
+
+### Adding a hook
+
+Create `hooks/hooks.json` at the plugin root:
+```json
+{
+ "hooks": {
+ "PostToolUse": [
+ {
+ "matcher": "Write|Edit",
+ "hooks": [{ "type": "command", "command": "echo 'file modified'" }]
+ }
+ ]
+ }
+}
+```
+
+### Adding an agent
+
+Create `agents/<name>.md` at the plugin root:
+```yaml
+---
+name: agent-name
+description: What this agent does
+model: sonnet
+---
+
+System prompt for the agent...
+```
+
+## Key Gotchas
+
+1. **Version bumps are required for updates.** Without bumping `plugin.json` version, `/plugin update` may serve a cached copy.
+
+2. **Keep skills concise.** Claude ignores bloated skill files. Under 80 lines, prescriptive not verbose.
+
+3. **Skill descriptions are truncated at 250 chars.** Front-load the key use case and trigger words.
+
+4. **`.mcp.json` needs the `mcpServers` wrapper key.** Not just the server name at the top level.
+
+5. **Don't put files inside `.claude-plugin/`.** Only `plugin.json` and `marketplace.json` go there. Everything else (`commands/`, `skills/`, `hooks/`) must be at the plugin root.
+
+6. **`$ARGUMENTS` in commands.** If you use `$ARGUMENTS` in the markdown, it gets replaced with whatever the user typed after the slash command. If you don't use it, the args are appended as `ARGUMENTS: <value>`.
+
+7. **The repowise CLI flags.** Always check the actual CLI (`repowise <cmd> --help`) before writing commands. Key flags that are easy to get wrong:
+ - `--index-only` (not `--no-llm`)
+ - `--concurrency` (not `--concurrent`)
+ - `--commit-limit` (not `--git-depth`)
+ - `--embedder` (not `--embedding-provider`)
+
+8. **Graceful degradation.** Skills must handle the case where MCP tools fail (repowise not installed or repo not indexed). Always include fallback guidance pointing to `/repowise:init`.
diff --git a/plugins/claude-code/README.md b/plugins/claude-code/README.md
new file mode 100644
index 000000000..f3852c03a
--- /dev/null
+++ b/plugins/claude-code/README.md
@@ -0,0 +1,90 @@
+# Repowise Plugin for Claude Code
+
+Gives Claude Code deep understanding of your codebase — architecture, ownership, hotspots, dependencies, and architectural decisions.
+
+## Install
+
+### From Marketplace
+
+```shell
+/plugin marketplace add repowise-dev/repowise-plugin
+/plugin install repowise@repowise
+```
+
+### Local Development
+
+```shell
+claude --plugin-dir ./plugins/claude-code
+```
+
+## Quick Start
+
+After installing the plugin, just run:
+
+```
+/repowise:init
+```
+
+Claude will walk you through everything: installing repowise, choosing a mode, configuring your LLM provider, and indexing your codebase.
+
+## What You Get
+
+### Slash Commands
+
+| Command | What it does |
+|---------|-------------|
+| `/repowise:init` | Interactive setup — installs repowise, asks your preferences, indexes your codebase |
+| `/repowise:status` | Health check — sync state, page counts, provider info |
+| `/repowise:update` | Incremental update — sync docs with recent code changes |
+| `/repowise:search` | Search across the codebase wiki (fulltext, semantic, or symbol) |
+| `/repowise:reindex` | Rebuild the vector store (re-embed, no LLM calls) |
+
+### Automatic Skills
+
+Claude automatically uses Repowise when relevant — no slash commands needed:
+
+- **Codebase exploration** — uses `get_overview()` and `search_codebase()` before reading raw files
+- **Pre-modification checks** — calls `get_risk()` before editing files to assess impact
+- **Architectural decisions** — queries `get_why()` when encountering "why" questions
+- **Dead code cleanup** — calls `get_dead_code()` during cleanup and refactoring tasks
+
+### MCP Tools (8 total)
+
+Registered automatically when the plugin is installed:
+
+| Tool | Purpose |
+|------|---------|
+| `get_overview` | Architecture summary, module map, entry points |
+| `get_context` | Docs + ownership + history + decisions for files/modules |
+| `get_risk` | Hotspot score, dependents, co-change partners |
+| `get_why` | Architectural decisions — search, path-based, or health dashboard |
+| `search_codebase` | Semantic search over the full wiki |
+| `get_dependency_path` | How two modules/files are connected |
+| `get_dead_code` | Unused code findings sorted by confidence |
+| `get_architecture_diagram` | Mermaid diagram for repo or module |
+
+## Setup Modes
+
+| Mode | What you get | Requirements | Time |
+|------|-------------|-------------|------|
+| **Full** | Graph + Git + Docs + Decisions + Search | LLM API key | ~25 min / 3k files |
+| **Index-only** | Graph + Git + Dead Code | Nothing | < 60 seconds |
+| **Local (Ollama)** | Full mode, fully offline | Ollama running | ~45 min / 3k files |
+
+Run `/repowise:init` and Claude will guide you through choosing the right mode.
+
+## Requirements
+
+- Python 3.10+
+- Git (for git intelligence features)
+- Claude Code 1.0.33+
+
+## Troubleshooting
+
+**MCP tools not connecting:** Run `/repowise:init` — the plugin auto-registers the MCP server, but the `repowise` binary needs to be installed and on PATH.
+
+**`pip install` fails on Windows:** Try `python -m pip install repowise` instead.
+
+**Semantic search returns no results:** Your repo may be in index-only mode (no wiki pages). Run `/repowise:init` again with an LLM provider, or run `/repowise:reindex` if pages exist but embeddings are missing.
+
+**Stale documentation:** Run `/repowise:update` to sync with recent code changes.
diff --git a/plugins/claude-code/commands/init.md b/plugins/claude-code/commands/init.md
new file mode 100644
index 000000000..dca71f2a0
--- /dev/null
+++ b/plugins/claude-code/commands/init.md
@@ -0,0 +1,161 @@
+---
+description: Set up Repowise for this codebase. Installs if needed, asks about your preferences, and runs the indexing.
+allowed-tools: Bash, Read, Write, AskFollowupQuestion
+---
+
+# Repowise Init
+
+You are helping the user set up Repowise for their codebase. Follow this sequence precisely.
+
+## Step 1: Check if repowise is installed
+
+Run: `repowise --version`
+
+If the command fails or is not found, ask the user:
+
+"Repowise isn't installed yet. I can install it for you. Which do you prefer?"
+- `pip install repowise` (recommended)
+- `pip install "repowise[all]"` (includes all LLM provider dependencies)
+- "I'll install it myself"
+
+If they want you to install it, run `pip install repowise`. If that fails, try `python -m pip install repowise`.
+
+After install, verify with `repowise --version`.
+
+If repowise IS found, print the version and move to Step 2.
+
+## Step 2: Check if this repo is already indexed
+
+Check if `.repowise/` directory exists in the project root.
+
+If it exists, tell the user:
+"This repo is already indexed by Repowise. Run `/repowise:status` to check health, or `/repowise:update` to refresh. If you want to re-index from scratch, I can run `repowise init --force`."
+
+Then stop — do not continue to Step 3 unless the user asks to re-index.
+
+If `.repowise/` doesn't exist, move to Step 3.
+
+## Step 3: Ask about mode
+
+Ask the user ONE question:
+
+"How would you like to set up Repowise?
+
+1. **Index-only mode** — no LLM needed. Builds the dependency graph, mines git history, detects dead code. Runs in under 60 seconds. You get graph intelligence, git ownership, hotspots, and dead code detection — but no generated documentation or semantic search.
+2. **Full mode** — generates rich documentation using an LLM. Requires an API key (Anthropic, OpenAI, Google Gemini, or Ollama for local). Takes longer but gives you the best results — full wiki, semantic search, and RAG context.
+3. **I'll configure it myself** — just show me the available flags."
+
+### If Index-only mode:
+
+Skip provider selection. Construct:
+```
+repowise init --index-only
+```
+
+Jump to Step 5.
+
+### If Full mode:
+
+Move to Step 4.
+
+### If "show me flags":
+
+Print the full flag reference:
+```
+repowise init [PATH]
+
+Core flags:
+ --provider NAME LLM provider: anthropic, openai, gemini, ollama, litellm
+ --model NAME Model identifier override
+ --index-only Analysis-only mode. No docs generation, no API key needed.
+
+Embeddings:
+ --embedder NAME Embedding provider: gemini, openai, mock (default: auto-detect)
+
+Cost control:
+ --concurrency N Max parallel LLM calls (default: 5)
+ --test-run Limit to top 10 files by PageRank for quick validation
+
+Exclusions:
+ -x, --exclude PATTERN Gitignore-style exclude patterns. Repeatable.
+ Example: -x 'vendor/**' -x 'generated/'
+ --skip-tests Skip test files
+ --skip-infra Skip infrastructure files (Dockerfile, Makefile, Terraform, shell)
+
+Git:
+ --commit-limit N Max commits to analyze per file (default: 500, max: 5000)
+ --follow-renames Track files across renames (slower but more accurate history)
+
+Output:
+ --no-claude-md Don't generate/update CLAUDE.md
+ -y, --yes Skip cost confirmation prompt
+
+Recovery:
+ --resume Resume a previously interrupted init
+ --force Re-index from scratch, overwriting existing .repowise/
+
+Dry run:
+ --dry-run Show generation plan and cost estimate without running
+```
+
+Then ask if they want you to construct a command or if they'll handle it.
+
+## Step 4: Provider selection (full mode only)
+
+Check which API keys are already set by running:
+```bash
+echo "ANTHROPIC=${ANTHROPIC_API_KEY:+set}" "OPENAI=${OPENAI_API_KEY:+set}" "GEMINI=${GEMINI_API_KEY:+set}${GOOGLE_API_KEY:+set}" "OLLAMA=${OLLAMA_BASE_URL:+set}"
+```
+
+If one or more keys are detected, suggest the detected provider:
+- `ANTHROPIC_API_KEY` set → suggest `--provider anthropic`
+- `OPENAI_API_KEY` set → suggest `--provider openai`
+- `GEMINI_API_KEY` or `GOOGLE_API_KEY` set → suggest `--provider gemini`
+- `OLLAMA_BASE_URL` set → suggest `--provider ollama`
+
+If no key is detected, ask:
+
+"Which LLM provider do you want to use?"
+- **Anthropic** (Claude) — needs `ANTHROPIC_API_KEY`
+- **OpenAI** (GPT-4o or compatible) — needs `OPENAI_API_KEY`
+- **Google Gemini** (recommended for cost efficiency) — needs `GEMINI_API_KEY` or `GOOGLE_API_KEY`
+- **Ollama** (fully local, no API key, slower) — needs Ollama running locally
+- **LiteLLM** (100+ providers) — needs LiteLLM config
+
+Then ask them to set the required environment variable. Show the exact export command:
+```bash
+export ANTHROPIC_API_KEY="sk-ant-..."
+```
+
+Also check if the provider's Python package is installed. If using anthropic and it's not installed:
+```
+pip install "repowise[anthropic]"
+```
+Similarly for openai (`repowise[openai]`) and gemini (`repowise[gemini]`).
+
+## Step 5: Exclusions
+
+Before running the command, ask:
+
+"Any directories or patterns you want to exclude from indexing? Common ones to skip: `vendor/`, `generated/`, large data directories, build artifacts. Your `.gitignore` is already respected automatically. Press Enter to skip."
+
+Add any exclusions as `-x` flags.
+
+## Step 6: Run it
+
+Show the user the exact command you're about to run. Ask for confirmation.
+
+Run it. For full mode, note: "This will take a while for the initial indexing. You can Ctrl+C safely — run `/repowise:init` again and I'll use `--resume` to continue where you left off."
+
+## Step 7: Post-setup
+
+After init completes successfully:
+
+1. Confirm the `.repowise/` directory was created
+2. Run `repowise status` to show the summary
+3. Tell the user:
+ - "Repowise has indexed your codebase. The MCP tools are now active — I can answer questions about your architecture, ownership, dependencies, and more."
+ - "Try asking me something like 'how does the auth module work?' or 'what depends on utils.py?'"
+ - "Run `/repowise:status` anytime to check the health of your index."
+ - "Run `/repowise:update` after making code changes to keep the wiki in sync."
+4. If CLAUDE.md was generated (default): "I've also generated a CLAUDE.md with codebase context that I'll read on every session."
diff --git a/plugins/claude-code/commands/reindex.md b/plugins/claude-code/commands/reindex.md
new file mode 100644
index 000000000..0497d9dc0
--- /dev/null
+++ b/plugins/claude-code/commands/reindex.md
@@ -0,0 +1,34 @@
+---
+description: Rebuild the Repowise vector store by re-embedding all wiki pages. No LLM calls — only embedding API calls.
+allowed-tools: Bash, Read, AskFollowupQuestion
+---
+
+# Repowise Reindex
+
+Rebuild the vector store (embeddings) without regenerating documentation.
+
+This is useful when:
+- You switched embedding providers
+- The LanceDB vector data got corrupted
+- You want to refresh search quality after adding new wiki pages
+
+## Steps
+
+1. Check if `.repowise/` exists. If not: "This repo isn't indexed yet. Run `/repowise:init` first."
+
+2. Run: `repowise reindex`
+
+ This re-embeds all existing wiki pages into LanceDB. No LLM generation calls — only embedding API calls. Fast and cheap.
+
+## Available flags
+
+- `--embedder gemini|openai|auto` — embedding provider (default: auto-detect from env vars)
+- `--batch-size N` — pages per embedding batch (default: 20)
+
+## Requirements
+
+Requires either `GEMINI_API_KEY`/`GOOGLE_API_KEY` or `OPENAI_API_KEY` to be set. The mock embedder is not accepted for reindexing. If neither key is available, ask the user to set one before proceeding.
+
+## Handling $ARGUMENTS
+
+If $ARGUMENTS contains "full" or "from-scratch", confirm with the user: "This will regenerate ALL documentation from scratch, not just re-embed. It will take as long as the initial indexing and cost API tokens. Are you sure?" If yes: `repowise init --force`
diff --git a/plugins/claude-code/commands/search.md b/plugins/claude-code/commands/search.md
new file mode 100644
index 000000000..804ae7221
--- /dev/null
+++ b/plugins/claude-code/commands/search.md
@@ -0,0 +1,36 @@
+---
+description: Search the Repowise wiki using natural language, full-text, or symbol search.
+allowed-tools: Bash, Read
+---
+
+# Repowise Search
+
+Search the codebase wiki.
+
+## Usage
+
+If $ARGUMENTS is empty, ask: "What are you looking for? You can search with natural language like 'how does authentication work' or 'where is rate limiting handled'."
+
+If $ARGUMENTS is provided, run:
+```
+repowise search "$ARGUMENTS"
+```
+
+## Search modes
+
+The default mode is `fulltext` (SQLite FTS5). You can specify a mode:
+
+- `--mode fulltext` — fast keyword search (default)
+- `--mode semantic` — vector similarity search using embeddings. Requires an embedding provider to be configured. If this fails with an error, suggest running `/repowise:reindex` first.
+- `--mode symbol` — fuzzy match on symbol names (functions, classes, variables)
+
+Other flags:
+- `--limit N` — max results (default: 10)
+
+## Present results
+
+Show results as a clean list with the page title, type, and a brief snippet.
+
+## Analysis-only mode
+
+If the search returns no results and the repo appears to be in analysis-only mode (no wiki pages), tell the user: "Semantic and full-text search require documentation to be generated. Your repo is in analysis-only mode. Run `/repowise:init` again with an LLM provider to enable full documentation and search. Symbol search (`--mode symbol`) may still work."
diff --git a/plugins/claude-code/commands/status.md b/plugins/claude-code/commands/status.md
new file mode 100644
index 000000000..334f2a3bf
--- /dev/null
+++ b/plugins/claude-code/commands/status.md
@@ -0,0 +1,24 @@
+---
+description: Check the health of your Repowise index — sync state, page counts, provider, and token usage.
+allowed-tools: Bash, Read
+---
+
+# Repowise Status
+
+Check if Repowise is set up for this project and report its health.
+
+## Steps
+
+1. Check if `.repowise/` directory exists in the project root. If not: "This repo isn't indexed yet. Run `/repowise:init` to set it up."
+
+2. Run: `repowise status`
+
+3. The command outputs two tables:
+ - **Sync State**: last sync commit, total pages, provider, model, total tokens
+ - **Pages by Type**: breakdown by page type (file_page, module_page, etc.) with counts
+
+4. Present the results to the user in a readable summary.
+
+5. If total pages is 0 and no provider is shown, this was likely an index-only run. Tell the user: "Your repo is in analysis-only mode (graph + git + dead code). Run `/repowise:init` again with an LLM provider to generate full documentation and enable semantic search."
+
+6. If the user provides arguments like "$ARGUMENTS", check if they're asking for a specific path and pass it: `repowise status $ARGUMENTS`
diff --git a/plugins/claude-code/commands/update.md b/plugins/claude-code/commands/update.md
new file mode 100644
index 000000000..2d72df5b3
--- /dev/null
+++ b/plugins/claude-code/commands/update.md
@@ -0,0 +1,40 @@
+---
+description: Trigger an incremental Repowise update to sync documentation with recent code changes.
+allowed-tools: Bash, Read
+---
+
+# Repowise Update
+
+Trigger an incremental update of the Repowise index.
+
+## Steps
+
+1. Check if `.repowise/` exists. If not: "This repo isn't indexed yet. Run `/repowise:init` first."
+
+2. Run: `repowise update`
+
+ This will:
+ - Detect files changed since last sync commit
+ - Update git metadata for changed files
+ - Regenerate affected wiki pages (up to cascade budget of 30)
+ - Decay confidence scores for indirectly affected pages
+ - Update dead code analysis
+ - Update CLAUDE.md if enabled
+
+3. Show the output summary to the user.
+
+## Available flags
+
+- `--provider NAME` — override the LLM provider
+- `--model NAME` — override the model
+- `--since REF` — base git ref to diff from (overrides saved last_sync_commit). Accepts a commit SHA, tag, or branch name.
+- `--cascade-budget N` — max pages to regenerate per run (default: 30)
+- `--dry-run` — show affected pages without regenerating
+
+## Handling $ARGUMENTS
+
+If the user provides arguments:
+- "dry-run" or "dry run" → add `--dry-run` flag
+- "force" or "full" → add `--cascade-budget 999` to regenerate all stale pages
+- a git ref like a SHA or tag → add `--since {ref}`
+- a file path → this is not supported by update; suggest `repowise update` which auto-detects changes
diff --git a/plugins/claude-code/skills/architectural-decisions/SKILL.md b/plugins/claude-code/skills/architectural-decisions/SKILL.md
new file mode 100644
index 000000000..a90ebda1b
--- /dev/null
+++ b/plugins/claude-code/skills/architectural-decisions/SKILL.md
@@ -0,0 +1,41 @@
+---
+name: architectural-decisions
+description: >
+ Use when encountering questions about WHY code is built a certain way, when about to make
+ architectural changes (new patterns, restructuring, choosing between approaches), or when
+ the user asks about design rationale in a Repowise-indexed codebase (.repowise/ directory exists).
+ Also activates when commit messages or code comments contain decision signals like "WHY:",
+ "DECISION:", "TRADEOFF:", "ADR:".
+user-invocable: false
+---
+
+# Architectural Decisions with Repowise
+
+Repowise captures architectural decisions — the *why* behind how code is built.
+
+## When the user asks "why is X built this way?"
+
+Call `get_why(query="X")` to search across all captured decisions. This searches:
+- Inline decision markers in code (`# WHY:`, `# DECISION:`, `# TRADEOFF:`)
+- Decisions extracted from git history (migrations, refactors)
+- Decisions mined from documentation
+
+## When about to make an architectural change
+
+1. Call `get_why(query="the specific area you're changing")` to find existing decisions that govern that area.
+2. If decisions are found, present them to the user before proceeding — they may not want to contradict an existing architectural choice.
+3. If no decisions are found, proceed but note that no recorded decision governs this area.
+
+## When called with no specific query
+
+Call `get_why()` with no arguments to get the decision health dashboard:
+- Stale decisions that may no longer apply
+- Ungoverned hotspots (high-churn files with no recorded decisions)
+
+## When a file has decision markers
+
+If you see `# WHY:`, `# DECISION:`, `# TRADEOFF:`, or `# ADR:` comments in code, call `get_context(targets=["that_file.py"])` to see the full decision record with context and affected modules.
+
+## Recording new decisions
+
+If the user makes an architectural decision during the conversation, suggest: "Want to record this decision? Add a `# DECISION:` comment in the relevant code, or run `repowise decision add` to capture it formally."
diff --git a/plugins/claude-code/skills/codebase-exploration/SKILL.md b/plugins/claude-code/skills/codebase-exploration/SKILL.md
new file mode 100644
index 000000000..055c7a260
--- /dev/null
+++ b/plugins/claude-code/skills/codebase-exploration/SKILL.md
@@ -0,0 +1,37 @@
+---
+name: codebase-exploration
+description: >
+ Use when exploring, understanding, or answering questions about a codebase that has Repowise
+ indexed (indicated by a .repowise/ directory in the project root). Activates for questions like
+ "how does X work", "explain the architecture", "where is Y implemented", "what does this module do",
+ or any task requiring understanding of codebase structure before diving into source files.
+user-invocable: false
+---
+
+# Codebase Exploration with Repowise
+
+This project has a Repowise intelligence layer. Before reading raw source files to understand the codebase, use Repowise MCP tools — they provide richer context including documentation, ownership, history, and architectural decisions.
+
+## When starting a new exploration task
+
+Call `get_overview()` first. This returns the architecture summary, module map, entry points, and tech stack. This single call replaces reading dozens of files to understand the project structure.
+
+## When answering "how does X work" questions
+
+1. Call `search_codebase(query="X")` to find the most relevant documented modules and files.
+2. Call `get_context(targets=[...relevant files from search results...])` to get full documentation, ownership, freshness, and decisions for those targets. Batch all targets in one call.
+3. Only read raw source files if the Repowise docs don't cover enough detail for the specific question.
+
+## When asked about connections between modules
+
+Call `get_dependency_path(source="module_a", target="module_b")` to understand how two parts of the codebase are connected through the dependency graph.
+
+## When you need a visual overview
+
+Call `get_architecture_diagram(scope="module", path="path/to/module")` for a Mermaid diagram of a specific subsystem, or `get_architecture_diagram()` for the full repo.
+
+## Error handling
+
+- If tools return "No repositories found. Run 'repowise init' first." — suggest the user run `/repowise:init`.
+- If `search_codebase` returns empty results — the repo may be in analysis-only mode (no wiki pages). Note this and fall back to `get_context` with specific file paths, or suggest upgrading to full mode.
+- If tools fail to connect entirely — the `repowise` binary may not be installed. Suggest `/repowise:init`.
diff --git a/plugins/claude-code/skills/dead-code-cleanup/SKILL.md b/plugins/claude-code/skills/dead-code-cleanup/SKILL.md
new file mode 100644
index 000000000..feab4a04d
--- /dev/null
+++ b/plugins/claude-code/skills/dead-code-cleanup/SKILL.md
@@ -0,0 +1,40 @@
+---
+name: dead-code-cleanup
+description: >
+ Use when the user asks about cleanup, removing unused code, refactoring, reducing bundle size,
+ or identifying dead code in a Repowise-indexed codebase (.repowise/ directory exists). Also
+ activates when discussing technical debt, code hygiene, or repository maintenance.
+user-invocable: false
+---
+
+# Dead Code Cleanup with Repowise
+
+Repowise detects dead code through graph analysis — no LLM needed, works even in index-only mode.
+
+## When the user asks about dead/unused code
+
+Call `get_dead_code()` to get findings sorted by confidence tier. Useful parameters:
+- `safe_only=true` — only findings confirmed safe to delete (confidence >= 0.7)
+- `kind="unreachable_file"` — files with no importers
+- `kind="unused_export"` — public symbols nobody uses
+- `kind="zombie_package"` — monorepo packages with no consumers
+- `directory="src/old/"` — limit to a specific directory
+- `tier="high"` — only high-confidence findings (>= 0.8)
+
+## How to present findings
+
+- Only suggest deletion for findings with `safe_to_delete: true`
+- For lower-confidence findings, present them as "candidates to investigate" not "things to delete"
+- Dynamically-loaded code (plugins, handlers, adapters) may appear as dead code but isn't — Repowise filters common patterns but edge cases exist
+
+## Before deleting anything
+
+1. Confirm with the user. Present the file/symbol name, confidence score, and why Repowise thinks it's dead.
+2. Call `get_risk(targets=["path/to/file"])` to double-check dependents.
+3. Recently-modified "dead" code is more likely a false positive — flag this if the finding has recent git activity.
+
+## Safe deletion order
+
+1. Unreachable files first (whole file removal, cleanest)
+2. Unused internal symbols next
+3. Unused exports last (highest false-positive risk due to potential dynamic imports)
diff --git a/plugins/claude-code/skills/pre-modification/SKILL.md b/plugins/claude-code/skills/pre-modification/SKILL.md
new file mode 100644
index 000000000..ad743e2a6
--- /dev/null
+++ b/plugins/claude-code/skills/pre-modification/SKILL.md
@@ -0,0 +1,42 @@
+---
+name: pre-modification-check
+description: >
+ Use before modifying, refactoring, or deleting files in a codebase that has Repowise indexed
+ (indicated by a .repowise/ directory). Activates when Claude is about to edit code, especially
+ shared utilities, core modules, or files the user didn't explicitly mention. Helps assess
+ impact and avoid breaking things.
+user-invocable: false
+---
+
+# Pre-Modification Check with Repowise
+
+Before modifying files in a Repowise-indexed codebase, assess the impact.
+
+## Before editing a file
+
+Call `get_risk(targets=["path/to/file.py"])` to understand:
+- **Hotspot status** — is this a high-churn file? Extra care needed.
+- **Dependents** — what other files/modules depend on this? How wide is the blast radius?
+- **Co-change partners** — what files typically change together with this one? You may need to update them too.
+- **Ownership** — who owns this code? Relevant for PR review routing.
+- **Bus factor** — if only 1 person owns this, changes need extra review.
+
+## When modifying multiple files
+
+Batch all targets into one call: `get_risk(targets=["file1.py", "file2.py", "module/"])`.
+
+## When to warn the user
+
+If `get_risk` shows:
+- Hotspot score above 90th percentile — mention this is a frequently-changed, high-risk file
+- More than 10 dependents — list the top dependents; API changes here will break consumers
+- Bus factor of 1 — note that a single person maintains this code
+- Risk type is "bug-prone" or "high-coupling" — flag explicitly before making changes
+
+## Before refactoring or moving code
+
+Call `get_context(targets=["file.py"])` first to understand the full context: what uses this file, what decisions govern it, and why it's structured this way. This prevents accidentally violating architectural decisions.
+
+## Error handling
+
+If `get_risk` returns a tool error, the MCP server may not be running. Proceed with the modification but note that risk assessment was unavailable.