跳到正文
FunCoding

memtrace-impact

Compute the blast radius of modifying a symbol through transitive graph impact. Use when the user asks about blast radius, impact, what breaks, risk, upstream callers, downstream dependencies, or consequences of modifying a symbol, before or during source-code changes. Do not use Grep or manual reference search; Memtrace computes transitive graph impact. For a full risk-rated plan covering a multi-part change, use memtrace-change-impact-analysis.

Star
516
最近提交
2026年11月30日

plugins/memtrace-skills/skills/memtrace-impact/SKILL.md

在 GitHub 上查看

Overview

Compute the blast radius of changing a specific symbol. Traces upstream (what depends on this) and downstream (what this depends on) through the knowledge graph to quantify risk before making modifications.

Quick Reference

ToolPurpose
get_impactBlast radius from a symbol name (target)
detect_changesScope symbols affected by a diff/patch

Parameter types: MCP parameters are strictly typed. Numbers (depth, limit, etc.) must be JSON numbers — not strings.

Required parameters — get_impact

ParameterRequiredDefaultNotes
repo_idyes—
targetyes—Symbol name (e.g. "validateToken") — not symbol_id
directionno"both""upstream" | "downstream" | "both"
depthno5BFS depth (max 15)
as_ofnonowISO-8601 for time-travel
{ "repo_id": "memdb", "target": "validateToken", "direction": "both", "depth": 5 }

Full parameter spec for every Memtrace tool: references/mcp-parameters.md (bundled at the memtrace-skills plugin root).

Steps

1. Identify the symbol name

If you don't know the exact name:

  • find_symbol(name="...") for exact identifiers
  • find_code(query="...") for natural-language queries

Use the returned name (and optional file_path hint) — graph tools resolve by name, not internal IDs.

2. Run impact analysis

{
  "repo_id": "memdb",
  "target": "validateToken",
  "direction": "upstream",
  "depth": 5
}

3. Interpret the risk rating

RiskMeaningAction
LowFew dependents, leaf nodeSafe to modify; minimal testing needed
MediumModerate dependentsTest direct callers; review interface contracts
HighMany dependents across modulesCoordinate changes; comprehensive test coverage
CriticalCore infrastructure, many transitive dependentsPlan migration strategy; backward-compatible changes

4. For diff-based analysis

When you have an actual code diff, use detect_changes:

{ "repo_id": "memdb", "diff": "<unified git diff text>" }

Or pass changed_files: ["path/a.rs", "path/b.ts"] when no diff text is available.

Decision Points

SituationAction
Changing a single functionget_impact with direction: "both"
Reviewing a PR or diffdetect_changes with the diff content
Renaming/removing a public APIget_impact with direction: "upstream", higher depth
Refactoring internalsget_impact with direction: "downstream"

Output

get_impact returns the blast radius for the target symbol:

FieldExample / meaning
Risk ratingHigh — one of Low / Medium / High / Critical (interpret via step 3)
UpstreamTransitive dependents (callers/importers) within depth hops — what breaks if the target changes
DownstreamTransitive dependencies — what the target relies on

detect_changes returns the set of symbols affected by the supplied diff / changed_files, plus the affected processes (execution flows).

Common Mistakes

MistakeReality
Passing symbol_id or nameRequired param is target
Omitting repo_idBoth repo_id and target are required
Defaulting depth to 3API default is 5

相似的 Skill

blender-motion-state-inspection

AFaffaan-m/ECC314k近 7 天新增 4,125 个 star

官方

slack-gif-creator

ANanthropics/skills203k近 7 天新增 3,333 个 star

精选

algorithmic-art

用 p5.js 生成流场和粒子系统,通过种子随机性创作原创算法艺术。

ANanthropics/skills203k近 7 天新增 3,333 个 star

moneyprinterturbo-video

HAharry0703/MoneyPrinterTurbo147k近 7 天新增 1,663 个 star

thinking-out-loud

SHShubhamsaboo/awesome-llm-apps146k近 7 天新增 895 个 star

design-motion

GAgarrytan/gstack143k近 7 天新增 636 个 star