Directory · Hooks
Claude Code Mastery
Guide plus ready-to-copy hooks, skills, commands, and CLAUDE.md templates for configuring Claude Code with enforced guardrails.
★ 560 stars · last updated 2026-05-07 · Free, open source · View on GitHub
Best for
- Copying example PreToolUse hooks that block .env access and dangerous shell commands
- Starting a global ~/.claude/CLAUDE.md and settings.json from templates
- Learning how hooks, skills, MCP servers, and commands fit together
- Adding Stop and PostToolUse quality gates such as formatters
Install
git clone https://github.com/TheDecipherist/claude-code-mastery.git
cd claude-code-mastery
mkdir -p ~/.claude/hooks
cp hooks/* ~/.claude/hooks/
chmod +x ~/.claude/hooks/*.sh
cp templates/settings.json ~/.claude/settings.json
mkdir -p ~/.claude/skills
cp -r skills/* ~/.claude/skills/
Our take
The README itself labels this V2 content obsolete and points users to the author's separate Claude Code Mastery Starter Kit and MDD package. The hook scripts are small, copy-and-paste examples that need Python 3.8+ and jq, and the settings template should be merged by hand rather than overwriting an existing settings.json. Still useful as a compact reference for hook exit codes and basic guardrail patterns.
Similar hooks
- Claude Code Ultimate Guide: Large open guide to Claude Code covering agent workflows, hooks, skills, MCP, security, and team adoption, with reusable templates.
- dcg (Destructive Command Guard): Rust pre-execution hook that blocks destructive shell, git, filesystem, database, and cloud commands run by AI coding agents.
- Claude Code Showcase: Example Claude Code project config with hooks, skills, agents, slash commands, MCP setup, and GitHub Actions workflows to copy from.
- Claude Code Hooks Mastery: Reference project implementing all 13 Claude Code hook events as UV Python scripts, plus sub-agents, status lines, and output styles.
- Continuous Claude v3: Hooks, skills, and agents that keep Claude Code context across sessions via YAML handoffs, ledgers, and a PostgreSQL memory store.
- Build with Claude: Plugin marketplace and discovery hub of agents, commands, hooks, and skills for Claude Code users extending their workflows.