Claude Code Mastering
A batteries-included .claude/ configuration boilerplate for Claude Code. Drop it into any project and get a structured, opinionated development workflow powered by MCP tools, slash commands, custom agents, and more.
How It Works
Every command you give flows through three MCP servers working together.
- You Give a Command A task, bug fix, feature request, or question — anything you need Claude to do.
- Sequential Thinking Analyzes Breaks down the problem step-by-step, consulting Context7 for up-to-date library docs when needed.
- Serena Executes Loads previous context from memory, navigates and edits code with LSP-powered tools, then saves new context.
One-Click Setup
The fastest way to get started. Copy the prompt below and paste it into Claude Code inside your project directory.
Set up the Claude Code Mastering boilerplate in this project. Follow these steps:
1. Clone the boilerplate repo to a temp directory and copy the config files:
- git clone https://github.com/yusupsupriyadi/claude-code-mastering.git /tmp/claude-code-mastering
- Copy the .claude/ folder, .mcp.json, and CLAUDE.md from /tmp/claude-code-mastering into this project root
- Remove the temp clone: rm -rf /tmp/claude-code-mastering
2. After copying, ask me the following questions to customize the boilerplate:
a. "What is your project name?" → Replace all "your-project-" placeholders in .claude/ files
b. "What tech stack are you using?" (e.g., Python/FastAPI backend, React frontend, etc.)
→ Remove irrelevant components:
- No backend? Delete .claude/commands/backend/, remove backend section from .claude/rules/deployment.md
- No frontend? Delete .claude/commands/frontend/, .claude/rules/frontend.md, .claude/agents/frontend-builder.md
c. "What is your preferred communication language?" → Update the language setting in CLAUDE.md (default is Bahasa Indonesia)
3. After customization, show me a summary of:
- Which files were copied
- Which components were removed (if any)
- Which placeholders were replaced
- What slash commands are available (list all /command-name)
4. Finally, verify the setup by checking that .claude/ folder exists with the correct structure.
Manual Setup
For those who prefer full control over the installation process.
Prerequisites
1 Clone or copy into your project
# Option A: Clone as a starting point for a new project
git clone https://github.com/yusupsupriyadi/claude-code-mastering.git my-project
cd my-project
rm -rf .git && git init
# Option B: Copy into an existing project
git clone https://github.com/yusupsupriyadi/claude-code-mastering.git /tmp/ccm
cp -r /tmp/ccm/.claude your-project/.claude
cp /tmp/ccm/.mcp.json your-project/.mcp.json
cp /tmp/ccm/CLAUDE.md your-project/CLAUDE.md
rm -rf /tmp/ccm
2 Customize for your project
Open CLAUDE.md and review the rules. The defaults work for most full-stack projects. Key things to customize:
- Communication language — defaults to Bahasa Indonesia, change if needed
- Git rules — review commit message conventions
- MCP tool preferences — adjust workflow to your team's style
.claude/rules/
├── backend.md # Backend dev rules (Docker, testing)
├── frontend.md # Frontend dev rules (npm, builds)
├── deployment.md # Pre-deploy checklists
├── documentation.md # Documentation standards
├── code-style.md # Code style conventions
└── planning.md # Task planning requirements
rules/ can have paths: frontmatter to scope them to specific directories. Add this back if you want rules to only trigger for certain folders (e.g., paths: ["backend/**/*"]).
3 Verify MCP servers work
# Start Claude Code — MCP servers auto-initialize
claude
# Inside Claude Code, test each MCP:
# Sequential Thinking — automatic, used on every request
# Serena — type: /backend:test or ask Claude to analyze code
# Context7 — ask Claude about any library docs
4 (Optional) Set up Serena project
# Inside Claude Code, run:
# > activate_project with your project path
# > onboarding to index the codebase
Project Structure
A well-organized directory layout designed for maximum Claude Code effectiveness.
Slash Commands
Run these inside Claude Code:
| Command | Description |
|---|---|
/backend:lint | Run backend code quality checks (black, ruff, mypy) |
/backend:test | Run backend tests via Docker Compose |
/backend:migrate | Create or run database migrations |
/backend:security | Run security checks before deployment |
/frontend:build | Full frontend build with quality checks |
/frontend:lint | Lint and format frontend code |
/frontend:test | Run frontend tests with Vitest |
/frontend:storybook | Start Storybook dev server |
/deploy-check | Run all pre-deployment checks |
/git-add-commit | Stage and commit with structured commit messages |
/git-pull-request | Create pull request using GitHub CLI |
Bug Workflow
A streamlined 4-phase workflow for tracking and resolving bugs:
/bug-create
→
/bug-analyze
→
/bug-fix
→
/bug-verify
→
/bug-status
Each phase creates structured documents in .claude/bugs/{bug-name}/.
Spec-Driven Development
A full specification workflow for building features methodically:
MCP Servers
Three MCP servers power the intelligent workflow. All are configured in .mcp.json and auto-start with Claude Code.
Sequential Thinking
An official MCP server that enables dynamic and reflective problem-solving through structured thought sequences with support for revision and branching.
- Forces step-by-step analysis before any coding action
- Supports revising previous thoughts when understanding changes
- Enables branching into alternative solution paths
- Tracks thought history for context continuity
Serena
LSP-powered semantic code retrieval and editing. Understands code structure — navigates and edits code the way a developer using an IDE would.
- Semantic navigation: symbols, references, type hierarchies
- Precise editing: replace, insert, rename across the project
- 30+ language support: Python, TypeScript, Java, Go, Rust, C#
- Built-in memory: persistent context across sessions
Context7
Up-to-date, version-specific library documentation delivered directly to Claude. No more hallucinated or outdated API usage.
- Fetches current docs for any library (React, FastAPI, Prisma, etc.)
- Returns version-specific API references and code examples
- Eliminates outdated API hallucinations
- Free to use, no API key required
Optional
Playwright-MCP
Browser automation powered by Playwright. Enables Claude to interact with web pages — navigate, click, fill forms, take screenshots, and test web applications.
- Full browser control: navigate, click, type, screenshot
- Form filling and file uploads
- Console and network request monitoring
- Useful for web testing and UI verification
Custom Agents
Specialized sub-agents that Claude delegates to for focused, high-quality work.
| Agent | Model | Purpose |
|---|---|---|
backend-tester |
Sonnet | Execute tests, analyze failures, suggest fixes |
code-reviewer |
Sonnet | Review code quality, security, performance |
debugger |
Opus | Track down bugs across the full stack |
frontend-builder |
Sonnet | Fix build errors, TypeScript issues, lint problems |
spec-*-validator |
Sonnet | Validate spec documents for quality |
spec-task-executor |
Sonnet | Execute individual spec tasks |
Customization Guide
Extend the boilerplate with your own rules, commands, agents, and skills.
Adding New Rules
Create a new .md file in .claude/rules/:
# Your Custom Rules
- Follow project naming conventions
- Write tests for all new features
- Use dependency injection pattern
Adding New Commands
Create a new .md file in .claude/commands/:
---
description: Run database seed script
allowed-tools: Bash(docker compose exec:*)
argument-hint: "[environment: dev|test]"
---
Seed the database for the specified environment.
Adding New Agents
Create a new .md file in .claude/agents/:
---
name: my-agent
description: What this agent does
model: sonnet
tools: [Read, Grep, Bash(specific:*)]
---
## Agent Instructions
Your detailed instructions here...
Adding New Skills
Create a new directory in .claude/skills/ with a SKILL.md:
---
name: my-skill
description: Auto-activates when [trigger]
allowed-tools: Read, Write, Grep
---
## Skill Instructions
Your skill's specialized knowledge...
Removing Unused Components
- No backend? Delete
commands/backend/, remove backend section fromrules/deployment.md - No frontend? Delete
commands/frontend/,rules/frontend.md,agents/frontend-builder.md
Requirements
Tools needed for each stack component.
| Stack | Required Tools |
|---|---|
| Backend (Python) | Docker, Docker Compose, uv, Python 3.11+ |
| Frontend (Node) | Node.js 18+, npm |
| MCP: Serena | Python 3.11+, uvx |
| MCP: Sequential Thinking | Node.js 18+, npx |
| MCP: Context7 | Node.js 18+, npx |
| MCP: Playwright (optional) | Node.js 18+, npx |
FAQ
Do I need all three MCP servers?
.claude/settings.local.json.
Can I use this with a monorepo?
paths: frontmatter in rules to scope them to specific directories. Commands and agents are already framework-agnostic.
How do I disable a specific command or agent?
.md file. Claude Code discovers them at startup.
The MCP servers aren't starting. What do I check?
.mcp.json paths. Run npx -y @modelcontextprotocol/server-sequential-thinking manually to test.