/memtrace-cochange
Find files that historically co-change with a target symbol or file, ranked by co-occurrence across git episodes. Use when the user asks about historical coupling, co-change, what changes with this, hidden dependencies, or what else needs to move for source code. Do not use git
$ npx -y skills add syncable-dev/memtrace-public --skill memtrace-cochange --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/memtrace-cochange
Context preview
The summary Claude sees to decide when to auto-load this skill.
Find files that historically co-change with a target symbol or file, ranked by co-occurrence across git episodes. Use when the user asks about historical coupling, co-change, what changes with this, hidden dependencies, or what else needs to move for source code. Do not use git
SKILL.md
memtrace-cochange.SKILL.mdname: memtrace-cochange
description: "Find files that historically co-change with a target symbol or file, ranked by co-occurrence across git episodes. Use when the user asks about historical coupling, co-change, what changes with this, hidden dependencies, or what else needs to move for source code. Do not use git log, git diff, Grep, or manual file search to correlate changes; Memtrace queries co-change and temporal graph data directly."
Overview
Find **files** that historically co-change with a target symbol or file path — ranked by co-occurrence frequency across git episodes. Surfaces **behavioral coupling** the static call graph cannot see.
`get_impact` answers "who calls this?" (structural). `get_cochange_context` answers "what files always move when this moves?" (historical, file-level).
They are complementary. A file with no call-graph edges to the target can still be a strong cochange partner if it's always modified alongside it in every commit.
> **Parameter types:** Numbers (`limit`, `window_days`, etc.) must be JSON numbers — not strings.
Required parameters
| Parameter | Required | Default | Notes | |---|---|---|---| | `repo_id` | yes | — | | | `target` | yes | — | Symbol name **or** file path substring — **not** `symbol` | | `limit` | no | **10** | Max cochanged files returned | | `window_days` | no | **30** | Lookback from `as_of` | | `as_of` | no | now | Window anchor | | `branch` | no | any branch | |
{
"repo_id": "memdb",
"target": "execute",
"limit": 10,
"window_days": 30
}Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
Output
{
"cochanged_files": [
{
"file_path": "src/order/types.rs",
"cochange_count": 8,
"last_cochanged_at": "2026-04-13T10:43:00Z"
}
],
"target_files": ["src/order/service.rs"]
}There is **no** `cochanges[]` with symbol names — results are **file-level**.
Steps
1. Identify the target
Use `find_symbol` if needed. Pass the symbol **`name`** or a **`file_path`** as `target`.
2. Call `get_cochange_context`
See required parameters above.
3. Interpret results
High `cochange_count` on a file → strong historical coupling. When you modify the target, review those files too — even without direct call-graph edges.
4. Cross-reference with call graph
For symbols in cochanged files, optionally run `get_impact(target=...)`:
| Structural coupling | Historical coupling | Interpretation | |---|---|---| | Yes | Yes | Core dependency — highest risk | | No | Yes | Hidden coupling — history-only | | Yes | No | Called often but changed independently |
Use Cases
- **Before modifying a symbol** — get blast awareness beyond what `get_impact` shows
- **Incident investigation** — when `get_impact` doesn't explain the blast radius, check cochange history
- **Code review** — verify that a PR touched all historically-coupled partners
- **Refactoring** — discover implicit coupling before extracting a module
Common Mistakes
| Mistake | Reality | |---------|---------| | Only using `get_impact` for blast radius | Structural coupling misses behavioral coupling — always pair with cochange | | Ignoring cochanged files with no call-graph edges | A rarely-called file with high `cochange_count` is a strong coupling signal | | Using cochange as a dependency map | It's a change correlation, not a dependency graph — files can cochange without any direct relationship | | Passing `symbol:` | Required param is **`target`** | | Expecting `cochanges[]` with symbol names | Response is **`cochanged_files[]`** (file paths) | | Using `limit: 20` as default | API default is **10** | | Empty results with 0 git episodes | Run `replay_history` during indexing to populate co-change data |
Read more
name: memtrace-cochange description: "Find files that historically co-change with a target symbol or file, ranked by co-occurrence across git episodes. Use when the user asks about historical coupling, co-change, what changes with this, hidden dependencies, or what else needs to move for source code. Do not use git log, git diff, Grep, or manual file search to correlate changes; Memtrace queries co-change and temporal graph data directly."
Overview
Find **files** that historically co-change with a target symbol or file path — ranked by co-occurrence frequency across git episodes. Surfaces **behavioral coupling** the static call graph cannot see.
`get_impact` answers "who calls this?" (structural). `get_cochange_context` answers "what files always move when this moves?" (historical, file-level).
They are complementary. A file with no call-graph edges to the target can still be a strong cochange partner if it's always modified alongside it in every commit.
> **Parameter types:** Numbers (`limit`, `window_days`, etc.) must be JSON numbers — not strings.
Required parameters
| Parameter | Required | Default | Notes | |---|---|---|---| | `repo_id` | yes | — | | | `target` | yes | — | Symbol name **or** file path substring — **not** `symbol` | | `limit` | no | **10** | Max cochanged files returned | | `window_days` | no | **30** | Lookback from `as_of` | | `as_of` | no | now | Window anchor | | `branch` | no | any branch | |
{
"repo_id": "memdb",
"target": "execute",
"limit": 10,
"window_days": 30
}Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
Output
{
"cochanged_files": [
{
"file_path": "src/order/types.rs",
"cochange_count": 8,
"last_cochanged_at": "2026-04-13T10:43:00Z"
}
],
"target_files": ["src/order/service.rs"]
}There is **no** `cochanges[]` with symbol names — results are **file-level**.
Steps
1. Identify the target
Use `find_symbol` if needed. Pass the symbol **`name`** or a **`file_path`** as `target`.
2. Call `get_cochange_context`
See required parameters above.
3. Interpret results
High `cochange_count` on a file → strong historical coupling. When you modify the target, review those files too — even without direct call-graph edges.
4. Cross-reference with call graph
For symbols in cochanged files, optionally run `get_impact(target=...)`:
| Structural coupling | Historical coupling | Interpretation | |---|---|---| | Yes | Yes | Core dependency — highest risk | | No | Yes | Hidden coupling — history-only | | Yes | No | Called often but changed independently |
Use Cases
- **Before modifying a symbol** — get blast awareness beyond what `get_impact` shows
- **Incident investigation** — when `get_impact` doesn't explain the blast radius, check cochange history
- **Code review** — verify that a PR touched all historically-coupled partners
- **Refactoring** — discover implicit coupling before extracting a module
Common Mistakes
| Mistake | Reality | |---------|---------| | Only using `get_impact` for blast radius | Structural coupling misses behavioral coupling — always pair with cochange | | Ignoring cochanged files with no call-graph edges | A rarely-called file with high `cochange_count` is a strong coupling signal | | Using cochange as a dependency map | It's a change correlation, not a dependency graph — files can cochange without any direct relationship | | Passing `symbol:` | Required param is **`target`** | | Expecting `cochanges[]` with symbol names | Response is **`cochanged_files[]`** (file paths) | | Using `limit: 20` as default | API default is **10** | | Empty results with 0 git episodes | Run `replay_history` during indexing to populate co-change data |
Structural memory for AI coding agents. Bi-temporal graph, MCP-native, zero LLM calls. Cursor · Claude Code · Codex · Hermes · VS Code · Windsurf.
Repo: syncable-dev/memtrace-public
Other skills on memtrace-public.
- /memtrace-api-topology
Map API endpoints, outbound HTTP calls, and cross-repo service topology in indexed source code. Use when the user asks about API endpoints, HTTP routes, fetch/client calls, REST surface, service dependencies, cross-repo dependencies, or API topology. Do not use Grep, Glob, rg,
Open skill - /memtrace-change-impact-analysis
Compute what a planned source-code change will break — blast radius, affected processes, cross-repo callers, temporal stability, and Cortex decision-memory constraints — and produce a risk-rated change plan. Use for multi-symbol or multi-part edits, refactors, API changes,
Open skill - /memtrace-code-review
Review GitHub pull requests with Memtrace's local graph-backed review engine. Use when the user asks to review a GitHub pull request, run Memtrace code review, post Memtrace review comments, create a PR with a review step, or publish local graph-backed review findings to GitHub.
Open skill - /memtrace-codebase-exploration
Map an indexed source-code repo into a structured overview — scale, communities, central symbols, execution flows, API surface, recent activity. Use when the user wants to explore, understand, onboard to, map, or get an overview of an indexed source-code repo, architecture,
Open skill - /memtrace-continuous-memory
Keep the Memtrace index fresh while editing by watching a repo for live, incremental re-indexing. Use when the user asks to keep Memtrace fresh while editing, watch a repo, enable live or incremental indexing, set up always-on memory (meaning Memtrace index watching, not generic
Open skill - /memtrace-daily
Orient at the start of a coding session, review what recently changed in a repository, and self-audit after completing work. Use when the user wants the daily briefing (what changed in the last 24h with complexity deltas), hotspots (complexity × churn refactor priorities), or a
Open skill

