Import External Files into CLAUDE.md with @ Syntax
Your CLAUDE.md doesn't have to contain everything inline. Use @path/to/file syntax to pull in external files — they're expanded into context at session start just like the CLAUDE.md itself.
See @README for project overview and @package.json for available npm commands.
# Additional Instructions
- git workflow @docs/git-instructions.md
- deployment steps @docs/deploy.md
Both relative and absolute paths work. Relative paths resolve from the file containing the import, not from the working directory. Imported files can recursively import other files up to five hops deep.
A great use of this pattern is keeping personal preferences out of source control. Add the import to the shared CLAUDE.md, but keep the imported file on your own machine:
# Individual Preferences
- @~/.claude/my-project-instructions.md
Your teammates don't have that file so they won't see it, but Claude will load it for you every session.
You can also import your project's existing docs so Claude stays in sync automatically:
@package.json
@docs/architecture.md
@.env.example
The first time Claude Code sees external imports in a project, it shows an approval dialog listing all the files. Approve once and it loads them every time.
Imports let CLAUDE.md stay lean while pulling in as much context as Claude needs.
Log in to leave a comment.
When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.
Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.
Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.