ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
$ npx -y skills add mattpocock/skills --skill git-guardrails-claude-code --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/git-guardrails-claude-codeContext preview
The summary Claude sees to decide when to auto-load this skill.
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
name: git-guardrails-claude-code description: Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.
When blocked, Claude sees a message telling it that it does not have authority to access these commands.
Ask the user: install for **this project only** (`.claude/settings.json`) or **all projects** (`~/.claude/settings.json`)?
The bundled script is at: [scripts/block-dangerous-git.sh](scripts/block-dangerous-git.sh)
Copy it to the target location based on scope:
Make it executable with `chmod +x`.
Add to the appropriate settings file:
**Project** (`.claude/settings.json`):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}**Global** (`~/.claude/settings.json`):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}If the settings file already exists, merge the hook into the existing `hooks.PreToolUse` array. Don't overwrite other settings.
Ask if user wants to add or remove any patterns from the blocked list. Edit the copied script accordingly.
Run a quick test:
echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>Should exit with code 2 and print a BLOCKED message to stderr.
My agent skills that I use every day to do real engineering - not vibe coding. Developing real applications is hard. Approaches like GSD, BMAD, and Spec-Kit try to help by owning the process.
Get the whole plugin, auto-invokedRepo: mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding…
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a…
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a CONTEXT.md, or recording or editing an ADR.
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.