/featurekit:git-guardrails-claude-codefrom featurekit
Set up Claude Code hooks that block dangerous git commands such as push, reset --hard, clean, destructive checkout/restore, and branch deletion. Use when a repo needs Claude Code-specific safety guardrails around git operations.
Ships in featurekit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Install a Claude Code PreToolUse hook that blocks high-risk git commands before Claude runs them.
This is optional tooling. Use it only for repos where Claude Code is part of the workflow.
git push, including force pushes.git reset --hard.git clean with force flags.git branch -D..claude/settings.json,~/.claude/settings.json.scripts/block-dangerous-git.sh into the matching hooks directory:
.claude/hooks/block-dangerous-git.sh,~/.claude/hooks/block-dangerous-git.sh.PreToolUse hook into the existing settings file. Do not overwrite unrelated settings.echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>
The script should exit non-zero and print a blocked message.
Repo-local command:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}
Global command:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
}
}
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (qorsmond/featurekit) — no native marketplace selected
npx claudepluginhub p/qorsmond-featurekit30 skills in this plugin
/adr-guidanceRead and apply architectural decision records (ADRs) as governing project context. Use when planning, designing, implementing, reviewing, diagnosing, or handing off work that may touch architecture, data, integrations, deployment, public APIs, or durable technical conventions./ask-featurekitStart clarification for a raw feature or route another product or engineering request to the right FeatureKit flow. Use explicitly when the user is unsure what to run or has a new idea, bug, PRD, slice, implementation, review, prototype, or handoff need. User-invoked router; do not write production code inside this skill./codebase-designImprove or evaluate codebase architecture with a focus on clear boundaries, deep modules, stable interfaces, and maintainable full-stack product design. Use when planning architecture, reviewing a design, or cleaning up codebase complexity.Other plugins' skills for the same job