co-change

co-change is a command for coding agents from andyzengmath/soliton. It costs 18 tokens per session (667 once invoked), scanned A, original, MIT.

A command that lists files often changed in the same Git commits as a chosen file. Git is a system that records changes to a codebase over time.

In plain words
What is it for?
Use it to inspect the top ten historical co-changing files for a target file, based on commits from the last six months.
Why use it?
It helps reveal related files that may need review when one file changes, without requiring a separate dependency-analysis tool.

Command

Part of the soliton plugin — 1 skill, 3 commands, 13 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/andyzengmath/soliton/co-change
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/soliton

Or install soliton, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for co-change

README.md
[![agentmods](https://agentmods.dev/badge/commands/andyzengmath/soliton/co-change.svg)](https://agentmods.dev/commands/andyzengmath/soliton/co-change)
Your own site
<a href="https://agentmods.dev/commands/andyzengmath/soliton/co-change"><img src="https://agentmods.dev/badge/commands/andyzengmath/soliton/co-change.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.00667
Opus 5 $0.00009 $0.00333
Sonnet 5 $0.00004 $0.00133
Haiku 4.5 $0.00002 $0.00067

Measured 4d ago against content hash f55271ebf5ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

co-change scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/co-change.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/co-change

List the files that have historically been changed in the same commits as a target file. Uses git log as a degraded-mode CO_CHANGE proxy — a standalone heuristic inspired by CO_CHANGE graph semantics (note: the historical-context agent uses git history for bug-fix frequency / churn / blame patterns, NOT for co-occurrence; this command introduces the per-file co-change query separately). Will upgrade to true CO_CHANGE graph edges when available per POST_V2_FOLLOWUPS §B1.

Argument

  • <file> — path to a file in the current repository.

Behavior

  1. Validate input: if <file> is missing or doesn't exist, output Error: file not found: <file> and STOP.

  2. Find co-change candidates via git log:

    git log --name-only --pretty=format: --since="6 months ago" -- "<file>"
    

    This returns every file ever changed in a commit that also touched <file>.

  3. Count co-occurrence frequency:

    • Strip blank lines and the input file itself
    • Aggregate counts: how many times each candidate file was in a same-commit grouping with <file>
    • Sort by frequency descending
  4. Output the top-10 co-changers:

Co-change for <file> (last 6 months, git log heuristic)

| Rank | Co-changer | Count |
|------|------------|-------|
| 1    | path/x.ts  | 12    |
| 2    | path/y.ts  | 9     |
| ...  | ...        | ...   |

Backing source: git log (graph plugin pending §B1; will upgrade to CO_CHANGE edges from graph-code-indexing when available).

If 0 candidates: "No co-changers found — file may be new (< 6 months of history), rarely modified, or always changed in isolation."

Use cases

  • Pre-PR sanity check: before opening a PR that modifies auth/session.py, see which files historically move together — likely candidates for downstream regression checks.
  • Onboarding: when joining a project, /co-change <core-file> reveals which files form natural cohort sets.
  • Refactor scope: planning a rename of <file>? Co-change list approximates the touch surface.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 58 lines · 18 tokens per session scan A f55271ebf5ba

Subscribe to this mod's changes

co-change is a command published in the GitHub repository andyzengmath/soliton (1 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 667 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.