Skip to main content
skill CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add karanb192/claude-code-hooks
/plugin install pr-provenance-stamp@claude-code-hooks
Open on GitHub

What 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-hooks

This 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-code

3Manually: put the files in place

~/.claude/skills/provenance/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/provenance/

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

Similar skills

All skills for Git and GitHub →

From the same set28

The whole set →

Project sponsors

Companies that keep this analytics open