$ recombobulate _
home / tips / use-claudemd-to-set-project-context
use-claudemd-to-set-project-context

A CLAUDE.md file in your project root is automatically loaded into every Claude Code conversation. Use it to define your stack, conventions, and common commands so you never have to re-explain them.

# CLAUDE.md

## Stack
- PHP 8.4, Laravel 13, Livewire 4, Tailwind CSS v4

## Commands
- `php artisan test --compact` — run tests
- `vendor/bin/pint --dirty` — format code

## Conventions
- All PHP files must use `declare(strict_types=1);`
- Use Pest for testing, not PHPUnit directly
- Service layer handles business logic — controllers handle HTTP only

Claude Code looks for CLAUDE.md in two places: the project root (loaded for every session in that directory) and the global ~/.claude/CLAUDE.md (loaded for every session, everywhere). Put project-specific rules in the project file and universal preferences in the global one.

You can also create nested CLAUDE.md files in subdirectories for more specific context — useful in monorepos where different packages have different conventions. Claude picks up the most relevant one based on the files you're working with.

Keep it concise — think of it as a cheat sheet for Claude, not a novel. A well-maintained 30-line CLAUDE.md beats a 300-line one nobody keeps up to date.

The best CLAUDE.md is the one that reflects how your project actually works today — not how it worked six months ago.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Switch to the Stable Update Channel with autoUpdatesChannel

The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.

bagwaa @bagwaa · 1 hour ago
0
Set Claude's Response Language with the language Setting

The language setting makes Claude respond in your preferred language by default, across every session and project.

bagwaa @bagwaa · 1 hour ago
0
Customize or Remove Claude's Git Attribution with the attribution Setting

The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.

bagwaa @bagwaa · 1 hour ago