Discover project commands/skills from additional working directories (--add-dir)
Resolved 💬 1 comment Opened Apr 21, 2026 by dahla1973 Closed May 27, 2026
Problem
Claude Code only scans the primary CWD's .claude/commands/ and .claude/skills/ for slash commands and skills. Any .claude/ directory inside a path added via --add-dir (or the IDE extension's "additional working directories") is ignored.
Repro
- Launch Claude Code with primary CWD =
projectA, andprojectBadded as an additional working directory. projectB/.claude/commands/foo.mdexists and is valid./foodoes not appear in the slash-command list and cannot be invoked.
Expected
/foo is discovered and available, optionally namespaced (e.g. /projectB:foo) to avoid collisions across added directories.
Why this matters
Multi-repo workspaces are common — e.g. a backend repo plus a separate frontend repo that together make up one product. Today the only workarounds are all bad:
- Relaunch with a different primary CWD (loses context on the other repo).
- Duplicate commands into
~/.claude/(loses per-project versioning and git-sync across machines). - Copy the command file into the primary project (lives in the wrong repo, drifts from its source).
If a directory was intentionally added to the workspace, its project-scoped commands/skills should come with it.
Environment
- Claude Code VSCode extension on Windows 11
- Model: Opus 4.7
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗