promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Claude Code

/add-dir

Adds an additional working directory for file access in the current session.

Adds an additional working directory for file access in the current session. Most .claude/ configuration is not automatically loaded from the added directory. You can later resume the session from the added directory with --continue or --resume.

โœ… WHEN TO USE IT?

Briefly access a second codebase without switching sessions

/add-dir ../shared-lib โ€” look up a utility function from the shared lib while continuing work in the main project

Pull in reference files from a neighboring folder while keeping the prompt cache intact

/add-dir ../design-tokens โ€” make design tokens available as reference for a styling task

โ›” WHEN NOT TO?

Wanting to permanently switch to another project with its own CLAUDE.md

/add-dir does not automatically load the .claude/ configuration of the added directory

Better: use /cd instead โ€” it picks up the target folder's CLAUDE.md and moves the session into its project storage

SOURCES