/code-intelligence:assessing-impactfrom code-intelligence
Generates a blast-radius report for a symbol or file using tree-sitter and text scanning. Use before refactoring, renaming, or deleting in an unfamiliar repo.
Ships in code-intelligence. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Cheap, ad-hoc impact analysis for a single target. Not a graph database — a focused walk over an AST cache plus a complementary text scan, clustered into a report that's easy to summarize.
Use this when you're about to refactor / rename / delete a symbol in a repo you don't work in daily, and you want a single artifact that says: "these N files will need to change, in these M packages, with these tests likely affected."
Don't use this for deep ongoing impact analysis on your own codebase — stand up GitNexus, SourceGraph, or your IDE's index. This skill is for the one-shot case.
uv venv /home/claude/.venv 2>/dev/null
uv pip install --python /home/claude/.venv/bin/python tree-sitter
export PYTHON=/home/claude/.venv/bin/python
export IMPACT=/mnt/skills/user/assessing-impact/scripts/impact.py
The script depends on the tree-sitting skill — it imports engine.py
directly. The bundled grammars live with tree-sitting; no separate
language-pack install needed.
$PYTHON $IMPACT /path/to/repo SYMBOL_NAME
Or target a whole file:
$PYTHON $IMPACT /path/to/repo path/to/module.py
The script prints a structured markdown report. Treat it as input for your final summary, not the deliverable. It deliberately doesn't assign a "high/medium/low" risk label — that's your job, after weighing:
If a particular package looks suspicious, follow up with tree-sitting
to read the actual call sites:
TREESIT=/mnt/skills/user/tree-sitting/scripts/treesit.py
$PYTHON $TREESIT /path/to/repo --no-tree 'source:caller_function'
| Flag | Default | Purpose |
|---|---|---|
--features PATH | _FEATURES.md | Root _FEATURES.md — when present, refs get clustered by feature in addition to by package. |
--skip DIRS | (defaults from tree-sitting) | Extra comma-separated dirs to skip. |
--limit-per-name N | 500 | Cap refs per symbol name. Bump if you suspect truncation. |
--json | off | Emit JSON instead of markdown — for downstream tooling. |
# Impact Report: <target>
## Target
Kind, definition sites with line ranges.
## Direct & Textual References (N total)
Top-line counts, then refs grouped by:
- Code references by package
- Test references
- Documentation mentions
## Affected Features (from _FEATURES.md) ← only if file present
Feature name → ref count + file count.
## Suggested Test Surfaces
Test files that already reference the target, plus tests neighboring
the definition. Likely the regression net for the change.
## Caveats
What the scan can't see (dynamic dispatch, cross-language, cross-repo).
exploring-codebases if the repo also has a freshly
generated _FEATURES.md — the impact report will cluster refs by
feature, which makes the blast radius story much more legible than
raw package directories.tree-sitting to drill specific call sites once impact has
identified them.searching-codebases when you want regex/AST search over the
same corpus rather than impact analysis on a known target.run, init, handler) will
pick up unrelated symbols. Prefer running this on distinctive names;
otherwise expect noise and read the snippets.getattr, duck-typed
method calls, virtual dispatch in C++) is missed or over-matched.scripts/impact.py — Single-entry CLI. Resolves target → walks AST
refs → augments with text scan → clusters by package and (optionally)
by feature → renders markdown or JSON.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
blast-radius, impact-analysis, pre-change-risk, refactoring, code-search
npx claudepluginhub oaustegard/claude-skills --plugin code-intelligence14 skills in this plugin
/declaring-invariantsFind tests that enumerate a domain by copying it, and declare the invariants a codebase depends on. Reports where a parametrize list, for-loop, or it.each iterates a hand-written subset of a dict/set/tuple/Enum that exists in the source, and names the members nothing covers. Use when reviewing tests, when a module gains a name-to-thing table, registry, enum, or dispatch map, before trusting a green suite as evidence a domain is covered, or when asked "is this test actually total", "does anything cover X", "what does this repo guarantee", "which invariants do we declare". Also for vacuous tests that pass over an empty collection, for a domain that has silently NARROWED (an enumeration cannot see that), and for recording the refutation that proves a claim can fail./describing-productsBuilds a product description repo for a software product - prose documents that say, feature by feature and event by event, what the user sees, what they can do, and exactly what happens when they do it, including when they stop halfway. Drafted from the code and tests, verified against the running product with hand checklists, and triaged into a bug list. Works for canvas editors, web apps, CLIs, chat products, mobile apps, and libraries or SDKs. Use when asked to "write a product description for X", "describe the user experience of X", "document how X behaves for the user", "make a behavior-spec repo", or for an event-by-event account of an app's behavior rather than API docs. Also resumes or extends an existing product description repo./exploring-codebasesFirst-encounter orientation on a repository nobody here has worked in yet. Runs a fixed five-step workflow — venv setup, tarball fetch, tree-sitting structural scan, featuring synthesis, then reasoning over the two — and yields an account of what the repo contains and how it is arranged, optionally written out as _FEATURES.md. Use for "I just cloned this", "what is this repo", "what does this do", "explore this repo", "give me an orientation", "what are the main features", "review what's new in this repo", or before starting work in a codebase you have not seen. This is the divergent what's-here skill. Route elsewhere for: a named symbol, a file's structure or a line range (tree-sitting); all callers of a Python symbol (searching-codebases); teaching a human the codebase through exercises (orienting-codebases); fetching or cloning a repo without analysing it (accessing-github-repos, cloning-project)./featuringGenerate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tree-sitting (structural) with semantic (why/what-for) layer./hunting-failing-inputsFinds inputs that make a parser, decoder or WGSL compute shader index out of bounds or overflow, using Z3. Use for "can this crash", "find an input that breaks this", or when fuzzing found nothing on code that reads untrusted bytes./mapping-codebasesDEPRECATED — superseded by tree-sitting. This skill generated persistent _MAP.md files; tree-sitting does the same AST extraction at runtime (~700ms for 250 files) with no artifact to write, commit, or keep in sync. Use tree-sitting for "map this codebase", "explore repo", "understand structure", or any code navigation task. The final working version is archived at release mapping-codebases-v0.8.0.Other plugins' skills for the same job