Skip to content

feat: add safety example (destructive-guard + branch-guard) - #35

Open
yurukusa wants to merge 1 commit into
decider:mainfrom
yurukusa:feat/add-safety-example
Open

yurukusa wants to merge 1 commit into
decider:mainfrom
yurukusa:feat/add-safety-example

Conversation

@yurukusa

Copy link
Copy Markdown

Summary

Adds a safety example to the examples/ directory with two essential hooks:

  • destructive-guard.sh: Blocks filesystem destruction (rm -rf, git reset --hard, git clean)
  • branch-guard.sh: Blocks push to main/master and force-push
    Includes .claude-hooks.json for easy activation.
    The existing examples cover frontend and backend patterns. This adds safety — preventing the kind of incidents reported in #36339 and #36640.

Two essential safety hooks for the examples directory:
- destructive-guard: blocks filesystem destruction
- branch-guard: blocks push to main and force-push
Includes .claude-hooks.json for easy activation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant