A comprehensive configuration setup for Claude Code with Model Context Protocol (MCP) servers, custom commands, and quality-focused workflows.
- Overview
- Quick Start
- Prerequisites
- Installation
- Features
- Commands
- Configuration
- Troubleshooting
- Contributing
- License
This project provides a pre-configured environment for Claude Code with enhanced capabilities through:
- MCP Servers: Context7 for library documentation and code context
- Custom Commands: Intelligent workflows for commits, tasks, code review, and prompt optimization
- Code Quality Tools: Modern CLI tool enforcement and validation hooks
- Structured Workflows: Organized task management with best practices
# 1. Install dependencies
pip install uv
# 2. Clone this configuration
git clone <your-repo> claude-setup
cd claude-setup
# 3. Start using commands
/task_easy implement user authenticationBefore using this setup, ensure you have:
- Claude Code: Installed and configured
- Python 3.8+: For hook script execution
- uv: Package manager for Python script execution
- Node.js: For MCP server functionality (npx)
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# After installation, open a new terminal and verify:
uv --version# Copy configuration files to your project
cp -r .claude/ /your/project/
cp .mcp.json /your/project/Prerequisites - Install Rust (for xsv and sd):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"Complete installation (core tools only):
sudo apt update && sudo apt install -y ripgrep bat fd-find && mkdir -p ~/.local/bin && ln -sf /usr/bin/batcat ~/.local/bin/bat && ln -sf /usr/bin/fdfind ~/.local/bin/fd && cargo install sd xsvComplete installation (core + optional tools):
sudo apt update && sudo apt install -y ripgrep bat fd-find jq && mkdir -p ~/.local/bin && ln -sf /usr/bin/batcat ~/.local/bin/bat && ln -sf /usr/bin/fdfind ~/.local/bin/fd && cargo install sd xsv && sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && sudo chmod +x /usr/local/bin/yqWhat this does:
- Updates package lists
- Installs
ripgrep,bat,fd-find,jqfrom apt - Creates
~/.local/bindirectory - Symlinks
batcatβbatandfdfindβfd(fixes naming conflicts) - Installs
sd,xsvvia Cargo (Rust package manager) - Downloads and installs
yqbinary
sudo pacman -S ripgrep bat fd sd jq yqOptional AUR tools:
yay -S xsv mdqsudo dnf install -y ripgrep bat fd-find jq && cargo install sd xsv && sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && sudo chmod +x /usr/local/bin/yqapk add ripgrep bat fd jq yq && cargo install sd xsvCore tools - Required (single command):
winget install BurntSushi.ripgrep.MSVC && winget install sharkdp.bat && winget install sharkdp.fd && winget install chmln.sd && winget install BurntSushi.xsv.MSVCOptional tools (for specialized operations):
winget install jqlang.jq && winget install MikeFarah.yqIndividual installations:
# Core tools (required)
winget install BurntSushi.ripgrep.MSVC
winget install sharkdp.bat
winget install sharkdp.fd
winget install chmln.sd
winget install BurntSushi.xsv.MSVC
# Optional tools
winget install jqlang.jq
winget install MikeFarah.yqscoop install ripgrep bat fd sd jq yqchoco install ripgrep bat fd-find sd jq yqbrew install ripgrep bat fd sd jq yq xsv mdq| Legacy Tool | Modern Replacement | Package Name | Enforcement |
|---|---|---|---|
grep |
rg |
ripgrep | Blocked |
cat |
bat |
bat | Blocked |
find |
fd |
fd / fd-find | Blocked |
awk/perl |
sd |
sd | Blocked |
cut |
xsv |
xsv (winget/cargo) | Blocked |
| JSON ops | jq |
jq | Suggested |
| YAML ops | yq |
yq | Suggested |
| Markdown | mdq |
mdq (cargo) | Suggested |
Blocked: Hook prevents execution and requires modern tool Suggested: Hook provides recommendation but allows execution
Verify core tools (required):
rg --version
bat --version
fd --version
sd --version
xsv --versionVerify optional tools:
jq --version
yq --versionUbuntu/Debian Naming Conflicts:
batis installed asbatcat(conflict withbacula-console-qt)fdis installed asfdfind(conflict withfdclone)- Symlinks in
~/.local/binresolve this issue
Cargo Requirement:
- Windows: All core tools available via winget - no Cargo needed!
- Linux: Core tools
sdandxsvrequire Rust's Cargo package manager - Optional tool
mdqrequires Cargo on all platforms - Install Rust (Linux):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
PATH Configuration:
- Ensure
~/.local/binis in your PATH (usually automatic on modern Linux) - Add to
~/.bashrcor~/.zshrcif needed:export PATH="$HOME/.local/bin:$PATH"
/commit: Intelligent commit workflow with conventional standards/code-review: Reviews uncommitted changes before committing/task_easy: Structured problem-solving with best practices and code quality guidelines/optimize-prompt: Analyzes and optimizes prompts using the 10 golden rules for AI interaction
code-reviewer: Senior code review specialist for quality assurance- Reviews changes for quality, security, and maintainability
- Provides prioritized feedback (critical, warnings, suggestions)
- Checks for best practices and potential issues
- Context7: Library documentation and code context
- PreToolUse: Tool validation for modern CLI tool enforcement
- Extensible: Easy to add custom hooks for workflow automation
- Documentation: Hooks Reference | Hooks Guide
Structured workflow for problem-solving with built-in code quality guidelines.
Usage:
/task_easy [problem description]Features:
- β Step-by-step analysis before implementation
- β Edge case identification and handling
- β Self-documenting code with clear naming conventions
- β XML documentation for public APIs
- β Root cause focus (no bandaid fixes)
- β No unnecessary fallbacks or backwards compatibility
Output Format:
- Brief Analysis: Key considerations and edge cases identified
- Solution: Clean, production-ready code
- Summary: One-line description of changes made
Examples:
/task_easy implement user authentication system
/task_easy fix the null reference in payment processing
/task_easy add validation to the user registration formAnalyzes and transforms prompts using the 10 golden rules for maximizing AI output quality.
Usage:
/optimize-prompt [your prompt to analyze]Features:
- β Scorecard evaluation against 10 optimization rules
- β Detailed improvement recommendations
- β Fully rewritten optimized prompt
- β
Automatic export to
.claude/optimized-prompts/
The 10 Golden Rules:
- Tone of Collaboration - Clear, firm, respectful
- Principle of Explicitness - Action + Quantity + Topic + Audience
- Defining Boundaries - Constraints produce better results
- Exploratory Draft - Plan β Refine β Execute
- Output Details - Structured formats (tables, JSON, lists)
- Explaining the "Why" - Context and intent
- Art of Brevity - Specify detail level
- Providing a Scaffold - Templates and examples
- Power Phrases - "Think step-by-step", "Critique your response"
- Divide & Conquer - Break massive tasks into sub-tasks
Initiates code-reviewer agent to analyze uncommitted changes only.
Usage:
/code-reviewFeatures:
- Focuses exclusively on uncommitted changes
- Reviews modified files for quality, security, and maintainability
- Provides prioritized feedback:
- π¨ Critical issues (must fix)
β οΈ Warnings (should fix)- π‘ Suggestions (consider improving)
- Includes specific fix examples
Example:
# After making changes
/code-review
# Fix any critical issues
/commitStreamlined commit workflow following conventional commit standards.
Features:
- Diff analysis and change summarization
- Conventional commit message formatting
- Clean, focused commits
Important: Run /code-review before committing to ensure code quality.
Example:
# Review changes first
/code-review
# After fixing issues
/commitclaude-setup/
βββ .claude/
β βββ settings.json # Permissions and hook configuration
β βββ settings.local.json # Local MCP server settings
β βββ agents/
β β βββ code-reviewer.md # Code review specialist
β βββ hooks/
β β βββ tool_validation_hook.py # Modern CLI tool enforcement
β βββ commands/
β β βββ task_easy.md # Structured task workflow
β β βββ optimize-prompt.md # Prompt optimization workflow
β β βββ code-review.md # Code review workflow
β β βββ commit.md # Commit workflow
β βββ optimized-prompts/ # Auto-generated optimized prompts
βββ .mcp.json # MCP server configuration
βββ README.md
The .claude/settings.json file contains permissions and hook configurations:
{
"permissions": {
"allow": ["WebFetch(domain:docs.anthropic.com)", ...],
"deny": [...]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "uv run .claude/hooks/tool_validation_hook.py"
}
]
}
]
}
}The .claude/settings.local.json file enables MCP servers:
{
"enabledMcpjsonServers": ["context7"],
"enableAllProjectMcpServers": true
}The .mcp.json file defines server configurations:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"],
"env": {
"DEFAULT_MINIMUM_TOKENS": "6000"
}
}
}
}Hook not triggering:
- Ensure
uvis installed and in PATH - Check script permissions:
chmod +x .claude/hooks/*.py - Verify hook configuration in
.claude/settings.json
Modern CLI tools not found:
- Install the required tools using the installation commands in the Modern CLI Tools Installation Guide
- Verify installation with version commands (e.g.,
rg --version,bat --version) - Ensure tools are in your PATH
MCP servers not loading:
- Verify Node.js and npx are installed
- Check
.mcp.jsonconfiguration syntax - Ensure MCP packages are available via npx
- Verify
enabledMcpjsonServersin.claude/settings.local.json
Enable debug mode for detailed logging:
claude --debug- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Submit a pull request with detailed description
- Create markdown file in
.claude/commands/ - Use
$ARGUMENTSplaceholder for user input - Define clear instructions and output format
- Create script in
.claude/hooks/ - Make executable:
chmod +x .claude/hooks/your_hook.py - Add configuration to
.claude/settings.json - Test with sample inputs
Resources:
This configuration setup is provided as-is for Claude Code enhancement.
Need help? Check the documentation:
Or open an issue for project-specific questions.