Project: Build Your Developer Toolkit
The Capstone Challenge
Over thirteen lessons you have learned every major feature of Claude Code: project memory, slash commands, skills, hooks, MCP servers, subagents, plugins, checkpoints, print mode, planning, and team configuration. Now it is time to put it all together.
In this capstone project, you will build a complete personal developer toolkit -- a fully integrated system that makes Claude Code work exactly the way you need it to for your most-used project. By the end, you will have a production-ready setup that you can use daily and share with your team.
Work through each step in order. Each step builds on the previous one.
Step 1: Create Your CLAUDE.md
Start with the foundation. Open your most-used project and create a CLAUDE.md file that captures everything Claude needs to know:
# Project: [Your Project Name]
## Overview
Brief description of what this project does and its tech stack.
## Architecture
- Directory structure and what lives where
- Key frameworks and libraries
- Database and external service dependencies
## Coding Standards
- Language and style preferences
- Naming conventions (variables, files, components)
- Import ordering rules
- Error handling patterns
## Git Workflow
- Branch naming convention
- Commit message format
- PR process and merge strategy
## Testing
- Test framework and conventions
- Where test files live
- How to run tests (unit, integration, e2e)
## Critical Rules
- Files and patterns that should NEVER be modified without review
- Secrets and credentials policy
- Deployment-sensitive areas
## Common Tasks
- How to start the dev server
- How to run the database migrations
- How to deploy to staging and production
Fill in every section with real information about your project. The more specific you are, the better Claude will perform. Do not write generic advice -- write the actual commands, paths, and conventions that apply to your codebase.
Try this: after creating the file, start a new Claude Code session and ask it to describe your project's architecture. Verify that it uses the information from your CLAUDE.md accurately.
Step 2: Build a Custom Skill
Identify the task you perform most often and automate it with a skill. Create .claude/skills/[your-task].md:
---
triggers:
- file_write
- file_edit
globs: ["src/**/*.ts"]
description: Enforce consistent error handling across all TypeScript files
---
## Error Handling Standards
When writing or editing TypeScript files in this project:
1. **Never throw raw strings.** Always use the custom AppError class:
```typescript
// Wrong
throw new Error("User not found");
// Correct
throw new AppError("USER_NOT_FOUND", "User not found", 404);
-
Always catch specific errors. Never use bare catch blocks:
// Wrong try { ... } catch (e) { console.log(e); } // Correct try { ... } catch (error) { if (error instanceof AppError) { logger.warn(error.code, error.message); } else { logger.error("UNEXPECTED_ERROR", error); throw error; } } -
Async functions must have error boundaries. Every async handler needs a try/catch or must use the asyncHandler wrapper.
-
Log before rethrowing. If you catch and rethrow, log the error first so it appears in monitoring.
Adapt this example to your project's actual patterns. The skill should encode a standard you want enforced every time Claude touches certain files.
## Step 3: Set Up a PreToolUse Hook
Create guardrails that prevent Claude from performing dangerous operations. Add this to your `.claude/settings.json`:
```json
{
"hooks": {
"PreToolUse": [
{
"matcher": "bash",
"command": "bash -c 'BLOCKED_PATTERNS=\"rm -rf /|drop database|DROP TABLE|--force push|git push.*--force|truncate table\"; echo \"$CLAUDE_TOOL_INPUT\" | grep -qiE \"$BLOCKED_PATTERNS\" && echo \"BLOCKED: This command matches a dangerous pattern. Please confirm with the user before proceeding.\" && exit 1 || exit 0'"
},
{
"matcher": "write|edit",
"command": "bash -c 'echo \"$CLAUDE_TOOL_INPUT\" | grep -qiE \"(AKIA[0-9A-Z]{16}|sk-[a-zA-Z0-9]{48}|password\\s*=\\s*[\\x27\\\"][^\\x27\\\"]+[\\x27\\\"])\" && echo \"BLOCKED: Potential secret or credential detected in file content\" && exit 1 || exit 0'"
}
],
"PostToolUse": [
{
"matcher": "write|edit",
"command": "bash -c 'FILE=$(echo \"$CLAUDE_TOOL_INPUT\" | grep -oP \"(?<=\\\"path\\\":\\s?\\\")[^\\\"]+\"); if [[ \"$FILE\" == *.ts || \"$FILE\" == *.tsx ]]; then npx tsc --noEmit 2>&1 | tail -5; fi; exit 0'"
}
]
}
}
This configuration:
- Blocks destructive shell commands before they execute
- Detects potential secrets being written to files
- Runs TypeScript type checking after every file edit
Step 4: Configure an MCP Server
Connect Claude to an external service you use daily. Here is a GitHub integration example for .mcp.json:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
Set your token as an environment variable:
# Add to your shell profile (.bashrc, .zshrc, or PowerShell profile)
export GITHUB_TOKEN="ghp_your_token_here"
With this configured, Claude can fetch PRs, read issues, check CI status, and interact with your repositories directly.
Try this: after configuring the MCP server, ask Claude to "list the open pull requests on this repository" to verify the connection works.
Step 5: Create a Custom Subagent
Build a specialized agent for a task that benefits from isolation. Create .claude/agents/test-analyzer.md:
# Test Analyzer Agent
## Role
You are a specialized agent focused on test quality analysis. You examine
test suites and provide actionable recommendations.
## Capabilities
- Read test files and source code
- Run test suites and analyze output
- Identify coverage gaps
- Find fragile or flaky test patterns
## Process
1. Read all test files in the specified directory
2. Run the test suite with coverage: `npm test -- --coverage`
3. Analyze results for:
- Files with less than 80% coverage
- Tests that lack assertions (false positives)
- Tests with hardcoded values that should be parameterized
- Missing edge case tests (null, empty, boundary)
- Tests that depend on execution order
## Output Format
Provide a structured report:
- **Coverage Summary**: overall and per-file metrics
- **Critical Gaps**: untested functions and branches
- **Quality Issues**: fragile patterns, missing assertions
- **Recommendations**: specific tests to add, prioritized by risk
Invoke this agent from your main session:
You: Run the test analyzer agent on the src/services/ directory.
Use a worktree for isolation.
Step 6: Package Everything Into a Plugin
Take all the components you have built and bundle them into a plugin. Create the structure:
my-toolkit/
plugin.json
commands/
analyze-tests.md
skills/
error-handling.md
hooks/
safety-checks.sh
agents/
test-analyzer.md
.mcp.json
Create plugin.json:
{
"name": "my-dev-toolkit",
"description": "Personal developer toolkit with error handling standards, safety hooks, test analysis, and GitHub integration",
"version": "1.0.0",
"author": "your-username",
"components": {
"commands": ["commands/analyze-tests.md"],
"skills": ["skills/error-handling.md"],
"hooks": ["hooks/safety-checks.sh"],
"agents": ["agents/test-analyzer.md"],
"mcp": [".mcp.json"]
},
"settings": {
"testCommand": "npm test",
"lintCommand": "npm run lint",
"buildCommand": "npm run build"
}
}
Install and test:
# Install from the local directory
/plugin install ./my-toolkit
# Verify all components are registered
/plugin list
Step 7: Set Up CI/CD Integration
Add Claude Code to your GitHub Actions workflow. Create .github/workflows/ai-review.yml:
name: AI-Powered PR Review
on:
pull_request:
types: [opened, synchronize]
jobs:
ai-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Claude Code
run: npm install -g @anthropic-ai/claude-code
- name: AI Code Review
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
DIFF=$(git diff origin/main...HEAD)
echo "$DIFF" | claude -p \
"Review this PR diff for bugs, security issues, and style problems.
Output a markdown summary with sections: Critical, Warnings, Suggestions.
Be specific — reference file names and line numbers." \
--max-turns 5 \
--output-format text > review.md
- name: Post Review
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const review = fs.readFileSync('review.md', 'utf8');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `## AI Code Review\n\n${review}`
});
Store your ANTHROPIC_API_KEY in the repository's secrets settings.
Step 8: Test the Complete Toolkit
Run through this verification checklist to confirm everything works together:
# 1. Start a new session — CLAUDE.md should load automatically
claude
# 2. Verify project context
You: Describe this project's architecture and testing conventions.
# Claude should reference your CLAUDE.md content
# 3. Test the skill — edit a TypeScript file
You: Add a new function to src/utils/validators.ts
# Claude should follow your error handling skill
# 4. Test the hook — try a dangerous command
You: Run rm -rf /tmp/important-data
# The PreToolUse hook should block this
# 5. Test MCP integration
You: List the open issues on this GitHub repository
# Should return live data from GitHub
# 6. Test the subagent
You: Run the test analyzer agent on src/services/
# Should produce a structured test quality report
# 7. Test CI integration — create a test PR
# Push a branch, open a PR, verify the AI review comment appears
Production-Ready Checklist
Before considering your toolkit complete, verify each item:
- [ ] CLAUDE.md covers architecture, standards, testing, and critical rules
- [ ] At least one skill automates your most frequent coding pattern
- [ ] PreToolUse hooks block destructive commands and secret leaks
- [ ] MCP server connects to your primary external service
- [ ] At least one subagent handles a specialized analysis task
- [ ] All components are packaged in a plugin with proper plugin.json
- [ ] CI/CD workflow runs AI review on pull requests
- [ ] All components have been tested individually and together
- [ ] No secrets or credentials are hardcoded anywhere
- [ ] Plugin is version-controlled and ready for distribution
Next Steps
Your developer toolkit is built. Here is where to go from here:
Iterate and improve. Use your toolkit daily for a week, note what is missing or friction-heavy, and add new skills or hooks to address those gaps.
Share with your team. Push your plugin to a Git repository and help teammates install it. Gather feedback and release improved versions.
Explore the MCP ecosystem. Browse the MCP server registry for integrations with your other tools -- databases, monitoring systems, project management platforms.
Contribute back. If you build a skill or hook that solves a common problem, consider sharing it with the Claude Code community. Open source plugins help everyone.
Stay current. Claude Code evolves rapidly. Follow the release notes to discover new features that can enhance your toolkit.
You started this course by installing Claude Code and running your first command. You are ending it with a complete, production-ready development system that automates your workflows, enforces your standards, connects to your tools, and extends through CI/CD into your entire development pipeline. Every feature you learned -- from CLAUDE.md to plugins to print mode -- is now working together as a unified toolkit tailored to exactly how you work.