claude-code - 💡(How to fix) Fix [FEATURE] --bare mode needs a way to load project skills without --add-dir [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52283Fetched 2026-04-24 06:11:15
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×5unsubscribed ×1

This came up building a --bare mode launcher script that needs to load:

  1. A project-specific CLAUDE.md (solved via --append-system-prompt-file)
  2. Installed plugin skills like compound-engineering (solved via --plugin-dir ~/.claude/plugins)
  3. Project-scoped skills from .claude/skills/ (no clean solution - --add-dir triggers #52267)

Related: #52267 (--bare --add-dir re-enables global CLAUDE.md discovery)

Root Cause

This came up building a --bare mode launcher script that needs to load:

  1. A project-specific CLAUDE.md (solved via --append-system-prompt-file)
  2. Installed plugin skills like compound-engineering (solved via --plugin-dir ~/.claude/plugins)
  3. Project-scoped skills from .claude/skills/ (no clean solution - --add-dir triggers #52267)

Related: #52267 (--bare --add-dir re-enables global CLAUDE.md discovery)

Fix Action

Fix / Workaround

Current Workaround

Code Example

claude --bare --skill-dir "$PWD/.claude/skills"

---

claude --bare \
  --append-system-prompt-file "$PWD/CLAUDE.md" \
  --plugin-dir "$HOME/.claude/plugins" \
  --plugin-dir "$PWD/.claude"
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single feature request (please file separate requests for different features)
  • I am using the latest version of Claude Code

What Should Happen?

--bare mode should have a mechanism to discover and load project skills from .claude/skills/ directories without re-enabling global ~/.claude/CLAUDE.md discovery.

Currently, --bare mode has:

  • --plugin-dir for loading plugin skills
  • --append-system-prompt-file for loading specific CLAUDE.md files
  • --add-dir for adding directories (but this is broken - see below)

It does not have a way to load project-scoped skills from .claude/skills/. The natural approach - --add-dir "$PWD/.claude" - triggers a bug where global ~/.claude/CLAUDE.md is loaded despite --bare (#52267).

Proposed Solution

Either:

  1. Fix --add-dir so it doesn't re-enable global CLAUDE.md discovery in --bare mode (#52267), which would make --add-dir "$PWD/.claude" work for both CLAUDE.md and skills discovery, or

  2. Add a --skill-dir flag (analogous to --plugin-dir) that points at a directory containing a skills/ subdirectory, or accepts a skills/ directory directly:

    claude --bare --skill-dir "$PWD/.claude/skills"

Current Workaround

--plugin-dir happens to work for project skills if pointed at the parent of a skills/ directory:

claude --bare \
  --append-system-prompt-file "$PWD/CLAUDE.md" \
  --plugin-dir "$HOME/.claude/plugins" \
  --plugin-dir "$PWD/.claude"

The second --plugin-dir discovers $PWD/.claude/skills/ and loads them. This works but is non-obvious - --plugin-dir is semantically for plugins, not project skills.

Context

This came up building a --bare mode launcher script that needs to load:

  1. A project-specific CLAUDE.md (solved via --append-system-prompt-file)
  2. Installed plugin skills like compound-engineering (solved via --plugin-dir ~/.claude/plugins)
  3. Project-scoped skills from .claude/skills/ (no clean solution - --add-dir triggers #52267)

Related: #52267 (--bare --add-dir re-enables global CLAUDE.md discovery)

Claude Code Version

2.1.118

Platform

Amazon Bedrock

Operating System

macOS (Darwin 24.6.0)

extent analysis

TL;DR

The most likely fix is to add a --skill-dir flag to load project-scoped skills from .claude/skills/ directories without re-enabling global discovery.

Guidance

  • Consider using the proposed --skill-dir flag, which would allow loading skills from a specified directory, as a potential solution.
  • Verify that the current workaround using --plugin-dir works for your specific use case, despite being non-obvious.
  • Review the related issue #52267 to understand the root cause of the problem with --add-dir in --bare mode.
  • Test the workaround or proposed solution with your project-specific CLAUDE.md and skills to ensure they are loaded correctly.

Example

claude --bare --skill-dir "$PWD/.claude/skills"

This example illustrates how the proposed --skill-dir flag could be used to load project-scoped skills.

Notes

The provided workaround using --plugin-dir may not be the most intuitive solution, and the proposed --skill-dir flag would provide a more straightforward way to load project-scoped skills.

Recommendation

Apply the workaround using --plugin-dir until the proposed --skill-dir flag is implemented, as it provides a functional solution despite being non-obvious.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] --bare mode needs a way to load project skills without --add-dir [1 participants]