Black Friday sale: 85 Claude Code agents for $29 one-time · lifetime updatesGet access →

Configuration basics

Updated · 5 min read

Claude Code is configured with a few plain files. Learn these and you can shape how it works in every project.

Where configuration lives#

  • CLAUDE.md: project instructions that Claude reads at the start of every session.
  • .claude/settings.json: permissions and options for the project, which you can share with your team.
  • .claude/settings.local.json: your personal settings for the project. Keep it out of Git.
  • ~/.claude/settings.json: your settings for every project on this computer.
  • .claude/agents, .claude/commands and .claude/skills: subagents, slash commands and skills.

What CLAUDE.md is#

CLAUDE.md is a markdown file in your project root. Claude reads it before it starts working, so it is the place for things you would otherwise repeat in every prompt.

Run /init inside Claude Code and it writes a first version after studying your project. Then edit it by hand.

A starter CLAUDE.md#

Keep it short and specific. Facts and rules work better than long essays.

CLAUDE.md
# Project
Next.js app with TypeScript and Tailwind. Deployed on Vercel.

## Commands
- npm run dev: start the dev server
- npm test: run the tests (run before finishing any task)
- npm run lint: lint and type-check

## Rules
- Use TypeScript strict mode. No "any".
- Components live in src/components, one per file.
- Never edit files in src/generated.
- Ask before adding a new dependency.

Tips for a good CLAUDE.md#

  • List the commands to build, test and lint. Claude uses them to check its own work.
  • Write rules as clear do and don't statements.
  • Keep it under a page or two. A long file wastes context and gets ignored.
  • Update it when Claude makes the same mistake twice.

Need more examples? See the CLAUDE.md template with 10 examples, or generate one with the free CLAUDE.md SEO generator.

Keep reading