The complete guide to Claude Code: CLAUDE.md, hooks, skills, MCP servers, and commands
# Add to your Claude Code skills
git clone https://github.com/TheDecipherist/claude-code-masteryThe complete guide to maximizing Claude Code: Global CLAUDE.md, MCP Servers, Commands, Hooks, Skills, and Why Single-Purpose Chats Matter.
TL;DR: Your global
~/.claude/CLAUDE.mdis a security gatekeeper AND project scaffolding blueprint. MCP servers extend Claude's capabilities. Custom commands automate workflows. Hooks enforce rules deterministically (where CLAUDE.md can fail). Skills package reusable expertise. And research shows mixing topics in a single chat causes 39% performance degradation.
# Clone this repo
git clone https://github.com/TheDecipherist/claude-code-mastery.git
cd claude-code-mastery
# Copy hooks to your Claude config
mkdir -p ~/.claude/hooks
cp hooks/* ~/.claude/hooks/
chmod +x ~/.claude/hooks/*.sh
# Copy the settings template (review and customize first!)
cp templates/settings.json ~/.claude/settings.json
# Copy skills
mkdir -p ~/.claude/skills
cp -r skills/* ~/.claude/skills/
š± Read on Website (recommended) |
| Part | Topic | Key Takeaway | |------|-------|--------------| | 1 | Global CLAUDE.md as Security Gatekeeper | Define once, inherit everywhere | | 2 | Project Scaffolding Rules | Every project follows same structure | | 3 | MCP Servers | External tool integrations | | 4 | Context7 | Live documentation access | | 5 | Custom Commands | Workflow automation | | 6 | Single-Purpose Chats | 39% degradation from topic mixing | | 7 | Skills & Hooks | Enforcement over suggestion |
claude-code-mastery/
āāā GUIDE.md # The complete guide
āāā templates/
ā āāā global-claude.md # ~/.claude/CLAUDE.md template
ā āāā project-claude.md # ./CLAUDE.md starter
ā āāā settings.json # Hook configuration template
ā āāā .gitignore # Recommended .gitignore
āāā hooks/
ā āāā block-secrets.py # PreToolUse: Block .env access
ā āāā block-dangerous-commands.sh # PreToolUse: Block rm -rf, etc.
ā āāā end-of-turn.sh # Stop: Quality gates
ā āāā after-edit.sh # PostToolUse: Run formatters
ā āāā notify.sh # Notification: Desktop alerts
āāā skills/
ā āāā commit-messages/ # Generate conventional commits
ā ā āāā SKILL.md
ā āāā security-audit/ #...