Quick Reference & Sources

Complete CLAUDE.md Template

# Global CLAUDE.md

## Identity & Accounts
- GitHub: YourUsername (SSH key: ~/.ssh/id_ed25519)
- Docker Hub: authenticated via ~/.docker/config.json
- Deployment: Dokploy (API URL in ~/.env)

## NEVER EVER DO (Security Gatekeeper)
- NEVER commit .env files
- NEVER hardcode credentials
- NEVER publish secrets to git/npm/docker
- NEVER skip .gitignore verification

## New Project Setup (Scaffolding Rules)

### Required Files
- .env (NEVER commit)
- .env.example (with placeholders)
- .gitignore (with all required entries)
- .dockerignore
- README.md
- CLAUDE.md

### Required Structure
project/
├── src/
├── tests/
├── docs/
├── .claude/commands/
└── scripts/

### Required .gitignore
.env
.env.*
node_modules/
dist/
.claude/settings.local.json
CLAUDE.local.md

### Node.js Requirements
- Error handlers in entry point
- TypeScript strict mode
- ESLint + Prettier configured

### Quality Gates
- No file > 300 lines
- All tests must pass
- No linter warnings
- CI/CD workflow required

## Framework-Specific Rules
[Your framework patterns here]

## Required MCP Servers
- context7 (live documentation)
- playwright (browser testing)

## Global Commands
- /new-project — Apply scaffolding rules
- /security-check — Verify no secrets exposed
- /pre-commit — Run all quality gates

Quick Reference Table

Tool Purpose Location
Global CLAUDE.md Security + Scaffolding ~/.claude/CLAUDE.md
Project CLAUDE.md Architecture + Commands ./CLAUDE.md
MCP Servers External integrations claude mcp add
Context7 Live documentation claude mcp add context7
Slash Commands Workflow automation .claude/commands/*.md
Skills Packaged expertise .claude/skills/*/SKILL.md
Hooks Deterministic enforcement ~/.claude/settings.json
Sub-Agents Isolated context Spawn via commands
/clear Reset context Type in chat
/init Generate project CLAUDE.md Type in chat

GitHub Repository

All templates, hooks, and skills from this guide are available:

What's included:

Sources

Anthropic Official

Claude Code Documentation

Community Resources

Research & Analysis

Security

Best Practices