Skip to content
FunCoding

memtrace-relationships

Map source-code relationships between symbols. Use when the user asks about callers, callees, references, imports, exports, type usages, class hierarchy, inheritance, implementations, overrides, or dependencies between symbols. Do not use Grep, Glob, rg, find, or manual text search for references; Memtrace traverses typed AST graph edges.

Star
516
Last commit
Nov 30, 2026

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

View on GitHub

Overview

Traverse the code knowledge graph to map relationships between symbols — callers, callees, class hierarchies, imports, exports, and type usages. Essential for understanding a symbol's neighbourhood before modifying it.

Quick Reference

query_typeWhat it finds
find_callersWhat calls this function/method?
find_calleesWhat does this function call?
class_hierarchyParent classes, interfaces, mixins
overridesWhich child classes override this method?
importsWhat modules does this file import?
exportersWhich files import this module?
type_usagesWhere is this type/interface referenced?

Parameter types: Numbers (depth, etc.) must be JSON numbers — not strings.

Graph tool parameters

get_symbol_context (360° view — prefer this first)

Required: repo_id, symbol

{ "repo_id": "memdb", "symbol": "validateToken", "file_path": "src/auth.ts" }

Returns: callers, callees, type references, community, processes, cross-repo API callers.

analyze_relationships (targeted traversal)

Required: repo_id, target, query_type

{
  "repo_id": "memdb",
  "target": "validateToken",
  "query_type": "find_callers",
  "depth": 3,
  "file_path": "src/auth.ts"
}
ParamDefaultNotes
depth3 (max 10)Not 2
file_path—Disambiguates overloaded names

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

Steps

1. Get the symbol name

Use find_symbol or find_code. Save name, scope_path, and file_path from results — pass symbol/target plus optional file_path to graph tools.

2. Choose your approach

Quick 360° view → get_symbol_context (one call).

Targeted traversal → analyze_relationships when you need a specific query_type at custom depth.

3. Interpret results

Use get_symbol_context fields (callers, callees, community, processes) for blast-radius and architecture context. For degree-style metrics on a specific symbol, follow up with get_impact.

4. Follow up

  • get_impact(repo_id, target=...) — quantify blast radius
  • get_timeline(repo_id, scope_path, file_path) — full version history
  • get_evolution(repo_id, from=..., target=...) — window-scoped activity

Output

get_symbol_context returns the symbol's 360° neighbourhood:

{
  "symbol": "validateToken",
  "callers": ["..."],
  "callees": ["..."],
  "type_references": ["..."],
  "community": "...",
  "processes": ["..."],
  "api_callers_cross_repo": ["..."]
}

analyze_relationships returns the symbols/edges matching the requested query_type (no degree metrics — see Common Mistakes).

Common Mistakes

MistakeReality
Passing symbol_idUse target (analyze_relationships) or symbol (get_symbol_context)
Assuming default depth: 2Default is 3
Expecting in_degree on analyze_relationships resultsUse get_symbol_context or get_impact for centrality/risk context

Similar Skills

rea-analysis-optimization

MOmorluto/rea485k9,215 new stars in the last 7 days

codebase-design

MAmattpocock/skills336k5,004 new stars in the last 7 days

Featured

diagnosing-bugs

Diagnose hard bugs and performance regressions by building a feedback loop with tests or scripts.

MAmattpocock/skills336k5,004 new stars in the last 7 days

setup-ts-deep-modules

MAmattpocock/skills336k5,004 new stars in the last 7 days

code-review

MAmattpocock/skills336k5,004 new stars in the last 7 days

implement

MAmattpocock/skills336k5,004 new stars in the last 7 days