provenance — Claude Code skill: what it does, how to install
provenance previews your session receipt: test outcomes, tool calls, and lines written by the agent.
MIT ★ 586 updated 2026-10-26
/plugin marketplace add karanb192/claude-code-hooks
/plugin install pr-provenance-stamp@claude-code-hooksWhat provenance does
This skill generates a preview of the provenance receipt that the pr-provenance-stamp hook attaches to pull request descriptions created with gh pr create.
Execution relies on pr-provenance-stamp.js via Node.js. It inspects the active session ledger to tally tool executions, typecheck commands, test exit codes, and human versus agent line counts. Prompt counts and estimated spend are pulled from the session transcript during PR creation, meaning they stay blank in this preview.
Rendering fails if Node.js is missing from your environment, as the receipt depends on a local JavaScript runner.
What it helps with
- review the session ledger before opening a pull request
- inspect test run results and exit codes without re-running checks
- track the ratio of agent-authored code against manual edits
Example prompts for the agent
- Show me the provenance receipt for this session
- Summarize how many tests passed and the agent-authored line split
How to install provenance
1Plugin marketplace
/plugin marketplace add karanb192/claude-code-hooks/plugin install pr-provenance-stamp@claude-code-hooksThis installs the whole pr-provenance-stamp plugin with all its skills
2Skills CLI (Vercel)
npx skills add karanb192/claude-code-hooks --skill provenance -a claude-code3Manually: put the files in place
~/.claude/skills/provenance/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/provenance/
1Skills CLI (Vercel)
npx skills add karanb192/claude-code-hooks --skill provenance -a codex2Manually: put the files in place
.agents/skills/provenance/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add karanb192/claude-code-hooks --skill provenance -a cursor2Manually: put the files in place
.cursor/skills/provenance/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install karanb192/claude-code-hooks plugins/pr-provenance-stamp/skills/provenance2Manually: put the files in place
.github/skills/provenance/SKILL.md1Skills CLI (Vercel)
npx skills add karanb192/claude-code-hooks --skill provenance -a gemini-cli2Platform CLI
gemini skills install https://github.com/karanb192/claude-code-hooks --path plugins/pr-provenance-stamp/skills/provenanceManually: put the files in place
.devin/skills/provenance/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about provenance
How to install provenance in Claude Code?
Add the marketplace source with /plugin marketplace add karanb192/claude-code-hooks, then run /plugin install pr-provenance-stamp@claude-code-hooks.
What does the provenance skill do?
It runs pr-provenance-stamp.js to output test results, exit codes, and authoring statistics recorded during the current coding session.
Why are spend figures missing from the preview?
Token expenses and prompt totals are read directly from the session transcript when executing gh pr create, so the preview does not display them.
Source text
SKILL.md · MIT
---
name: provenance
description: Preview the provenance receipt (prompts, est. spend, tests run, agent-authored lines) for the current session ledger
disable-model-invocation: true
---
# Provenance receipt
!`node "${CLAUDE_SKILL_DIR}/../../pr-provenance-stamp.js" --render 2>/dev/null || node "${CLAUDE_PLUGIN_ROOT}/pr-provenance-stamp.js" --render`
The block above is the provenance receipt exactly as it would be stamped into a PR
body when you run `gh pr create`, built from the most recent session ledger the
`pr-provenance-stamp` hook has been recording (tool calls, test/typecheck commands
with real exit codes, and the agent-vs-human authored-line split). Prompt and spend
figures come from the transcript at PR-create time, so they may be absent in this
preview.
Briefly summarize the receipt for the user: how many tests ran and whether they are
green, and the agent-authored line count or percentage. Keep it to a sentence or two
and do not re-run any commands.
© Karan Bansal · MIT · karanb192/claude-code-hooks