Claude Code Development Workflow Guide - ClearMatch/clear-match GitHub Wiki

Claude Code Development Workflow Guide

This guide provides comprehensive instructions for setting up and using Claude Code with essential MCP servers to streamline your development workflow.

Table of Contents

  1. Installation & Setup
  2. MCP Server Configuration
  3. Development Workflow
  4. Testing & Review Process
  5. Production Deployment
  6. Best Practices

Installation & Setup

Prerequisites

  • Node.js 18 or newer installed on your system
  • Git configured with your credentials
  • npm or pnpm package manager

Installing Claude Code

  1. Open your terminal or command prompt
  2. Install Claude Code globally:
npm install -g @anthropic-ai/claude-code
  1. Navigate to your project directory:
cd /path/to/your/project
  1. Launch Claude Code:
claude

Initial Setup

On first run, you'll need to:

  1. Authenticate with your Anthropic account
  2. Accept the terms of service
  3. Run with permissions flag for MCP integration:
claude --dangerously-skip-permissions

MCP Server Configuration

Model Context Protocol (MCP) servers extend Claude Code's capabilities. Install these essential servers:

1. GitHub MCP Server

For GitHub repository management, issues, and pull requests:

claude mcp add github -s user -- npx -y @modelcontextprotocol/server-github

Features:

  • Create and manage GitHub issues
  • Handle pull requests
  • Repository operations
  • Issue tracking and project management

2. Context7 MCP Server

For up-to-date documentation and code examples:

claude mcp add --transport http context7 https://mcp.context7.com/mcp

Features:

  • Real-time documentation access
  • Version-specific code examples
  • Framework-specific guidance
  • API documentation lookup

Usage: Add "use context7" to your prompts for enhanced documentation support.

3. Puppeteer MCP Server

For browser automation and testing:

claude mcp add puppeteer -s user -- npx -y @modelcontextprotocol/server-puppeteer

Features:

  • Browser automation
  • End-to-end testing
  • Web scraping capabilities
  • Screenshot capture
  • Form interactions

Verify Installation

Check that all MCP servers are properly configured:

claude mcp list

Development Workflow

Phase 1: Issue Creation & Planning

  1. Generate or Update Issues

    • Ask Claude to create a new GitHub issue or update an existing one
    • Provide a basic description of what needs to be done
    • Example: "Create a new issue for adding user authentication to the dashboard"
  2. Clarification & Architecture

    • Ask Claude to ask clarifying questions about requirements
    • Discuss technical tradeoffs and implementation approaches
    • Make architectural decisions collaboratively
    • Always use Context7: Add "use context7" to get up-to-date recommendations
  3. Scope Management

    • Ensure the issue scope is appropriately sized
    • If too large, ask Claude to break it down into phases
    • Create separate issues for each phase
    • Add issues to your project's Kanban board

Phase 2: Branch Setup & Development

  1. Branch Preparation

    # Have Claude check out main and pull latest changes
    git checkout main
    git pull origin main
    
    # Create new feature branch
    git checkout -b [issue-number]
  2. Test-Driven Development

    • Start with tests: Ask Claude to write tests first
    • State explicitly that tests are not expected to pass initially
    • Claude excels at TDD approach
    • Focus on behavior and expected outcomes
  3. Feature Implementation

    • Ask Claude to implement the feature
    • Ensure all tests pass
    • Follow established code patterns and conventions
    • Maintain code quality standards

Phase 3: Local Testing & Validation

  1. Manual Testing

    • Run the code locally
    • Test the feature functionality
    • Check for regressions in existing features
    • Verify edge cases and error handling
  2. Code Quality Checks

    • Run linting: npm run lint or pnpm lint
    • Run type checking: npm run type-check or pnpm exec tsc --noEmit
    • Run tests: npm test or pnpm test
    • Build verification: npm run build or pnpm build

Testing & Review Process

Phase 4: Code Review & Pull Request

  1. Commit & Push

    # When you're satisfied with the implementation
    git add .
    git commit -m "feat: descriptive commit message"
    git push origin [branch-name]
  2. Pull Request Creation

    • Have Claude create a comprehensive pull request
    • Include clear title and description
    • Link to the original issue
    • Add relevant labels and reviewers
  3. Code Review Process

    • Get the PR link from Claude
    • Use Claude's review command: /review <pr-link>
    • Address any issues found in the review
    • Iterate and fix problems as needed

Phase 5: Browser Testing with Puppeteer

  1. Automated Browser Testing

    • Ask Claude to use Puppeteer MCP
    • Test the application in a real browser
    • Verify feature completion
    • Check for UI/UX regressions
  2. Manual Browser Review

    • Test the feature manually in your browser
    • Verify all functionality works as expected
    • Check responsive design
    • Test different user scenarios

Production Deployment

Phase 6: Deployment & Smoke Testing

  1. Pre-Deployment Checks

    • Ensure all CI/CD checks pass
    • Verify all reviews are approved
    • Confirm no blocking issues exist
  2. Deployment Process

    • Merge using "Squash and Merge" option
    • Monitor deployment pipeline
    • Check for any deployment errors
  3. Production Smoke Testing

    • Test changes on the production application
    • Verify core functionality remains intact
    • Check for any performance impacts
    • Use Puppeteer MCP for automated production testing

Best Practices

Communication & Decision Making

  1. Clarifying Questions

    • When Claude asks clarifying questions and you're unsure, ask for a recommendation
    • Consult with business stakeholders in Slack for business questions
    • Trust your instincts and raise concerns early
    • Iterate based on feedback from stakeholders
  2. Context7 Usage

    • Always use Context7 for framework-specific questions
    • Leverage it for API documentation
    • Get version-specific code examples
    • Stay current with best practices

Code Quality Standards

  1. Testing

    • Write tests before implementation (TDD)
    • Ensure comprehensive test coverage
    • Include edge cases and error scenarios
    • Maintain test quality and readability
  2. Code Style

    • Follow project conventions
    • Use TypeScript strict mode
    • Implement proper error handling
    • Write clear, self-documenting code

Workflow Optimization

  1. Issue Management

    • Keep issues focused and actionable
    • Break large features into smaller chunks
    • Use clear acceptance criteria
    • Link related issues and PRs
  2. Collaboration

    • Communicate progress regularly
    • Ask for help when blocked
    • Share knowledge and learnings
    • Maintain project documentation

Common Commands Reference

Git Operations

# Branch management
git checkout main
git pull origin main
git checkout -b [issue-number]

# Committing changes
git add .
git commit -m "feat: descriptive message"
git push origin [branch-name]

# PR creation
gh pr create --title "Title" --body "Description"

Development Commands

# Start development server
npm run dev

# Build for production
npm run build

# Run tests
npm test

# Linting and type checking
npm run lint
npm run type-check

Claude Code Commands

# Start Claude Code
claude

# List MCP servers
claude mcp list

# Add MCP server
claude mcp add [name] [command]

# Review PR
/review <pr-link>

Troubleshooting

Common Issues

  1. MCP Server Not Found

    • Verify installation with claude mcp list
    • Reinstall the server if needed
    • Check for proper authentication
  2. Permission Errors

    • Run with --dangerously-skip-permissions flag
    • Ensure proper Git configuration
    • Check file system permissions
  3. Build Failures

    • Rebase/merge against main branch
    • Remove duplicate directories
    • Check for type mismatches
    • Verify all dependencies are installed

Getting Help


This workflow is designed to maximize productivity while maintaining code quality and thorough testing. The key to success is leveraging Claude's strengths in TDD, using Context7 for up-to-date information, and maintaining clear communication throughout the development process.

⚠️ **GitHub.com Fallback** ⚠️