PR Attribution
Detects `gh pr create` and appends a credit line to the PR body listing the tonone agents that contributed.
Why use this
PRs created with agent help usually read like a solo effort. This hook credits the actual specialists that shipped the work, so reviewers and future readers see which agents were used, and the plugin gets honest upstream attribution.
Lifecycle
Where in the Claude Code session this hook fires.
Fires after each tool call completes.
Fires only when the tool matches: Bash
How it works
Watches Bash commands for `gh pr create`. When detected, reads .claude/session-agents, formats a sorted, title-cased attribution footer (up to 5 agents, overflow counted), and appends it to the PR description via `gh pr edit`. Links back to tonone.ai. Silent on failure.
settings.json
What the hook configuration looks like in ~/.claude/settings.json after install.
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node ~/.claude/plugins/tonone-ai/tonone/tonone-pr-attribution.js"
}
]
}
]
}
}Install
This hook
Install PR Attribution
1. Add to marketplace
2. Install this hook
More tracking hooks
All hooksReady to use PR Attribution?