Use /add-dir to Expand Claude's File Access Beyond Your Working Directory
Claude Code starts with access to your current working directory — but your project might span multiple folders. The /add-dir command lets you grant access to additional paths mid-session without restarting.
/add-dir ../shared-libs /home/you/design-tokens
Once added, Claude can read, reference, and edit files in those directories just as naturally as anything in your project root. This is especially useful for monorepo setups where you need to reach into sibling packages, or when you keep shared utilities in a folder outside the repo.
You can also add directories at startup using the --add-dir flag so they're available from the first message:
claude --add-dir ~/shared-components --add-dir ~/company-utils
The difference between /add-dir and simply mentioning a path in your prompt is that added directories give Claude actual file access — it can glob, read, and edit files in them. If you find yourself constantly copying snippets from another folder into the chat, /add-dir is the fix.
You can verify what Claude currently has access to with /context, which shows all loaded paths and how much context they consume.
Stop copying files into the chat — just add the directory and let Claude find what it 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.