[Feature Request] Add commands.local or gitignore-compatible private commands
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: Max Plan
- Claude CLI version: 1.0.58 (Claude Code)
- Operating System: Windows 11, WSL2, Ubuntu 24.04.2 LTS
- Terminal: Warp
Bug Description
I believe Project commands are version-controlled and shared with the team through git, while personal commands exist at the environment root level and aren't tracked. However, there's a middle ground I'm trying to achieve - commands that I want available for a specific project but don't want to share publicly with the team.
I attempted to solve this by placing commands in .claude/commands/somedir within the project and adding somedir to .gitignore, but this approach prevents Claude from detecting them entirely. It would be valuable to have either a commands.local feature or the ability to gitignore command directories while still making them accessible to Claude.
The key issue is needing project-specific commands that remain private to individual developers rather than being shared across the entire team.
Steps to Reproduce
- Create a nested commands directory
- Add it to .gitignore
- Typing /
Wanted Behavior
Having the commands available.
Actual Behavior
Claude does not list the ignored commands
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5777
- https://github.com/anthropics/claude-code/issues/3059
- https://github.com/anthropics/claude-code/issues/5105
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been automatically closed as a duplicate of #5777.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.