[FEATURE] Support subcommand autocomplete for custom slash commands
Feature Request
Problem
Custom slash commands (skills) registered via .claude/commands/ or skill files only support top-level autocomplete in the / menu. There is no way to register subcommands or show contextual suggestions after the user selects a slash command.
For example, I have a tool called LIAM that registers /liam as a skill. It has subcommands like review, pr create, commit-push, feedback, init, doctor, etc. When a user types /liam , they get no suggestions for available subcommands. They have to know the commands or type /liam help first.
Desired Behaviour
After selecting a slash command from the / menu, show a second-level autocomplete with registered subcommands:
/liam <- selects the skill
/liam r <- shows: review, (filtered list)
/liam review <- selects the subcommand, cursor moves to args
Suggested Approach
Allow skills to declare subcommands in frontmatter:
---
name: liam
description: Layered Intelligent Agent Management
argument-hint: "[command] [args...]"
subcommands:
- name: review
description: Code review via specialist reviewer swarm
argument-hint: "[PR number|URL|--diff file]"
- name: pr create
description: Create PR with validation and Jira integration
- name: pr update
description: Update existing PR description
- name: feedback
description: Address unaddressed PR review comments
argument-hint: "[PR number]"
- name: implement
description: Implement feature from task source
argument-hint: "[ticket|URL|description]"
- name: commit-push
description: AI commit message, stage, commit, and push
argument-hint: "[-y] [-a]"
- name: init
description: Set up project context or credentials
- name: doctor
description: Run health diagnostics
- name: help
description: Show available commands
---
Why This Matters
- Discoverability: Users shouldn't need to memorise subcommands or type
helpto find them - Consistency: The
ghCLI,git, and other tools with subcommands all support tab completion. Slash commands in Claude Code should too - Ecosystem growth: As the skill/command ecosystem matures, tools will naturally develop subcommand hierarchies. Supporting this early avoids fragmentation (registering
/liam-review,/liam-pr,/liam-commitas separate skills)
Current Workarounds
- Single skill with internal routing and
/liam helpfor discovery (what I use now) - Register each subcommand as a separate skill (
/liam-review,/liam-pr-create), which bloats the/menu and loses the namespace
Neither is ideal.
Environment
- Claude Code CLI
- macOS / Linux
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗