Claude Code Mastering

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.

6
Rules
21
Commands
8
Agents
3
Skills
9
Templates
3
MCP Servers
Open Source — Star us on GitHub. Contributions welcome!

How It Works

Every command you give flows through three MCP servers working together.

Claude Code Mastering Workflow Diagram
  1. You Give a Command A task, bug fix, feature request, or question — anything you need Claude to do.
  2. Sequential Thinking Analyzes Breaks down the problem step-by-step, consulting Context7 for up-to-date library docs when needed.
  3. 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.

prompt
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.
Note: This works with Claude Code CLI. For other AI assistants, you may need to adjust the git/file commands to match their tool capabilities.

Manual Setup

For those who prefer full control over the installation process.

Prerequisites

Claude Code CLI

Installed and authenticated

docs.anthropic.com →

Node.js 18+

Required for MCP servers

nodejs.org →

Python 3.11+ with uvx

Required for Serena MCP

docs.astral.sh/uv →

1 Clone or copy into your project

bash
# 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/
.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
Tip: Files in 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

bash
# 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

bash
# 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.

your-project/ ├── .claude/ │ ├── agents/ # Specialized sub-agents │ │ ├── backend-tester.md # Test execution & analysis │ │ ├── code-reviewer.md # Code quality reviews │ │ ├── debugger.md # Bug investigation │ │ ├── frontend-builder.md # Frontend build & lint fixes │ │ ├── spec-design-validator.md │ │ ├── spec-requirements-validator.md │ │ ├── spec-task-executor.md │ │ └── spec-task-validator.md │ │ │ ├── commands/ # Slash commands (/command-name) │ │ ├── backend/ │ │ │ ├── lint.md # /backend:lint │ │ │ ├── test.md # /backend:test │ │ │ ├── migrate.md # /backend:migrate │ │ │ └── security.md # /backend:security │ │ ├── frontend/ │ │ │ ├── build.md # /frontend:build │ │ │ ├── lint.md # /frontend:lint │ │ │ ├── test.md # /frontend:test │ │ │ └── storybook.md # /frontend:storybook │ │ ├── deploy-check.md # /deploy-check │ │ ├── git-add-commit.md # /git-add-commit │ │ ├── git-pull-request.md # /git-pull-request │ │ ├── bug-create.md # /bug-create │ │ ├── bug-analyze.md # /bug-analyze │ │ ├── bug-fix.md # /bug-fix │ │ ├── bug-verify.md # /bug-verify │ │ ├── bug-status.md # /bug-status │ │ ├── spec-create.md # /spec-create │ │ ├── spec-execute.md # /spec-execute │ │ ├── spec-list.md # /spec-list │ │ ├── spec-status.md # /spec-status │ │ └── spec-steering-setup.md # /spec-steering-setup │ │ │ ├── rules/ # Contextual coding rules │ │ ├── backend.md │ │ ├── frontend.md │ │ ├── deployment.md │ │ ├── documentation.md │ │ ├── code-style.md │ │ └── planning.md │ │ │ ├── skills/ # Auto-activating assistants │ │ ├── api-development/ │ │ ├── database-migration/ │ │ └── security-review/ │ │ │ ├── templates/ # Structured document templates │ │ ├── bug-report-template.md │ │ ├── bug-analysis-template.md │ │ ├── bug-verification-template.md │ │ ├── requirements-template.md │ │ ├── design-template.md │ │ ├── tasks-template.md │ │ ├── product-template.md │ │ ├── tech-template.md │ │ └── structure-template.md │ │ │ └── settings.local.json # MCP server enablement │ ├── .mcp.json # MCP server configuration └── CLAUDE.md # Master rules & workflow

Slash Commands

Run these inside Claude Code:

CommandDescription
/backend:lintRun backend code quality checks (black, ruff, mypy)
/backend:testRun backend tests via Docker Compose
/backend:migrateCreate or run database migrations
/backend:securityRun security checks before deployment
/frontend:buildFull frontend build with quality checks
/frontend:lintLint and format frontend code
/frontend:testRun frontend tests with Vitest
/frontend:storybookStart Storybook dev server
/deploy-checkRun all pre-deployment checks
/git-add-commitStage and commit with structured commit messages
/git-pull-requestCreate 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:

1
Requirements User stories with acceptance criteria
2
Design Architecture with Mermaid diagrams
3
Tasks Atomic, agent-friendly implementation tasks
4
Execution Step-by-step implementation with validation

MCP Servers

Three MCP servers power the intelligent workflow. All are configured in .mcp.json and auto-start with Claude Code.

Why only 3? Every connected MCP server injects its tool definitions into the system prompt, consuming tokens on every single request — even when those tools are never used. These three MCPs are chosen because they are used on every task: Sequential Thinking analyzes every request, Serena navigates and edits every codebase, and Context7 looks up every library. No wasted tokens, no idle tools — just what you actually need.

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.

AgentModelPurpose
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/:

markdown
# 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/:

markdown
---
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/:

markdown
---
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:

markdown
---
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 from rules/deployment.md
  • No frontend? Delete commands/frontend/, rules/frontend.md, agents/frontend-builder.md

Requirements

Tools needed for each stack component.

StackRequired Tools
Backend (Python)Docker, Docker Compose, uv, Python 3.11+
Frontend (Node)Node.js 18+, npm
MCP: SerenaPython 3.11+, uvx
MCP: Sequential ThinkingNode.js 18+, npx
MCP: Context7Node.js 18+, npx
MCP: Playwright (optional)Node.js 18+, npx

FAQ

Do I need all three MCP servers?
Sequential Thinking and Context7 work out of the box with just Node.js. Serena requires Python/uvx but provides the most powerful code intelligence. You can disable any server in .claude/settings.local.json.
Can I use this with a monorepo?
Yes. Use 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?
Simply delete the .md file. Claude Code discovers them at startup.
The MCP servers aren't starting. What do I check?
Verify Node.js 18+ and Python 3.11+ are installed. Check .mcp.json paths. Run npx -y @modelcontextprotocol/server-sequential-thinking manually to test.