Skip to content

mtrense/claude-code-ftw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code FTW

⚠️ Work in Progress: This guide is actively being developed. Some sections may be incomplete or subject to change.

Practical techniques for producing high-quality, maintainable software with Claude Code.

Claude Code is an agentic coding tool that lives in your terminal. This repository helps you maximize its potential through proper context engineering, reproducible workflows, and quality-focused development practices.

Why This Guide?

The quality of AI-assisted code generation depends heavily on the context you provide. This guide teaches you to:

  • Provide effective context so Claude Code understands your project deeply
  • Create reproducible workflows that deliver consistent results
  • Maintain quality standards through structured processes and validation
  • Adapt practices to your specific project needs

Quick Navigation

Section Description
Quickstart Get productive with Claude Code in 10 minutes
Memory Management Master CLAUDE.md and project memory
Context Engineering Provide the right information at the right time
Development Workflows Common patterns for feature development, debugging, and refactoring
Quality Assurance Ensure AI-generated code meets your standards
Advanced Features Hooks, MCP servers, slash commands, and more
Templates Ready-to-use CLAUDE.md templates and configurations
Examples Complete example configurations for different project types

Core Concepts

The Context Hierarchy

Claude Code uses a hierarchical memory system where more specific contexts override general ones:

Project Memory (CLAUDE.md in your repo)  ← Your main focus
        ↓
User Memory (~/.claude/CLAUDE.md)
        ↓
Default Behavior (lowest priority)

Note: Organizations using Claude Code at scale can deploy Enterprise Policies (~/.claude/enterprise-policy.md) that override all other settings. Most individual users and small teams won't encounter this layer.

The CLAUDE.md File

Your project's CLAUDE.md file is the single most important factor in getting quality results. It should contain:

  • Architecture overview - How your codebase is organized
  • Coding standards - Style guides, naming conventions, patterns
  • Common commands - Build, test, lint, deploy scripts
  • Domain context - Business logic, terminology, constraints

See Memory Management for detailed guidance.

The Three-Phase Development Process

For larger features, use a structured approach:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────-┐
│   1. PLANNING   │ ──▶ │   2. BREAKDOWN  │ ──▶ │ 3. IMPLEMENTATION│
│   (Strategic)   │     │   (Tactical)    │     │     (TDD)        │
│                 │     │                 │     │                  │
│  Define goals   │     │  Split into     │     │  Test → Code →   │
│  in ROADMAP.md  │     │  tasks in       │     │  Document →      │
│                 │     │  TASKS.md       │     │  Commit          │
└─────────────────┘     └─────────────────┘     └─────────────────-┘

See Development Workflows for the complete process.

The Quality Loop

For individual tasks, follow this cycle:

1. Provide Context → 2. Generate Code → 3. Validate Output → 4. Refine
        ↑                                                        │
        └────────────────────────────────────────────────────────┘

Key Principles

1. Context is Everything

The more Claude Code understands about your project, the better the results. Invest time in:

  • Writing a comprehensive CLAUDE.md
  • Using @file references for relevant documentation
  • Providing error messages, stack traces, and test output
  • Describing the "why" behind requests, not just the "what"

2. Start Small, Iterate

Don't ask Claude Code to build entire applications at once. Instead:

  • Break work into focused, verifiable tasks
  • Use Plan Mode (Shift+Tab) for complex changes
  • Validate each step before moving on
  • Use /clear to reset context between unrelated tasks

3. Trust but Verify

AI-generated code should be treated like code from any contributor:

  • Run your test suite after changes
  • Review generated code for security issues
  • Check for adherence to your standards
  • Use automated linting and formatting

4. Make It Reproducible

Good practices today should work tomorrow:

  • Document your prompting patterns
  • Create reusable slash commands
  • Set up hooks for automated validation
  • Version control your CLAUDE.md and configurations

Getting Started

Prerequisites

  • Claude Code installed
  • A project you want to enhance with AI assistance
  • Basic familiarity with terminal/command-line tools

First Steps

  1. Initialize your project memory

    cd your-project
    claude
    # Then run: /init
  2. Review and customize CLAUDE.md

    • Add your coding standards
    • Document common workflows
    • Include build/test commands
  3. Start with a simple task

    • Fix a small bug
    • Add a test
    • Document a function
  4. Scale up gradually

    • Tackle larger features
    • Create custom slash commands
    • Set up validation hooks

See Quickstart for a detailed walkthrough.

Project Structure

.
├── README.md                    # You are here
├── CLAUDE.md                    # Project context for Claude Code
├── docs/
│   ├── quickstart.md           # Getting started guide
│   ├── memory-management.md    # CLAUDE.md best practices
│   ├── context-engineering.md  # Effective context provision
│   ├── workflows.md            # Common development workflows
│   ├── quality-assurance.md    # QA practices with AI assistance
│   ├── advanced-features.md    # Hooks, MCP, slash commands
│   └── templates/              # Ready-to-use templates
│       ├── claude-md-basic.md  # Minimal CLAUDE.md template
│       ├── claude-md-full.md   # Comprehensive template
│       └── hooks-examples.md   # Example hook configurations
└── examples/                    # Complete example configurations
    ├── web-project/            # React/Next.js example
    ├── python-project/         # Python/Django example
    └── monorepo/               # Monorepo setup example

Best Practices at a Glance

Practice Why It Matters
Keep CLAUDE.md focused Context window space is limited
Use extended thinking for architecture Better reasoning on complex decisions
Clear context between tasks Prevents confusion from unrelated history
Create custom slash commands Standardize repetitive operations
Set up pre-commit hooks Catch issues before they're committed
Document with examples Concrete examples beat abstract rules

Resources

Official Documentation

Community Resources

Contributing

This documentation is designed to evolve with Claude Code and community learnings. Contributions welcome:

  • Share your CLAUDE.md configurations
  • Document workflows that work for your team
  • Submit improvements to existing guides
  • Add examples for new project types

License

MIT License - Use and adapt freely for your projects.


Next Step: Start with the Quickstart Guide →

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors