provenance

provenance is a skill for Claude Code, Codex from claudechen95/provenance-mcp. It costs 118 tokens per session (1,209 once invoked), scanned A, original, MIT.

A tool for finding the recorded reason behind a line of code by following its history in Git, a system for tracking code changes.

In plain words
What is it for?
Use it to investigate unfamiliar code, review historical decisions, and decide whether an old piece of code is still needed.
Why use it?
It prevents guesses about why code exists by requiring evidence from commits, pull requests, or issues. If no direct reason can be found, it reports that the reason is not recoverable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate unfamiliar code, review historical decisions, and decide whether an old piece of code is still needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/claudechen95/provenance-mcp/skill
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.

Any agent
npx skills add claudechen95/provenance-mcp --skill skill
Clone the repo
git clone --depth 1 https://github.com/claudechen95/provenance-mcp

Made for: Claude Code, Codex.

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 provenance

README.md
[![agentmods](https://agentmods.dev/badge/skills/claudechen95/provenance-mcp/skill/github.svg)](https://agentmods.dev/skills/claudechen95/provenance-mcp/skill)
Your own site
<a href="https://agentmods.dev/skills/claudechen95/provenance-mcp/skill"><img src="https://agentmods.dev/badge/skills/claudechen95/provenance-mcp/skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for provenance

Your own site · 80×15
<a href="https://agentmods.dev/skills/claudechen95/provenance-mcp/skill"><img src="https://agentmods.dev/badge/skills/claudechen95/provenance-mcp/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,209 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00118 $0.01209
Opus 5 $0.00059 $0.00605
Sonnet 5 $0.00024 $0.00242
Haiku 4.5 $0.00012 $0.00121

Measured 8d ago against content hash 060d4ffa0b7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

provenance 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 8d 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.

packages/skill/SKILL.md · 65 lines

How it starts

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

provenance

Doctrine: a WHY is quoted from history, or it is "NOT RECOVERABLE" -- never authored from plausibility. The code itself is not evidence of intent; only a commit message, PR description, or issue that states a reason counts.

Procedure

  1. Resolve the target.

    • If the user gave a file:line, call trace_line({ file, line, ref? }).
    • If the user asked a natural-language question, call ask_why({ question }).
    • If the response's candidates array is non-empty, the match was ambiguous -- list the candidates (path, commit, score) and ask the user to pick one rather than guessing which one they meant.
  2. Read reason.status from the returned Report.

    • "recorded" -- reason.text is a direct quote from a cited source (reason.sourceCitation). Quote it verbatim. Do not paraphrase into a stronger or more general claim than the source actually states.
    • "unknown" -- no source stated an intent directly. Before giving up, call search_history({ query, path, context }) with the surrounding topic to check for related historical commits that might carry the rationale. If that still turns up nothing quotable, the verdict's confidence must be NOT RECOVERABLE -- do not infer a reason from what the code appears to do.
  3. Never invent. Even if a reason seems obvious from reading the code (e.g. "this is obviously for backwards compatibility"), that is not evidence -- it is a guess. If it isn't cited, it doesn't ship. If you must mention an inference, prefix it explicitly with [INFERRED] and never let an [INFERRED] sentence stand in as the WHY by itself.

  4. Render the fixed verdict block below, in this exact order, with no surrounding essay. Every line in EVIDENCE must correspond to one entry in the Report's citations[].

    WHY:        <one short paragraph; every claim carries a citation>
    EVIDENCE:   <sha> <date> <subject>                     [one line per citation]
                <sha> <date> <subject> (via PR #<n> / issue #<n>)   [when a citation
                                                             came from a linked PR/issue]
    STILL LIVE? yes | no | unknown -- <citation for the HEAD-state check>
    VERDICT:    KEEP | DELETE-CANDIDATE | NEEDS-HUMAN
    CONFIDENCE: recovered | partial | NOT RECOVERABLE
    

Read the full file on GitHub · 65 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. 8d ago First seen · 65 lines · 118 tokens per session scan A 060d4ffa0b7f

Subscribe to this mod's changes

provenance is a skill published in the GitHub repository claudechen95/provenance-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 118 tokens to every session and 1,209 once invoked, about $0.0006 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.