architectural-decision…
Use when encountering questions about WHY code is built a certain way, when about to make architectural changes (new patterns,…
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
Claude Code
$ npx -y skills add repowise-dev/repowise --skill pre-modification --agent claude-code
Codex
$ npx skills add repowise-dev/repowise --skill pre-modification -a codex -y
Cursor
$ npx skills add repowise-dev/repowise --skill pre-modification -a cursor -y
Gemini CLI
$ npx skills add repowise-dev/repowise --skill pre-modification -a gemini-cli -y
GitHub Copilot
$ npx skills add repowise-dev/repowise --skill pre-modification -a github-copilot -y
OpenCode
$ npx skills add repowise-dev/repowise --skill pre-modification -a opencode -y
Windsurf
$ npx skills add repowise-dev/repowise --skill pre-modification -a windsurf -y
name: pre-modification 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
Before modifying files in a Repowise-indexed codebase, assess the impact.
Call `get_risk(targets=["path/to/file.py"])`. Per file it returns `hotspot_score`, `trend`, `risk_type`, `impact_surface` (top 3), `dependents_count`, `co_change_partners`, `primary_owner`, `test_gap`, and `security_signals`. Read it for:
fixes: `fix_count` over the trailing 6 months, `last_fix_days_ago`, a `bug_magnet` flag for sustained recent fix pressure, and `top_symbols` (the per-symbol counts are approximate — read them as "mostly here"). A file that keeps getting fixed is the strongest single signal that the next edit breaks something; lead with it.
Batch all targets into one call: `get_risk(targets=["file1.py", "file2.py", "module/"])`.
If `get_risk` shows:
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.
For a heavy refactor, also call `get_health(targets=["file.py"])` — the marker findings (complexity, deep nesting, low cohesion, duplication) tell you *what* to improve while you're in there, and give you a before/after score.
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.
Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Use when encountering questions about WHY code is built a certain way, when about to make architectural changes (new patterns,…
Use when reviewing a set of changes before they merge — a PR, a branch diff, or the working-tree changes you just made — in a…
Use when the user asks about code health, code quality, complexity, technical debt, which files are risky or hard to maintain,…
Use when exploring, understanding, or answering questions about a codebase that has Repowise indexed (a .repowise/ directory in…
Use when the user asks about cleanup, removing unused code, refactoring, reducing bundle size, or identifying dead code in a…
Use before modifying, refactoring, moving, or deleting files in a Repowise-indexed repository, especially shared utilities, core…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.