Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By karanb192v1.0.3MITIn 1 marketplace
Stamps a receipt of the session's prompts, estimated spend and test results into the PR body Claude creates with gh pr create. Its hook rewrites the command for your approval, and the receipt is published with the PR.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
pull-request, pr-description, code-provenance, ai-attribution, audit-trail, github-cli, gitlab-mr, claude-code ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Stamps a provenance receipt (prompts, estimated spend, tests run with exit codes, and a truthful agent-authored line split) into your PR body on
gh pr create.
A PostToolUse hook keeps a per-session ledger: tool-call count, agent-authored line count, and every test/typecheck/lint command with its real exit code. When Claude runs gh pr create (or glab mr create), a PreToolUse (Bash) hook reads the session transcript for the real prompt count, estimated token/dollar spend, and models, asks git for the branch's total added lines to derive an agent-vs-human split, then appends a one-line receipt to the PR --body. The hook never approves the command itself: it returns ask, so Claude Code shows you the rewritten command, receipt included, and you approve it. This means a stamped gh pr create prompts even when a permission rule would have allowed it. If the command builds its body with a heredoc, $(...), backticks, or process substitution, the hook defers and leaves the command untouched rather than risk corrupting it.
/plugin marketplace add karanb192/claude-code-hooks # once per machine
/plugin install pr-provenance-stamp@claude-code-hooks
Restart Claude Code, done. (Or from a shell: claude plugin install pr-provenance-stamp@claude-code-hooks.)
| Event | Runs | What happens |
|---|---|---|
PostToolUse (Edit|MultiEdit|Write|Bash) | async (zero added latency) | Updates the session ledger: tool-call count, agent-authored line count, and each test/typecheck command with its real exit code. |
PreToolUse (Bash) | sync | On gh pr create / glab mr create, rewrites the --body to append the receipt (prompt count, est. spend, test tally, agent-vs-human line split). Defers on unsafe shell constructs. |
/pr-provenance-stamp:provenance renders the current session's receipt exactly as it would be stamped into a PR body, without creating one.
No configuration needed. State is stored per session at ~/.claude/pr-provenance-stamp/<session_id>.json (hook logs at ~/.claude/hooks-logs/).
Records tool-call counts, test commands with exit codes, agent line counts, and transcript-derived prompt/spend estimates. Everything is read and computed on your machine: the hook makes no network calls of its own; it only shells out to git for the line diff. It does rewrite the --body of your gh pr create command, so the receipt text becomes part of the public PR description that gets published to GitHub.
/plugin uninstall pr-provenance-stamp@claude-code-hooks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub karanb192/claude-code-hooks --plugin pr-provenance-stampPlugins from other owners that cover similar ground