promptgarten 🌱

Command reference Β· Cursor CLI

/add-dir

Adds another directory to a multi-root session at runtime.

/add-dir adds an extra directory to the running session to work across multiple repos at once. Slash skills and custom commands from the new directory refresh immediately; a restart is only needed for the agent to auto-discover new skills. Documented in the official changelog, not (yet) listed in the command reference table.

πŸ”„ THE SAME TASK (β€œADD FILE/FOLDER TO CONTEXT”) ON OTHER PLATFORMS

Compare all 28 tasks β†’

βœ… WHEN TO USE IT?

Pull in a second, related repo to the running session

/add-dir ../shared-lib β€” to coordinate changes across both repos at once

Reuse the directory combination later

/add-dir ../shared-lib β€” then save it as a set with /save-workspace

β›” WHEN NOT TO?

The multi-root combination is already known before starting

Adding it later mid-session is then an unnecessary extra step.

Better: Use --add-dir <path> at startup (repeatable, combinable with --workspace)

Working on just a single directory

An extra root directory grows the context the agent has to track.

Better: Skip /add-dir and stick to one workspace

SOURCES

MORE COMMANDS Β· Cursor CLI

/save-workspace/load-workspace/auto-review/context/full-conversation/btw/skills/rules/commands/changesagent [prompt...]agent login

All commands Β· Cursor CLI β†’

Share:𝕏inπŸ’¬