agentleFS
InfopibeInfopibe/everything-claude-code/examples/CLAUDE.md

everything-claude-code / examples

CLAUDE.md8 starsChanged 8 months agoMITView on GitHub

This is an example project-level CLAUDE.md file. Place this in your project root. [Brief description of your project - what it does, tech stack]

  • Reads credentials

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No emojis in code, comments, or documentation

    line 20
  2. Distinctive:

    No console.log in production code

    line 22
  3. Distinctive:

    Never commit to main directly

    line 98
  4. Distinctive:

    All tests must pass before merge

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Example Project CLAUDE.md

This is an example project-level CLAUDE.md file. Place this in your project root.

Project Overview

[Brief description of your project - what it does, tech stack]

Critical Rules

1. Code Organization

  • Many small files over few large files
  • High cohesion, low coupling
  • 200-400 lines typical, 800 max per file
  • Organize by feature/domain, not by type

2. Code Style

  • No emojis in code, comments, or documentation
  • Immutability always - never mutate objects or arrays
  • No console.log in production code
  • Proper error handling with try/catch
  • Input validation with Zod or similar

3. Testing

  • TDD: Write tests first
  • 80% minimum coverage
  • Unit tests for utilities
  • Integration tests for APIs
  • E2E tests for critical flows

4. Security

  • No hardcoded secrets
  • Environment variables for sensitive data
  • Validate all user inputs
  • Parameterized queries only
  • CSRF protection enabled

File Structure

src/
|-- app/              # Next.js app router
|-- components/       # Reusable UI components
|-- hooks/            # Custom React hooks
|-- lib/              # Utility libraries
|-- types/            # TypeScript definitions

Key Patterns

API Response Format

interface ApiResponse<T> {
  success: boolean
  data?: T
  error?: string
}

Error Handling

try {
  const result = await operation()
  return { success: true, data: result }
} catch (error) {
  console.error('Operation failed:', error)
  return { success: false, error: 'User-friendly message' }
}

Environment Variables

# Required
DATABASE_URL=
API_KEY=

# Optional
DEBUG=false

Available Commands

  • /tdd - Test-driven development workflow
  • /plan - Create implementation plan
  • /code-review - Review code quality
  • /build-fix - Fix build errors

Git Workflow

  • Conventional commits: feat:, fix:, refactor:, docs:, test:
  • Never commit to main directly
  • PRs require review
  • All tests must pass before merge

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.