|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: Claude Code Plugin |
| 4 | +nav_order: 8 |
| 5 | +--- |
| 6 | + |
| 7 | +# Claude Code Plugin |
| 8 | +{: .no_toc } |
| 9 | + |
| 10 | +The fastest way to get repowise — Claude handles everything. |
| 11 | +{: .fs-6 .fw-300 } |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Table of contents |
| 16 | +{: .no_toc .text-delta } |
| 17 | + |
| 18 | +1. TOC |
| 19 | +{:toc} |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Overview |
| 24 | + |
| 25 | +The Claude Code plugin integrates repowise directly into Claude Code. It handles installation, API key setup, MCP server registration, and teaches Claude to use repowise tools proactively — without manual configuration. |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## Installation |
| 30 | + |
| 31 | +Open Claude Code and run: |
| 32 | + |
| 33 | +``` |
| 34 | +/plugin marketplace add repowise-dev/repowise-plugin |
| 35 | +/plugin install repowise@repowise |
| 36 | +``` |
| 37 | + |
| 38 | +That's the entire installation. The plugin: |
| 39 | + |
| 40 | +- Installs `repowise` via pip if not already installed |
| 41 | +- Registers the MCP server with Claude Code |
| 42 | +- Loads the slash commands |
| 43 | +- Configures Claude to use repowise tools automatically |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## Slash commands |
| 48 | + |
| 49 | +### `/repowise:init` |
| 50 | + |
| 51 | +Interactive setup and indexing for the current repository. |
| 52 | + |
| 53 | +Claude will guide you through: |
| 54 | + |
| 55 | +1. **Mode selection** — choose between: |
| 56 | + - **Full** — complete wiki generation with LLM docs (requires API key) |
| 57 | + - **Index-only** — graph + git + dead code, no LLM (free) |
| 58 | + - **Advanced** — manual control over provider, concurrency, exclude patterns |
| 59 | + |
| 60 | +2. **Provider selection** — Anthropic, OpenAI, Gemini, or local Ollama |
| 61 | + |
| 62 | +3. **API key entry** — saved to `.repowise/.env` (gitignored) |
| 63 | + |
| 64 | +4. **Indexing** — runs in the background with live progress updates |
| 65 | + |
| 66 | +When done, Claude confirms the MCP server is active and the codebase is queryable. |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +### `/repowise:status` |
| 71 | + |
| 72 | +Show the current state of the repowise index. |
| 73 | + |
| 74 | +Output includes: |
| 75 | +- Last sync commit and timestamp |
| 76 | +- Total pages, symbols, decisions indexed |
| 77 | +- Provider and model in use |
| 78 | +- Pages marked stale (need regeneration) |
| 79 | +- MCP server connection status |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +### `/repowise:update` |
| 84 | + |
| 85 | +Incrementally sync the wiki after code changes. |
| 86 | + |
| 87 | +Claude detects which files have changed since the last indexed commit, regenerates only the affected pages, updates CLAUDE.md, and confirms when done. |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +### `/repowise:search` |
| 92 | + |
| 93 | +Search the indexed wiki from within Claude Code. |
| 94 | + |
| 95 | +Claude will ask for your query and search mode (fulltext, semantic, or symbol), then display results inline with links to relevant pages. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +### `/repowise:reindex` |
| 100 | + |
| 101 | +Rebuild the vector search index without making LLM calls. |
| 102 | + |
| 103 | +Use this after switching embedding providers, or if semantic search results seem off. |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +## Automatic behaviors |
| 108 | + |
| 109 | +Beyond the slash commands, the plugin teaches Claude skills it uses automatically — without being asked. |
| 110 | + |
| 111 | +### Codebase exploration |
| 112 | + |
| 113 | +Before reading raw source files, Claude calls: |
| 114 | + |
| 115 | +- `get_overview()` at the start of new tasks to orient itself |
| 116 | +- `search_codebase(query)` to locate code instead of using grep |
| 117 | +- `get_context(targets)` to get docs and ownership before opening files |
| 118 | + |
| 119 | +### Pre-modification checks |
| 120 | + |
| 121 | +Before editing any file, Claude calls `get_risk(targets)` to assess: |
| 122 | + |
| 123 | +- Whether the file is a hotspot (high churn) |
| 124 | +- How many other files depend on it |
| 125 | +- Whether there are co-change patterns to be aware of |
| 126 | + |
| 127 | +If the risk is high, Claude surfaces this before making changes. |
| 128 | + |
| 129 | +### Architectural decision queries |
| 130 | + |
| 131 | +When facing "why is this structured this way" questions, Claude calls `get_why(query)` to check decision records and git archaeology before suggesting changes that might conflict with existing decisions. |
| 132 | + |
| 133 | +### Dead code awareness |
| 134 | + |
| 135 | +During refactoring or cleanup tasks, Claude calls `get_dead_code()` to find confirmed unused code rather than guessing. |
| 136 | + |
| 137 | +--- |
| 138 | + |
| 139 | +## How skills work |
| 140 | + |
| 141 | +Skills in Claude Code are prompt instructions that modify Claude's behavior. The repowise plugin registers four skills that Claude loads when working in an indexed repo. |
| 142 | + |
| 143 | +You don't need to trigger them manually. When Claude detects it's working in a repo with a connected repowise MCP server, the skills activate automatically. |
| 144 | + |
| 145 | +The CLAUDE.md generator reinforces these skills by writing the mandatory MCP tool workflow directly into your project's context file — so even without the plugin, any Claude session that reads your CLAUDE.md will follow the same workflow. |
| 146 | + |
| 147 | +--- |
| 148 | + |
| 149 | +## Requirements |
| 150 | + |
| 151 | +- Claude Code (desktop app, CLI, or IDE extension) |
| 152 | +- Python 3.11+ |
| 153 | +- An LLM API key (for full mode — not needed for index-only) |
0 commit comments