claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Feature Request] Add commands.local or gitignore-compatible private commands

Open Gabbo7474 opened this issue 1 year ago • 3 comments

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

  1. Create a nested commands directory
  2. Add it to .gitignore
  3. Typing /

Wanted Behavior

Having the commands available.

Actual Behavior

Claude does not list the ignored commands

Gabbo7474 avatar Jul 23 '25 11:07 Gabbo7474

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5777
  2. https://github.com/anthropics/claude-code/issues/3059
  3. 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

github-actions[bot] avatar Aug 15 '25 21:08 github-actions[bot]

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

github-actions[bot] avatar Aug 19 '25 09:08 github-actions[bot]

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.

github-actions[bot] avatar Aug 27 '25 14:08 github-actions[bot]