[BUG] additionalDirectories in settings.json does not trigger discoverability of skill
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
note: these reported issues appear to be related
- Added support for loading
CLAUDE.mdfiles from additional directories specified via--add-dirflag (requires settingCLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1)
-Skills defined in .claude/skills/ within additional directories (--add-dir) are now loaded automatically.
Issue:
additionalDirectories configured in ~/.claude/settings.json under the permissions block does not trigger skill discovery. Skills stored in the specified directories are not discoverable via slash commands when Claude is launched normally.
What Should Happen?
Skills located in .claude/skills/ folders within directories listed under additionalDirectories should be discovered and available as slash commands, identical to the behavior when the same paths are passed via --add-dir at launch.
for example invoking claude like this allows skills in those directories to be discovered as /commands:
claude --add-dir "$PWD\role\dev" --add-dir "$PWD\role\qe"
Error Messages/Logs
No error messages are shown. Skills simply do not appear. Running /status inside the session shows no indication that the additional directories failed to load.
Steps to Reproduce
Add the following to ~/.claude/settings.json:
json{
"permissions": {
"additionalDirectories": [
"C:\\Users\\khurst\\git\\prototypeAutoDiscovery\\role\\dev",
"C:\\Users\\khurst\\git\\prototypeAutoDiscovery\\role\\qe"
]
}
}
Ensure each path contains a .claude/skills/ directory with a valid SKILL.md
Launch Claude normally by typing claude
Attempt to invoke a skill via slash command — it is not discovered
Exit and relaunch using claude --add-dir "C:\Users\khurst\git\prototypeAutoDiscovery\role\dev" --add-dir "C:\Users\khurst\git\prototypeAutoDiscovery\role\qe"
Same skill is now discoverable via slash command
example directory structure
C:\Users\khurst\git\prototypeAutoDiscovery\
├── .claude\
│ ├── commands\
│ ├── skills\
│ └── settings.json
├── role\
│ ├── dev\
│ │ └── .claude\
│ │ ├── commands\
│ │ └── skills\
│ │ └── code-reviewer4\
│ │ └── SKILL.md
│ └── qe\
│ └── .claude\
│ ├── commands\
│ └── skills\
│ └── qe-code-reviewer1\
│ └── SKILL.md
└── src\
└── Main.java
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.91
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
IntelliJ IDEA terminal
Additional Information
at its core, I should be able to structure discoverable skills within a directory structure that I define and point claude to where those skills are so that the skills function as if they were in the anthropic default location. my understanding is that add-dir handles this when put into either the users porject --> settings.json or global --> settings.json and niether one worked for me
here is an example when invoked at startup
PS C:\Users\khurst\git\prototypeAutoDiscovery> claude --add-dir "$PWD\role\dev" --add-dir "$PWD\role\qe"
▐▛███▜▌ Claude Code v2.1.91
▝▜█████▛▘ Opus 4.6 (1M context) with high effort · Claude Team
▘▘ ▝▝ ~\git\prototypeAutoDiscovery
↑ Install the PyCharm plugin from the JetBrains Marketplace: https://docs.claude.com/s/claude-code-jetbrains
❯ /qe
─────────────────────────────────────────────────────────────────────────────────────────────
skills show up, they are discoverable
/qe-code-review2 Perform comprehensive, framework-aware code review of test automation changes (API/UI/E2E). Analyzes project type (Spring Boot, Cypress, Legacy Java, etc.) and applies appropriate best practices. Out…
/qe-code-review4 Perform comprehensive, framework-aware code review of test automation changes (API/UI/E2E). Analyzes project type (Spring Boot, Cypress, Legacy Java, etc.) and applies appropriate best practices. Out…
when I embed this into project--> settings.json. it does not work
{
"permissions": {
"additionalDirectories": [
"C:\\Users\\<user>\\git\\prototypeAutoDiscovery\\role\\dev",
"C:\\Users\\<user>\\git\\prototypeAutoDiscovery\\role\\qe"
]
}
}
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗