Feature: Allow excluding/disabling built-in commands via settings.json

Resolved 💬 2 comments Opened Mar 7, 2026 by YevheniiVolosiuk Closed Mar 7, 2026

Summary

Add the ability to exclude or disable built-in slash commands through settings.json configuration, allowing projects to fully customize their command surface.

Problem

Currently, Claude Code has built-in slash commands (e.g., /commit, /review, /bug) that are always available. Projects with established custom workflows (like ours with /workflow:commit, /workflow:issue, etc.) may want to:

  1. Prevent confusion - Team members might accidentally use /commit instead of the project-specific /workflow:commit
  2. Enforce workflow consistency - Ensure everyone uses the same standardized commands
  3. Simplify command discovery - Reduce noise when listing available commands

Proposed Solution

Add a disabledCommands or excludeCommands setting in settings.json:

{
  "excludeCommands": [
    "commit",
    "review",
    "bug"
  ]
}

Alternatively, an allowlist approach:

{
  "commands": {
    "mode": "allowlist",
    "allowed": ["help", "clear", "compact", "config"]
  }
}

Use Cases

  1. Custom workflow systems - Projects with sophisticated workflows (e.g., /workflow:issue, /workflow:commit, /workflow:review) can hide overlapping built-ins
  2. Team onboarding - Reduce cognitive load for new team members by showing only relevant commands
  3. Enterprise environments - Enforce specific command usage patterns

Alternative Considered

Currently, the only workaround is to create custom commands that shadow built-in names. However:

  • This doesn't truly disable the built-in behavior
  • Adds maintenance overhead
  • Doesn't prevent direct invocation

Impact

  • Low risk - Opt-in feature, default behavior unchanged
  • High value - Enables fully customized CLI experiences for sophisticated teams

Related

N/A

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗