api-and-interface-desi…
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating…
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 kevinnft/ai-agent-skills --skill git-guardrails-claude-code --agent claude-code
Codex
$ npx skills add kevinnft/ai-agent-skills --skill git-guardrails-claude-code -a codex -y
Cursor
$ npx skills add kevinnft/ai-agent-skills --skill git-guardrails-claude-code -a cursor -y
Gemini CLI
$ npx skills add kevinnft/ai-agent-skills --skill git-guardrails-claude-code -a gemini-cli -y
GitHub Copilot
$ npx skills add kevinnft/ai-agent-skills --skill git-guardrails-claude-code -a github-copilot -y
OpenCode
$ npx skills add kevinnft/ai-agent-skills --skill git-guardrails-claude-code -a opencode -y
Windsurf
$ npx skills add kevinnft/ai-agent-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. source_repo: "mattpocock/skills" source_url: "https://github.com/mattpocock/skills" source_license: "MIT" origin: aggregated language: en
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 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.
191 attribution-first agent skills for Hermes Agent, Claude Code, Cursor — one installer, 28 categories, searchable catalog. See NOTICE for upstream attribution.
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating…
Tests in real browsers. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM,…
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate…
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a…
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder…
Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.