Set Global Defaults in ~/.claude/CLAUDE.md
Project-level CLAUDE.md files are great, but some preferences should follow you everywhere. A CLAUDE.md in your home directory applies to every Claude Code session, regardless of which project you're in.
# Create your global CLAUDE.md
touch ~/.claude/CLAUDE.md
Then add anything you want consistent across all your projects:
## Global Preferences
- Always write TypeScript over JavaScript when given the choice
- Use conventional commits format (feat:, fix:, chore:, etc.)
- Run tests before marking any task complete
- Prefer composition over inheritance
- Add JSDoc comments to all exported functions
This file is loaded first, before any project-level CLAUDE.md. Project files can extend or override it, so your global preferences act as sensible defaults without locking you in.
It's perfect for things like your preferred coding style, commit message format, testing habits, and language preferences — the stuff you'd tell a new team member on day one.
# View your global settings any time
cat ~/.claude/CLAUDE.md
Your global CLAUDE.md is your personal coding style guide that travels with you into every project.
Log in to leave a comment.
The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.
The language setting makes Claude respond in your preferred language by default, across every session and project.
The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.