Soul-Brews-Studio

Arra Safety Hooks — Documentation skill for Claude Code

Documentation community

Claude Code safety hooks — enforcement over documentation.

How to install Arra Safety Hooks

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Soul-Brews-Studio/arra-safety-hooks and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Arra Safety Hooks does

Claude Code safety hooks — enforcement over documentation.

Alternatives in Documentation

  • Doc Co-authoring — Guide users through structured workflow for co-authoring documentation 94.1k ★
  • Context7 — claude-plugins-official Up-to-date library documentation lookup 50.1k ★
  • Notion Research Documentation — Research Notion content and synthesize findings into structured briefs 14.6k ★

README

arra-safety-hooks

Claude Code safety hooks — enforcement over documentation.

"CLAUDE.md says 'never force push' but relies on AI compliance. A hook with `exit 2` makes it impossible." — Born December 27, 2025

What it blocks

Pattern Why
rm -rf / rm -f Use mv to /tmp instead
git push --force / -f / --force-with-lease Nothing is Deleted
git reset --hard Irreversible
git commit --amend Breaks multi-agent hash sync
git push origin main Always branch + PR
git checkout -- . Use git stash instead
git restore . Use git stash instead
git clean -f Deletes untracked files permanently
git branch -D Use -d (safe delete) instead
git stash drop / clear Nothing is Deleted
--no-verify on commit/push Fix the hook, don't skip it
gh pr create to foreign orgs Ownership check

Beta rules (opt-in)

Pattern Why Toggle
tmux send-keys Use maw hey instead touch /tmp/arra-safety-beta-on
bun run src/cli.ts Use installed maw binary rm /tmp/arra-safety-beta-on to disable
# Enable beta rules
touch /tmp/arra-safety-beta-on

# Disable beta rules
rm /tmp/arra-safety-beta-on

Install

git clone https://github.com/Soul-Brews-Studio/arra-safety-hooks.git
cd arra-safety-hooks
bash install.sh

This copies `safety-check.sh` to `~/.claude/hooks/` and registers it as a `PreToolUse` hook in `~/.claude/settings.json`.

How it works

Claude Code hooks receive JSON via **stdin** when a tool is about to execute:

{
  "session_id": "abc123",
  "hook_event_name": "PreToolUse",
  "tool_name": "Bash",
  "tool_input": { "command": "git push --force" }
}

The hook parses the command with `jq`, checks against blocked patterns, and:

  • exit 0 — allow
  • exit 2 — block (message shown via stderr)

Smart regex anchoring (`^|;|&&|\|\|`) ensures only actual commands ar