Skip to content

Commit 95999ca

Browse files
sjnimsclaude
andauthored
docs(command-development): add SlashCommand tool coverage (#56)
## Summary - Add comprehensive documentation for how Claude programmatically invokes slash commands via the SlashCommand tool - Create new reference file covering visibility requirements, character budget, permission rules, and best practices - Update skill description with trigger phrases for discoverability ## Problem Fixes #48 The command-development skill documents the `disable-model-invocation` frontmatter field but doesn't explain its relationship to the SlashCommand tool. Users need to understand: - What the SlashCommand tool is and when Claude uses it - Why commands need `description` for visibility - How the character budget (15,000 default) works - Permission rule patterns for controlling programmatic invocation ## Solution Created `references/slashcommand-tool.md` with complete coverage: 1. **SlashCommand Tool Overview** - What it does and when Claude uses it 2. **Visibility Requirements** - Why `description` field is required 3. **Character Budget** - 15,000 default, `SLASH_COMMAND_TOOL_CHAR_BUDGET` env var 4. **Permission Rules** - Exact match, prefix match, deny patterns 5. **disable-model-invocation Context** - When to use vs permission rules 6. **Integration Patterns** - Commands designed for programmatic vs manual use 7. **Troubleshooting** - Common issues and solutions 8. **Best Practices** - For command authors and users Updated SKILL.md: - Added trigger phrases: "SlashCommand tool", "programmatic command invocation", "disable-model-invocation", "prevent Claude from running command" - Added reference to new file in Additional Resources section ### Alternatives Considered - **Expand frontmatter-reference.md** - Rejected because SlashCommand tool deserves dedicated coverage beyond just frontmatter syntax - **Add to SKILL.md directly** - Rejected to follow progressive disclosure pattern (keep SKILL.md lean) ## Changes - `plugins/plugin-dev/skills/command-development/references/slashcommand-tool.md` - New reference file (~420 lines) - `plugins/plugin-dev/skills/command-development/SKILL.md` - Updated description and Additional Resources ## Testing - [x] markdownlint passes on both files - [x] Progressive disclosure pattern followed (detailed content in references/) - [x] Trigger phrases align with issue requirements --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent bcac5a5 commit 95999ca

2 files changed

Lines changed: 420 additions & 1 deletion

File tree

plugins/plugin-dev/skills/command-development/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: command-development
3-
description: This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
3+
description: This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", "SlashCommand tool", "programmatic command invocation", "disable-model-invocation", "prevent Claude from running command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, programmatic invocation control, or command development best practices for Claude Code.
44
---
55

66
# Command Development for Claude Code
@@ -701,6 +701,7 @@ Commands should validate inputs and resources before processing:
701701
## Additional Resources
702702

703703
For detailed frontmatter field specifications, see `references/frontmatter-reference.md`.
704+
For SlashCommand tool, programmatic invocation, and permission configuration, see `references/slashcommand-tool.md`.
704705
For plugin-specific features and patterns, see `references/plugin-features-reference.md`.
705706
For plugin integration and validation patterns, see `references/plugin-integration.md`.
706707
For interactive user input patterns using AskUserQuestion, see `references/interactive-commands.md`.

0 commit comments

Comments
 (0)