Arra Safety Hooks — Documentation skill for Claude Code
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— allowexit 2— block (message shown via stderr)
Smart regex anchoring (`^|;|&&|\|\|`) ensures only actual commands ar
Related Skills
Cchooks
by GowayLee - A lightweight Python SDK with a clean API and good documentation; simplifies the process of writ
Pre Commit Hooks
by aRustyDev - This repository is about pre-commit-hooks in general, but the CLAUDE.md and related .claude/ do
Claude Code Starter Pack
Claude Code skill that scaffolds an anti-drift doc system: approval-locked vision, strategy ledger injected ev
Claude Recap
Per-topic session memory using Shell hooks — archives each conversation topic as a separate Markdown summary.
Caveat
Long-term memory layer for Claude Code and Codex — markdown-in-git knowledge base, SQLite FTS5 retrieval, MCP,
Claude Code Memory Stack
A complete, runnable template for giving Claude Code a persistent memory: a Markdown knowledge vault, skills,
Related Agents
Safety Guardian
PROACTIVELY use this agent for comprehensive safety mechanisms ensuring acceptable operation bounds. Specializ
Audit Policy Compliance
Platform policy specialist. Returns schema-valid findings covering platform eligibility, regulated categories,
Code Reviewer Frontend
Use this agent for deep frontend code review: React components, Kea state management, hooks patterns, accessib