The complete guide to maximizing Claude Code: Global CLAUDE.md, MCP Servers, Commands, Hooks, Skills, and Why Single-Purpose Chats Matter. This version is obsolete by now.
$ npx -y skills add TheDecipherist/claude-code-mastery --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
What's inside
โจ MDD โ Manual-Driven Development: standalone package
MDD turns Claude Code into a structured development partner: every feature starts with documentation, every fix starts with an audit. 21 modes covering build, audit, planning, ops runbooks, and more โ all via
/mddin any Claude Code session.Install:
npm install -g @thedecipherist/mdd && mdd installGitHub โ ย ยทย npm โ
๐ NEW 2-14-2026: Claude Code Mastery Starter Kit
Everything from V1โV5 baked into a production-ready project template. 16 slash commands, deterministic hook enforcement, a battle-tested MongoDB wrapper, live AI monitoring, and three-layer security โ all wired up and ready to clone. Stop configuring, start building.
The complete guide to maximizing Claude Code: Global CLAUDE.md, MCP Servers, Commands, Hooks, Skills, and Why Single-Purpose Chats Matter.
This version is obsolete by now. Please use the new Claude Code Mastery Starter Kit instead
Previous versions:
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 V3 on GitHub Pages | ๐ View GUIDE.md (V3)
| 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/ # Security vulnerability checks
โ โโโ SKILL.md
โโโ commands/
โโโ new-project.md # /new-project scaffold
โโโ security-check.md # /security-check audit
โโโ pre-commit.md # /pre-commit quality gates
jq (for JSON parsing in shell hooks)# Create hooks directory
mkdir -p ~/.claude/hooks
# Copy hook scripts
cp hooks/block-secrets.py ~/.claude/hooks/
cp hooks/block-dangerous-commands.sh ~/.claude/hooks/
cp hooks/end-of-turn.sh ~/.claude/hooks/
# Make shell scripts executable
chmod +x ~/.claude/hooks/*.sh
# If you don't have settings.json yet
cp templates/settings.json ~/.claude/settings.json
# If you already have settings.json, merge the hooks section manually
# Create skills directory
mkdir -p ~/.claude/skills
# Copy skills
cp -r skills/* ~/.claude/skills/
# Copy template
cp templates/global-claude.md ~/.claude/CLAUDE.md
# Customize with your details
$EDITOR ~/.claude/CLAUDE.md
# Start Claude Code
claude
# Check hooks are loaded
/hooks
# Check skills are loaded
/skills
CLAUDE.md rules are suggestions. Hooks are enforcement.
CLAUDE.md saying "don't edit .env"
โ Parsed by LLM
โ Weighed against other context
โ Maybe followed
PreToolUse hook blocking .env edits
โ Always runs
โ Returns exit code 2
โ Operation blocked. Period.
Real-world example from a community member:
"My PreToolUse hook blocks Claude from accessing secrets (.env files) a few times per week. Claude does not respect CLAUDE.md rules very rigorously."
| Code | Meaning |
|---|---|
| 0 | Success, allow operation |
| 1 | Error (shown to user only) |
| 2 | Block operation, feed stderr to Claude |
Research consistently shows topic mixing destroys accuracy:
| Study | Finding |
|---|---|
| Multi-turn conversations | 39% performance drop when mixing topics |
| Context rot | Recall decreases as context grows |
| Context pollution | 2% early misalignment โ 40% failure rate |
Golden Rule: One Task, One Chat
Contributions welcome! Please:
MIT License - See LICENSE
Built with โค๏ธ by TheDecipherist and the Claude Code community
.gitignore
CLAUDE.md
commands/
explain.md
pr.md
README.md
review.md
test.md
docs/
.nojekyll
app.js
banner.webp
index.html
styles.css
thedecipherist.png
thedecipherist.webp
GUIDE.md
hooks/
after-edit.sh
block-dangerous-commands.sh
block-secrets.py
end-of-turn.sh
notify.sh
images/
banner.webp
thedecipherist.png
thedecipherist.webp
LICENSE
README.md
skills/
commit-messages/
SKILL.md
security-audit/
SKILL.md
templates/
.gitignore
global-claude.md
project-claude.md
settings.jsonFAQ
claude-code-mastery is a Claude Code plugin with 2 hand-picked skills for documentation work, indexed on Flowy. Install it with the command on its page. It includes commit-messages, security-audit. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.