[FEATURE] Allow loading skills from custom directory in --bare mode
Resolved 💬 2 comments Opened Mar 21, 2026 by chriscoey Closed Apr 18, 2026
When running claude -p in --bare mode for programmatic/eval use cases, skills are completely disabled. Without --bare, personal config (hooks, MCP servers, global CLAUDE.md, memory) leaks into the session.
There is no way to get:
- Config isolation (no personal hooks/MCP/memory)
- Custom skills loaded from a specified directory
- In non-interactive
-pmode
Use case
Running LLM eval experiments where the user agent needs:
- A clean environment (no personal config influencing behavior)
- Specific skills installed (to measure skill effectiveness)
- Non-interactive execution via
-p
Proposed solution
A flag like --skills-dir /path/to/skills that works with --bare.
Or: --bare could respect $HOME/.claude/skills/ from an overridden
HOME (currently it does not — Claude Code reads config from the real
user home at process startup, ignoring HOME override).
Current workarounds
--bare+--add-dirloads CLAUDE.md but not skillsapiKeyHelpervia--settingsenables non-bare auth, but the full
personal config still loads (hooks, MCP, all skills, global CLAUDE.md)
- HOME override only affects subprocess env, not Claude Code's own
config resolution
Related issues
- #25771 (programmatic skill deployment)
- #30278 (scoped skill discovery per subagent)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗