/dev-standards:dev-standards-git-guardrailsfrom dev-standards
Set up a Claude Code PreToolUse hook that blocks destructive git commands (push, reset --hard, clean -f, branch -D, checkout .) before they run. Use when: prevent destructive git, add git safety hook, block git push/reset, git guardrails
Ships in dev-standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Set up a PreToolUse hook intercepting dangerous git commands before Claude executes them. The blocked list is a default, not a mandate — the user picks scope and edits the patterns.
git push (incl. --force), git reset --hard, git clean -f / -fd, git branch -D, git checkout . / git restore .. On a match the hook exits 2 and prints a BLOCKED message to stderr; Claude is told it lacks authority for that command.
.claude/settings.json) or all projects (~/.claude/settings.json)?scripts/block-dangerous-git.sh to:
.claude/hooks/block-dangerous-git.sh~/.claude/hooks/block-dangerous-git.sh
Then chmod +x it.hooks.PreToolUse with matcher Bash and the script path (project: "$CLAUDE_PROJECT_DIR"/.claude/hooks/block-dangerous-git.sh; global: ~/.claude/hooks/block-dangerous-git.sh). Merge into any existing PreToolUse array — do not overwrite other hooks.echo '{"tool_input":{"command":"git push origin main"}}' | <path-to-script>
Expect exit code 2 + a BLOCKED message on stderr.Adapted from mattpocock/skills (MIT). Original:
skills/misc/git-guardrails-claude-code.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub standardbeagle/standardbeagle-tools --plugin dev-standardsOther plugins' skills for the same job
25 skills in this plugin
/dev-standards-add-skillCreate new project-specific skill in `.claude/skills/` to codify recurring pattern. 在項目中新建可複用技能。 Use when: add skill, create skill, new skill, codify pattern, make reusable workflow/dev-standards-ce-compound記錄已解決問題以複利機構知識。Document solved problems in docs/solutions/ with structured YAML frontmatter. Use when: non-trivial problem solved + verified, prevent re-discovery, capture institutional learning before context fades, document best practice or workflow pattern. Skip: trivial (typo), solution unverified, problem in progress, project lacks docs/solutions/ convention./dev-standards-ce-setupDiagnose + configure compound-engineering env — CLI deps, plugin version, repo-local config. Guided install for missing tools, gitignore + config bootstrap. Use when: troubleshoot missing tools, verify CE setup, onboard repo, refresh config template, /ce-setup re-check. Skip: unrelated to compound-engineering tooling.