claude-code-mastery
CLAUDE.md549 starsChanged 11 months agoMITView on GitHub
This is a documentation and template repository for Claude Code best practices. It contains: - Educational guide (GUIDE.md) explaining Claude Code configuration - Ready-to-use templates for CLAUDE.md files, settings.json, and .gitignore - Example hooks (Python/Bash) for deterministic security enforcement - Example skills for reusable AI expertise This is NOT a code project — there is no build system, no tests, no runtime application. CLAUDE.md rules are suggestions that Claude can override under context pressure. Hooks are deterministic enforcement — they…
- Reads credentials
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- israel7852/claude-code-masteryword for word, first seen Jan 29, 2026
Other versions1 project uses a version of this.
Word for word · 1
- israel7852/claude-code-mastery★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- commit-messagesSkill
- security-auditSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
When editing GUIDE.md: This is the viral Reddit guide.
- Very specific: line 60
When editing templates/: These are copy-paste targets.
- Distinctive: line 62
When editing hooks/: Include usage instructions in file header.
- Very specific: line 64
When editing skills/: SKILL.md requires frontmatter with name and description.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Overview
This is a documentation and template repository for Claude Code best practices. It contains:
- Educational guide (GUIDE.md) explaining Claude Code configuration
- Ready-to-use templates for CLAUDE.md files, settings.json, and .gitignore
- Example hooks (Python/Bash) for deterministic security enforcement
- Example skills for reusable AI expertise
This is NOT a code project — there is no build system, no tests, no runtime application.
Repository Structure
├── GUIDE.md # Main educational content (~900 lines)
├── templates/ # Copy-and-use templates
│ ├── global-claude.md # Template for ~/.claude/CLAUDE.md
│ ├── project-claude.md # Template for ./CLAUDE.md in any project
│ ├── settings.json # Hook configuration template
│ └── .gitignore # Recommended ignore patterns
├── hooks/ # Security enforcement scripts
│ ├── block-secrets.py # PreToolUse: blocks .env/credentials access
│ ├── block-dangerous-commands.sh # PreToolUse: blocks rm -rf, etc.
│ ├── after-edit.sh # PostToolUse: run formatters
│ ├── end-of-turn.sh # Stop: quality gates
│ └── notify.sh # Desktop notifications
└── skills/ # Packaged AI expertise
├── commit-messages/ # Conventional commit generation
└── security-audit/ # Vulnerability scanning checklistKey Concepts
Hooks vs CLAUDE.md
CLAUDE.md rules are suggestions that Claude can override under context pressure. Hooks are deterministic enforcement — they always execute.
block-secrets.py: Exit code 2 blocks Read/Edit/Write operations on sensitive filesblock-dangerous-commands.sh: Exit code 2 blocks dangerous Bash patterns
Hook Exit Codes
| Code | Behavior |
| 0 | Allow operation |
| 1 | Error (shown to user only) |
| 2 | Block operation, stderr fed back to Claude |
Skills
Skills use progressive disclosure: only name/description loaded at startup, full content loaded when triggered. Located in skills/*/SKILL.md with optional supporting files.
Working With This Repo
When editing GUIDE.md: This is the viral Reddit guide. Maintain tone, structure, and citation style. Update "What's new in V2" section when adding features.
When editing templates/: These are copy-paste targets. Keep them self-contained. Use placeholders like YourUsername, [DATE], [e.g., PostgreSQL].
When editing hooks/: Include usage instructions in file header. Explain exit codes. Fail open (exit 0) on unexpected errors.
When editing skills/: SKILL.md requires frontmatter with name and description. Description must explain when to activate.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

