mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
36fa6dbd5d
New components: - supply-chain-guard skill (security): npm/PyPI/CI supply chain scanner with IOC database - worktree-guide skill: parallel development with git worktrees - dependabot-review skill: automated Dependabot PR management - worktree-check/cleanup/deliver/init commands (git-workflow) - edit-audit-log hook (development-tools) - env-file-protection and force-push-blocker hooks (security) Also includes: - Regenerated components.json catalog (docs + dashboard) - TinyFish featured page updates and logo - .vercelignore and dashboard .gitignore updates
23 lines
920 B
JSON
23 lines
920 B
JSON
{
|
|
"description": "Block git force push commands using the if condition for efficient filtering. Prevents accidental force pushes that can overwrite remote history. Covers --force, --force-with-lease, and the -f shorthand.",
|
|
"hooks": {
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"if": "Bash(git push *--force*)",
|
|
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Force push is blocked by hook\"}}'"
|
|
},
|
|
{
|
|
"type": "command",
|
|
"if": "Bash(git push *-f*)",
|
|
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Force push (-f) is blocked by hook\"}}'"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|