Custom instructions
Claude Code provides multiple ways to customise how Claude works. Choose the narrowest option that fits the requirement.
CLAUDE.md
Persistent project context that Claude reads at the beginning of every session.
For: Conventions and project facts
Rules
Focused instructions that can apply to specific file paths, technologies, or areas of the repository.
For: Scoped engineering standards
Skills
Reusable knowledge, checklists, and multi-step workflows loaded only when required.
For: Repeatable procedures
Personal configuration
User-level preferences stored under the personal Claude configuration directory.
For: Individual working preferences
Claude reads project instructions from CLAUDE.md during every session. Skills are better for detailed procedures because their content is loaded only when needed.
Create project instructions
From the project root, start Claude Code:
claude
Run:
/init
Claude creates a starter CLAUDE.md.
Review and simplify the generated content before committing it.
Recommended CLAUDE.md structure
# Project guidance
## Architecture
- Use the existing layered architecture
- Keep business logic separate from framework-specific code
- Reuse existing components before introducing new abstractions
## Development commands
- Start: `npm run start`
- Test: `npm test`
- Lint: `npm run lint`
- Build: `npm run build`
## Engineering standards
- Validate external inputs
- Preserve backward compatibility
- Add tests for changed behavior
- Avoid unrelated refactoring
- Never hardcode credentials or environment-specific values
## Definition of done
- Required tests pass
- Linting and type checks pass
- Production build succeeds
- Final Git diff is reviewed
- Documentation is updated when required
CLAUDE.md is loaded into every session. Keep it focused on durable project facts, important commands, architecture, and rules that apply broadly.
Move long procedures and task-specific checklists into Skills.
Project and personal locations
A common project structure is:
your-project/
├── CLAUDE.md
└── .claude/
├── settings.json
├── settings.local.json
├── rules/
├── skills/
└── agents/
Personal configuration is stored under:
~/.claude/
On Windows, this normally resolves to:
%USERPROFILE%\.claude
Commit project-level instructions and approved shared configuration to Git. Keep personal configuration and local overrides outside shared project history unless explicitly required.
Continue with Skills.