map-diff

map-diff is a skill for Claude Code from Snowflake-Labs/cocoplus. It costs 28 tokens per session (967 once invoked), scanned A, original, MIT.

A change-impact checker for staged Git changes. It uses a committed graph of Cortex AI functions to identify related functions, evaluation sets, and capability definitions.

In plain words
What is it for?
Use it after staging changes to trace affected files and graph entries before committing.
Why use it?
It shows likely downstream effects before a commit, so changes to one AI function are less likely to surprise connected parts of the project.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

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 skills/snowflake-labs/cocoplus/map-diff
Any agent
npx skills add Snowflake-Labs/cocoplus --skill map-diff
Clone the repo
git clone --depth 1 https://github.com/Snowflake-Labs/cocoplus

Made for: Claude Code.

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 map-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/map-diff.svg)](https://agentmods.dev/skills/snowflake-labs/cocoplus/map-diff)
Your own site
<a href="https://agentmods.dev/skills/snowflake-labs/cocoplus/map-diff"><img src="https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/map-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 967 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.1 $0.00028 $0.00967
Opus 5 $0.00014 $0.00483
Sonnet 5 $0.00006 $0.00193
Haiku 4.5 $0.00003 $0.00097

Measured 2d ago against content hash fa1a2ea07413, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

map-diff 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 2d 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.

.cortex/skills/cocomap/map-diff.skill.md · 107 lines

How it starts

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

$map diff

Trace the downstream impact of staged git changes using the committed coco-map.json. Shows which other functions, evaluation sets, and capability definitions are affected before the commit lands.

Preconditions

  • .cocoplus/ must be initialized
  • .cocoplus/map/coco-map.json must exist (run $map first)
  • Staged git changes must exist (git diff --staged must be non-empty)

Step-by-Step Behavior

  1. Verify initialization: Check .cocoplus/ exists. If not, output: "CocoPlus not initialized. Run $pod init first." and exit.

  2. Verify map exists: Check .cocoplus/map/coco-map.json exists. If not, output:

    No function knowledge graph found. Run $map first to build it.
    

    and exit.

  3. Read staged changes: Run git diff --staged --name-only to get the list of staged files.

    • If no staged changes, output: "No staged changes found. Stage changes with git add before running $map diff." and exit.
  4. Read coco-map.json: Load the structural dependency graph from coco-map.json.

  5. Identify modified functions: For each staged file path, check if any function in coco-map.json has a matching file path. Collect the set of modified functions.

  6. Trace downstream dependents: For each modified function, traverse the dependency graph in coco-map.json:

    • Find all functions that list the modified function as a dependency (direct dependents)
    • Find their dependents (transitive — stop at 5 hops)
    • Collect the full impact set
  7. Check shared evaluation sets: Identify whether any modified function shares an evaluation set with other functions. If so, those other functions are also affected — they may produce different results after the change.

  8. Check capability definitions: Identify whether the modified functions belong to any named business capabilities in the domain section. If a capability definition changes, note it.

  9. Build impact report and display:

CocoMap Impact Analysis — [timestamp]
Staged files: [N]

Modified functions: [N]
  - [function-name] ([file-path])
  - ...

Downstream impact:
  Direct dependents: [N]
    - [dependent-function] — depends on [modified-function] via [dependency-type]
  Transitive dependents (up to 5 hops): [N]
    - [transitive-function] — [hop-count] hops from modified

Shared evaluation sets affected:
  - [eval-set-name] — also used by [other-functions] (those evaluations may produce different results)
  [or: "None"]

Business capabilities affected:
  - [capability-name]: [description of what changes]
  [or: "None"]

Gaps surfaced:
  - [any new gaps the change would introduce, e.g. adding a dependency on an unevaluated function]
  [or: "None"]

Recommendation: [brief summary of what to review before committing]

Read the full file on GitHub · 107 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. 2d ago First seen · 107 lines · 28 tokens per session scan A fa1a2ea07413

Subscribe to this mod's changes

map-diff is a skill published in the GitHub repository Snowflake-Labs/cocoplus (720 stars, last pushed 3d ago), licensed MIT. It adds 28 tokens to every session and 967 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-09-03.

Related

Other skills, from other repositories

commit-changes

Stage, commit, and amend changes with conventional commit messages. Covers reviewing changes, selective staging, writing descriptive commit messages using HEREDOC format, and verifying commit history. Use when saving a logical unit of work to version control, creating a commit with a conventional message, amending the…

pjt222/agent-almanac · 72 tokens

configure-git-repository

Configure a Git repository with proper .gitignore, branch strategy, commit conventions, hooks, and remote setup. Covers initial setup and common patterns for R, Node.js, and Python projects. Use when initializing version control for a new project, adding a .gitignore for a specific language or framework, setting up…

pjt222/agent-almanac · 78 tokens

pn-github-vertical-slices

Break a plan or PRD into tracer-bullet vertical slices and create GitHub Issues via GitHub MCP (official github/github-mcp-server). Dependencies first (AFK/HITL). Use after pn-writing-plans or pn-create-prd when work must ship as Issues.

perniemann/pnCore · 64 tokens

git-helper

Generate git commit messages and help with git workflows.

maxvaega/skillkit · 12 tokens

conventional-commits

Write precise Conventional Commits messages from the actual staged diff. Use whenever committing code or asked to write/fix a commit message.

jnMetaCode/skillet · 32 tokens

opensource-contributions

Make good open source contributions — check CONTRIBUTING.md first, follow project norms, be a good citizen. Covers bug reports, feature requests, and pull requests with a defensible default posture when the project hasn't documented expectations. Do not use this skill for unrelated requests; route to the nearest named…

magnus919/agent-skills · 64 tokens