Skip to content

Commit aae2ff9

Browse files
sjnimsclaude
andcommitted
docs: clarify commands and skills use same Skill tool mechanism
Update documentation to reflect Anthropic's conceptual merge of slash commands and skills. Both are now invoked via the Skill tool but differ in complexity level: - Commands: Simple .md files in commands/ for quick prompts - Skills: Full directories in skills/ with bundled resources Changes: - Add "Commands and Skills: Same Mechanism" section to command-development - Add "Skills and Commands: Unified Mechanism" section to skill-development - Update plugin-structure component descriptions - Update plugin-dev-guide quick reference and decision tree - Add key insight note to skill-tool.md reference - Create new commands-vs-skills.md reference with decision matrix Fixes #198 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f9492b1 commit aae2ff9

7 files changed

Lines changed: 84 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **Update documentation for commands/skills merge** - Clarified that commands and skills use the same Skill tool mechanism but differ in complexity (fixes #198)
13+
14+
### Added
15+
16+
- **New reference: commands-vs-skills.md** - Explains when to use commands vs skills and migration path
17+
1018
## [0.3.2] - 2026-01-24
1119

1220
### Fixed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,24 @@ You'll receive a report with vulnerability details.
5555

5656
The first example tells Claude what to do. The second tells the user what will happen but doesn't instruct Claude. Always use the first approach.
5757

58+
### Commands and Skills: Same Mechanism, Different Complexity
59+
60+
Commands and skills are both invoked via the same **Skill tool**. The difference is organizational complexity:
61+
62+
| Aspect | Commands | Skills |
63+
| --------- | ------------------------------- | --------------------------------- |
64+
| Location | `commands/` | `skills/name/` |
65+
| Format | Single `.md` file | `SKILL.md` + optional resources |
66+
| Resources | None | scripts/, references/, examples/ |
67+
| Best for | Quick prompts, simple workflows | Complex knowledge, bundled assets |
68+
69+
**Invocation control** (works for both):
70+
71+
- `disable-model-invocation: true` → User-only (for side effects: deploy, commit)
72+
- Default → Both Claude and user can invoke
73+
74+
**When to graduate a command to a skill**: If you need scripts, reference files, or progressive disclosure, convert the command to a skill.
75+
5876
### Command Locations
5977

6078
**Project commands** (shared with team):

plugins/plugin-dev/skills/command-development/references/skill-tool.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ How Claude programmatically invokes slash commands and skills during conversatio
66

77
The Skill tool enables Claude to programmatically execute both slash commands and Agent Skills without user typing. This allows Claude to autonomously invoke these capabilities as part of complex workflows, chain them together, or use them in response to user requests.
88

9+
> **Key Insight:** Commands and skills are the same mechanism. Both are invoked via the Skill tool. Commands are simple (single `.md` file); skills are complex (directory with bundled resources).
10+
>
911
> **Note:** In earlier versions of Claude Code, slash command invocation was provided by a separate `SlashCommand` tool. This has been merged into the `Skill` tool.
1012
1113
**Key concepts:**

plugins/plugin-dev/skills/plugin-dev-guide/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ The plugin-dev toolkit provides 9 specialized skills for building Claude Code pl
1616
| Skill | Purpose |
1717
| ------------------------- | -------------------------------------------------- |
1818
| **plugin-structure** | Directory layout, manifest, component organization |
19-
| **command-development** | Slash commands with frontmatter |
19+
| **command-development** | Simple prompts (single .md files in commands/) |
2020
| **agent-development** | Autonomous subagents |
21-
| **skill-development** | Creating skills with progressive disclosure |
21+
| **skill-development** | Complex prompts with bundled resources (skills/) |
2222
| **hook-development** | Event-driven automation |
2323
| **mcp-integration** | Model Context Protocol servers |
2424
| **lsp-integration** | Language Server Protocol for code intelligence |
@@ -140,9 +140,9 @@ Use when the user needs to:
140140
```
141141
User wants to...
142142
├── Create/organize a plugin structure? → plugin-structure
143-
├── Add a slash command? → command-development
143+
├── Add a simple slash command (no bundled resources)? → command-development
144144
├── Create an autonomous agent? → agent-development
145-
├── Add domain expertise/knowledge? → skill-development
145+
├── Add a complex skill with scripts/references? → skill-development
146146
├── React to Claude Code events? → hook-development
147147
├── Integrate external service/API? → mcp-integration
148148
├── Add code intelligence/LSP? → lsp-integration

plugins/plugin-dev/skills/plugin-structure/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ Specify custom paths for components (supplements default directories):
115115
**Format**: Markdown files with YAML frontmatter
116116
**Auto-discovery**: All `.md` files in `commands/` load automatically
117117

118+
Simple, user-invocable prompts stored as single `.md` files. Use when you don't need bundled resources. Both commands and skills are invoked via the Skill tool—commands are essentially simple skills.
119+
118120
**Example structure**:
119121

120122
```
@@ -173,6 +175,8 @@ Detailed agent instructions and knowledge...
173175
**Format**: Each skill in its own directory with `SKILL.md` file
174176
**Auto-discovery**: All `SKILL.md` files in skill subdirectories load automatically
175177

178+
Complex prompts with bundled resources (scripts, references, examples). Use when you need progressive disclosure or supporting files. Both skills and commands are invoked via the Skill tool.
179+
176180
**Example structure**:
177181

178182
```

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ specialized knowledge, workflows, and tools. Think of them as "onboarding guides
1414
domains or tasks—they transform Claude from a general-purpose agent into a specialized agent
1515
equipped with procedural knowledge that no model can fully possess.
1616

17+
### Skills and Commands: Unified Mechanism
18+
19+
Skills and commands share the same underlying mechanism (Skill tool). The choice depends on complexity needs:
20+
21+
- **Use commands** (`commands/foo.md`): Simple prompts without bundled resources
22+
- **Use skills** (`skills/foo/SKILL.md`): Complex workflows needing scripts, references, or examples
23+
24+
Both support `$ARGUMENTS`, `[BANG]` bash execution, and frontmatter fields. Skills add bundled resources and progressive disclosure.
25+
1726
### What Skills Provide
1827

1928
1. Specialized workflows - Multi-step procedures for specific domains
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Commands vs Skills: When to Use Each
2+
3+
## Same Mechanism, Different Complexity
4+
5+
Both commands and skills:
6+
7+
- Are invoked via the Skill tool
8+
- Support $ARGUMENTS and `[BANG]` bash execution
9+
- Support frontmatter (description, allowed-tools, model)
10+
- Can control invocability (disable-model-invocation)
11+
12+
## Decision Matrix
13+
14+
| Need | Use | Location |
15+
| ----------------------- | ------- | ---------------------- |
16+
| Simple reusable prompt | Command | commands/foo.md |
17+
| Dynamic arguments only | Command | commands/foo.md |
18+
| Scripts for validation | Skill | skills/foo/ |
19+
| Reference documentation | Skill | skills/foo/references/ |
20+
| Working examples | Skill | skills/foo/examples/ |
21+
| Progressive disclosure | Skill | skills/foo/ |
22+
23+
## Invocation Control
24+
25+
| Setting | User (/) | Claude (Skill tool) |
26+
| ----------------------------------- | -------- | ------------------- |
27+
| Default | Yes | Yes |
28+
| disable-model-invocation: true | Yes | No |
29+
| user-invocable: false (skills only) | No | Yes |
30+
31+
## Migration: Command to Skill
32+
33+
When a command grows complex:
34+
35+
1. Create `skills/name/SKILL.md`
36+
2. Move command content to SKILL.md body
37+
3. Add `references/` for detailed docs
38+
4. Add `scripts/` for utilities
39+
5. Delete original command file

0 commit comments

Comments
 (0)