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.
Claude Code
$ npx -y skills add mattpocock/skills --skill git-guardrails-claude-code --agent claude-code
Codex
$ npx skills add mattpocock/skills --skill git-guardrails-claude-code -a codex -y
Cursor
$ npx skills add mattpocock/skills --skill git-guardrails-claude-code -a cursor -y
Gemini CLI
$ npx skills add mattpocock/skills --skill git-guardrails-claude-code -a gemini-cli -y
GitHub Copilot
$ npx skills add mattpocock/skills --skill git-guardrails-claude-code -a github-copilot -y
OpenCode
$ npx skills add mattpocock/skills --skill git-guardrails-claude-code -a opencode -y
Windsurf
$ npx skills add mattpocock/skills --skill git-guardrails-claude-code -a windsurf -y
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.
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…
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening…
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something…
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or…
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit…