Skip to content

Commit 4ac34c2

Browse files
sjnimsclaude
andauthored
docs: clarify commands and skills use same Skill tool mechanism (#201)
## Description Update documentation to reflect Anthropic's conceptual merge of slash commands and skills. Both are now invoked via the same **Skill tool** but differ in complexity level: - **Commands** (`commands/`): Simple `.md` files for quick prompts - **Skills** (`skills/name/`): Full directories with bundled resources (scripts, references, examples) Thanks to @KRRT7 for opening the issue! ## Type of Change - [x] Documentation update (improvements to README, CLAUDE.md, or component docs) ## Component(s) Affected - [x] Skills (methodology and best practices) - [x] Documentation (README.md, CLAUDE.md, SECURITY.md) ## Motivation and Context Anthropic has merged the concepts of slash commands and skills at the mechanism level—both are now invoked via the Skill tool. This PR updates plugin-dev documentation to clearly explain this relationship while maintaining the organizational distinction (commands = simple, skills = complex with resources). Fixes #198 ## How Has This Been Tested? **Test Configuration**: - Claude Code version: Latest - GitHub CLI version: 2.67.0 - OS: macOS Darwin 25.2.0 **Test Steps**: 1. Ran `markdownlint 'plugins/plugin-dev/**/*.md' --ignore node_modules` - passes 2. Ran `npx prettier --write` on modified files 3. Verified all modified files render correctly ## Checklist ### General - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings or errors ### Documentation - [x] I have updated the documentation accordingly (README.md, CLAUDE.md, or component docs) - [x] I have verified all links work correctly ### Markdown - [x] I have run `markdownlint` and fixed all issues - [x] My markdown follows the repository style (ATX headers, dash lists, fenced code blocks) ### Version Management (if applicable) - [x] I have updated CHANGELOG.md with relevant changes ## Files Changed | File | Change | |------|--------| | `skills/command-development/SKILL.md` | Added "Commands and Skills: Same Mechanism, Different Complexity" section | | `skills/skill-development/SKILL.md` | Added "Skills and Commands: Unified Mechanism" section | | `skills/plugin-structure/SKILL.md` | Updated Commands and Skills component descriptions | | `skills/plugin-dev-guide/SKILL.md` | Updated quick reference table and decision tree | | `skills/command-development/references/skill-tool.md` | Added key insight note | | `skills/skill-development/references/commands-vs-skills.md` | **NEW** - Decision matrix and migration guide | | `CHANGELOG.md` | Added entries under [Unreleased] | ## Additional Notes The approach keeps commands and skills as separate concepts from an organizational standpoint while making clear they share the same invocation mechanism. This aligns with how plugin developers should think about the choice: complexity needs drive whether to use a simple command or a full skill with resources. 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f9492b1 commit 4ac34c2

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. See the `skill-development` skill for guidance.
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 (frontmatter fields like `description`, `allowed-tools`, `model` work identically)
37+
3. Add `references/` for detailed docs
38+
4. Add `scripts/` for utilities
39+
5. Delete original command file

0 commit comments

Comments
 (0)