Repowise for Claude Code

Claude stops guessing about your codebase.

One plugin gives Claude the map of your repository: who calls what, what changes together, which decisions govern a file and what an edit reaches. It reads less, answers with citations, and hears about a risky file before it edits one.

  • One plugin install
  • No API key needed
  • Runs on your machine
claude · ~/payments

> Make refund webhooks safe to retry

repowise · get_answer("where are webhook retries handled?")

payments/hooks.py:41-58 · ledger.py:12 · cited

repowise · get_risk(payments/hooks.py)

reaches 6 files · 2 with no test · moves with ledger.py

Edit payments/hooks.py

[repowise] payments/hooks.py is governed by a standing decision: Idempotent by event id

[repowise] payments/hooks.py has been bug-fixed 4x in the last 6 months, last 9 days ago (bug magnet).

Lens · change review

Tests to run: tests/test_hooks.py, tests/test_replay.py, inferred from the dependency graph, not measured

An illustrative Claude Code turn on a sample repository. The notices are worded as the plugin's hooks and Lens write them.

Before an edit

Claude asks the index, then edits.

Answers with citations
Who calls a function, what changes with a file and why the code is shaped this way, each answer naming the file and line it came from.
Reads less
A triage card instead of a file dump, one symbol's exact bytes instead of the whole module.
Edits safer
What the file reaches and which tests guard it, checked before the edit lands.

Up to 99%

fewer files opened for the same question, and fewer on every model we tested.

n = 72 · Claude Code (Sonnet 4.6) · 24 questions on three repositories created after every tested model's training cutoff (Python, Go, Rust) · 2026-11

The tools

Ten MCP tools Claude calls instead of grepping.

Registered the moment the plugin is enabled, over the open Model Context Protocol (MCP). Each answers from your repository's graph, git history, health and decisions.
get_answer
One-call cited Q&A over the documentation, with a calibrated confidence score.
get_context
A triage card for files, modules, or symbols: summary, signatures, hotspot bit, governing decisions.
get_symbol
Raw source bytes for one indexed symbol with exact, verified line bounds.
search_codebase
Hybrid full-text and semantic search over the documentation, routed by query shape.
get_why
Architectural decision archaeology: why the code is shaped this way, with lineage.
get_risk
Hotspot score, dependents, co-change partners, and PR-mode break/test directives.
get_change_risk
Pre-merge defect-risk score for a commit or diff range, computed from its shape alone.
get_health
Per-file code-health scores across three pillars, plus ranked refactoring targets.
get_dead_code
Unreachable files, unused exports, and zombie packages, tiered by confidence.
get_overview
Architecture map, module list, entry points, and tool recipes. First call on any repo.

The rest of the plugin

Context that arrives before Claude asks.

Hooks put the right fact in front of Claude at the moment it matters. They make no model or network calls and stay silent until they have something to add.

  1. Context at session start

    Index freshness and the standing decisions that govern your files, under a 400-token cap.

  2. Warnings at edit time

    A file with a governing decision or a bug-fix history gets one line, once per session.

    [repowise] payments/hooks.py has been bug-fixed 4x in the last 6 months, last 9 days ago (bug magnet).

  3. Skills and slash commands

    Six skills route exploring, pre-edit checks, review, health, decisions and dead-code cleanup on their own.

    /repowise:why /repowise:risk /repowise:health /repowise:dead-code

  4. distill for noisy commands

    Test runs, builds and logs arrive errors-first. Every failure and the exit code survive; repowise expand restores the rest.

    [repowise#a1b2c3d4e5f6: 230 lines omitted (~6.1k tokens); restore: repowise expand a1b2c3d4e5f6]

  5. A CLAUDE.md written from the index

    Architecture, key modules, entry points, files that need care and standing decisions, kept current.

  6. Lens

    A map of the repository lit by Claude's turn, a change review under each edit and a Flow dashboard of what an edit reaches. It reads the local index, never blocks a tool call and sends Claude nothing unless you press a button.

    Change review · Health: no new findings · Tests to run: 2, inferred from the dependency graph

Lens in Claude Code on Django: the map lights query.py in amber and its 12 importers in plum, then the 248 importers of django/conf/__init__.py, and Flow lists what to check before accepting
Lens in Claude Code on Django.
Read the Lens guide

Install

Install inside Claude Code, then give it a task.

Prefer a terminal? repowise init registers the same MCP server and hooks.

pip install repowise
repowise init
  • Python 3.11 or later and git, for the repowise CLI.
  • Claude Code 2.1.287 or later, for Lens.
  1. Install the plugin

    Run these inside Claude Code. The MCP server, hooks, skills and Lens all ship in the plugin.

    /plugin marketplace add repowise-dev/repowise
    /plugin install repowise@repowise
  2. Set up and index

    Claude installs the CLI if you need it, picks a mode and indexes the repository. The default needs no API key.

    /repowise:init
  3. Start the local server for the Lens map

    In a terminal in your repository, to light up the map.

    repowise serve --no-ui

The same index in Claude.ai and Claude Desktop, over a hosted connector. See hosted

Running Codex, Cursor or another agent too? The same server works there. See all integrations

FREQUENTLY ASKED

Questions people ask first

Do I need an API key?

No. The default setup makes no model calls and still builds the graph, git history, code health, dead code and a full wiki rendered from structure. A provider key changes who writes the wiki pages and turns on decision mining; with none configured, get_answer answers from local retrieval.

Does the plugin send my code anywhere?

The hooks make no model calls and no network calls; they read the local index and git. The MCP server reads the index in your repository's .repowise folder, and Lens talks only to local servers on a loopback address. Your model provider sees code excerpts only if you configure one. The CLI sends anonymous usage telemetry (command and tool names, coarse counts and timings, never code, paths or queries) unless you set DO_NOT_TRACK=1.

Does it work in Claude.ai or Claude Desktop?

Yes, through the hosted MCP server. Add a custom connector in Claude with your repository's URL and sign in; there is no key to copy. Claude Code can use the same hosted index with one claude mcp add command, or the local plugin.

Will the hooks slow Claude down or block it?

No. Each hook reads the local index, stays silent unless it has something to add, and exits quietly on any failure, so a broken environment never blocks Claude.

Can I turn parts of Lens off?

Yes. The plugin has settings for margin notes, squeeze rows, the change review and the Flow tab, plus two that start off: opening the map pane on its own, and health colours on the map.

Give Claude the map, then give it a task.