npx claudepluginhub metcalfc/claude-plugin --plugin gh-recipesDefined in hooks/hooks.json
{
"PostToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Check if the Bash tool result contains a GitHub CLI (gh) error. Look for two categories:\n\n## 1. Unknown or missing subcommands\nPatterns: 'unknown command', 'is not a gh command', or failed gh commands.\n\nCommon mistakes to correct:\n- `gh show <ref>:<path>` is NOT a gh command. The correct command is `git show <ref>:<path>` — this is a git command for viewing file contents at a specific ref.\n- `gh log` is NOT a gh command. Use `git log` instead.\n- `gh diff` is NOT a gh command. Use `git diff` instead (or `gh pr diff` for PR diffs).\n- `gh blame` is NOT a gh command. Use `git blame` instead.\n\n## 2. Unknown flags\nPattern: 'unknown flag' in the output.\n\nCommon mistakes to correct:\n- `gh pr diff --stat` → `gh pr diff --name-only` (for file names only) or `gh pr diff | diffstat` (for full stat output). The `--stat` flag does not exist on `gh pr diff`.\n\nWhen you see 'unknown flag', return a systemMessage with the corrected command.\n\n## 3. Unknown JSON field names\nPattern: 'Unknown JSON field' in the output. The gh CLI --json flag uses specific field names that don't always match what you'd expect.\n\nCommon mistakes to correct:\n- `headBranch` → `headRefName` (the branch name for a PR's head)\n- `baseBranch` → `baseRefName` (the branch name for a PR's base)\n- `headSha` or `headOid` → `headRefOid` (the commit SHA of the head)\n- `baseSha` or `baseOid` → `baseRefOid` (the commit SHA of the base)\n- `createdAt` → `createdAt` (correct, but check spelling)\n- `merged` → `mergedAt` or `state` (no boolean 'merged' field)\n- `draft` → `isDraft`\n\nWhen you see 'Unknown JSON field', return a systemMessage with the corrected field name and the fixed command.\n\nIf the failed command is a git operation mistakenly run through gh, return a systemMessage with the corrected git command.\n\nIf the failed command looks like it needs a GitHub API operation (not a local git operation), return a systemMessage suggesting the gh-recipes plugin may have a recipe — check the gh-api-recipes skill.\n\nIf the output is not a gh error or is a successful command, return nothing. Do NOT block or modify execution.",
"timeout": 10
}
],
"matcher": "Bash"
}
]
}"Runs validate-conventional-commit.sh after Bash tool use to validate commit messages against conventional commit standards. Executes bash commands."