/hoangsa:memory-impact-analysisfrom hoangsa
Analyzes code impact using a code graph to determine what breaks if you change a symbol. Traverses calls, references, and extends edges across files, packages, and languages. Useful before refactoring or PR review.
Ships in hoangsa. 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.
None: SKILL.md is the whole skill.
Answer "what breaks if I change X?" using the code graph. This is the
one thing the graph does that grep + IDE-nav cannot: it traverses
calls, references, and extends edges across files, packages, and
languages in one query.
1. memory_recall({query: "<name or concept>"}) → find the exact FQN
2. memory_impact({fqn, direction: "up", depth: 3}) → who calls / references
3. (optional) memory_symbol_context({fqn}) → full 360° on target
4. Quote chunk ids in your answer → prove grounding
Graph keys are module::symbol (e.g. server::dispatch_tool). If the
user gave you a bare name, run memory_recall first to disambiguate —
otherwise memory_impact returns symbol not found.
memory_impact {
fqn: "server::dispatch_tool",
direction: "up", // "up" | "down" | "both"
depth: 3 // 1..8
}
up (default) — callers, referencers, subtypes. Answers "what
breaks". Use this 90% of the time.down — callees, parent types. Use when you want "what does this
depend on".both — union. Expensive; only when you're mapping a whole
subsystem.Results are grouped by BFS depth. Depth 1 is direct dependents; deeper rings are transitive and usually less critical. Quote the depth-1 ring in your answer — that's what actually breaks on change.
If you're about to edit the symbol, also pull memory_symbol_context {fqn} to see siblings (other symbols in the same file you might
accidentally touch) and unresolved imports (external deps you can't
mock).
Answer in this shape:
Changing
Xaffects N callers at depth 1:A::f,B::g,C::h. Transitive reach is M symbols acrossdepth ≤ 3. Safe to change if the signature is preserved; breaking signature changes need follow-up edits in [list].
Always cite the chunk ids from the recall output. If the impact set is large, call out the top 3–5 most load-bearing callers (tests, public API, cross-crate edges).
During PR review, pipe the diff through memory_detect_changes:
1. gh pr diff <n> → unified diff
2. memory_detect_changes({diff, depth: 2}) → touched symbols + upstream
3. For each high-risk symbol: memory_impact({..}) → deeper walk
4. Flag: missing tests, public API breaks, cross-crate edges
memory_detect_changes parses the diff, maps hunks to graph nodes, and
returns their upstream callers in one call — cheaper than running
memory_impact per symbol. Use it as the first pass, then drill in
with memory_impact on anything risky.
Compose with the Gate-4 analyzers (hoangsa-analyzer-failure,
hoangsa-analyzer-types, hoangsa-analyzer-claims), which ship with
HOANGSA — hoangsa-memory covers the graph side of PR review (blast
radius, orphan symbols, test coverage gaps on touched callers); the
analyzers cover error handling, type design, and comment accuracy.
memory_impact on a guessed
FQN wastes a round-trip when symbol not found comes back. Always
recall first unless you literally copied the FQN out of prior output.direction: both by default. It's 2–5× the noise. Only
reach for it when you genuinely want both directions.memory_impact direction: up includes
non-call references (type refs, trait bounds, generic params). A
symbol with 0 callers but 20 references is still load-bearing.The graph reflects the last hoangsa-memory index . run. If the repo has been
edited since, callers may be stale. Signs: a caller in the result that
the user insists doesn't exist any more. Remedy: hoangsa-memory index . or
hoangsa-memory watch . (which re-indexes on save), then retry.
Symbols added in an unsaved edit won't be in the graph at all — that's why impact analysis is a pre-edit tool, not a post-edit one.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
impact-analysis, code-graph, blast-radius, refactoring, pr-review, code-safety
11 skills in this plugin
/fe-testingThis skill should be used when the user is building, changing, or trying to verify a frontend feature on web (React/Vite) or React Native/Expo, and is unsure how to prove it actually works. Triggers on phrases like 'how do I test this component/screen', 'verify this feature', 'make sure this works on web/mobile', 'is this covered by tests', 'my tests pass but the feature is broken', 'no tests yet', or before shipping any FE change. Guides the full loop: define verifiable success criteria before coding, write tests at the correct layer (logic/component/E2E/visual), and confirm behavior by running the real app./git-flowThis skill should be used when the user wants to start a new task, switch between tasks, park or resume work, finish a task (push + PR), clean up merged branches, or sync with upstream. Triggers on phrases like 'start task', 'new task', 'work on', 'switch to', 'park this', 'resume', 'continue where I left off', 'done with this', 'finish task', 'create PR', 'clean branches', 'delete merged', 'rebase', 'pull latest', or 'sync with main'./memory-cliUse when the user needs to run hoangsa-memory CLI commands — init / index / query / watch / memory / archive / impact / context / changes / graph / projects. Examples: "index this repo", "show memory", "trace the graph", "find taint paths", "consolidate memory".
/memory-debuggingUse when the user is debugging a bug, tracing an error, or asking why something fails. Examples: "why is X failing?", "where does this error come from?", "trace this bug", "who calls this method?", "this endpoint returns 500".
/memory-disciplineThis skill should be used before any non-trivial coding action — editing code, writing new files, running migrations, deploying, or answering a question that involves factual claims about this codebase. It forces the agent to consult hoangsa-memory's persistent memory (USER.md, MEMORY.md, LESSONS.md, the indexed code graph) and acknowledge relevant lessons before acting. Trigger phrases: "edit", "refactor", "implement", "fix the bug in", "add a feature", "deploy", "why does this do", "how does X work".
/memory-exploringUse when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: "how does X work?", "what calls this function?", "show me the auth flow", "where is the DB logic?".
npx claudepluginhub unknown-studio-dev/hoangsa --plugin hoangsaOther plugins' skills for the same job