command-development
Commands vs Skills - choosing between commands/ and skills/ for slash commands
What this skill does
# Commands vs Skills
Guide to choosing between `commands/` (flat files) and `skills/` (folders) for creating slash commands.
## When to Use
Activate when:
- User asks "commands or skills?"
- Discussing command structure
- Migrating from commands to skills
- Questions about slash command creation
## Commands and Skills are Equivalent
Both create slash commands that users invoke with `/plugin:name`:
| Aspect | Commands | Skills |
| :------------ | :------------------------------- | :---------------------------------------- |
| **Location** | `commands/name.md` | `skills/name/SKILL.md` |
| **Invocation**| `/plugin:name` | `/plugin:name` |
| **Features** | Basic frontmatter, arguments | Advanced frontmatter, supporting files |
| **Use case** | Simple, single-file commands | Complex workflows, need supporting files |
| **Status** | Works, backward compatible | **Preferred** for new development |
## When to Use Each
**Use Skills** (`skills/name/SKILL.md`):
- **Preferred** for all new development
- Need supporting files (templates, examples, scripts)
- Want `user-invocable: false` for background skills
- Want `disable-model-invocation: true` for manual-only skills
- Complex workflows needing organization
**Use Commands** (`commands/name.md`):
- Maintaining existing commands
- Prefer flat file structure
- Very simple single-purpose commands
- Backward compatibility needed
## Command Structure
### File Location
```
plugin-name/
└── commands/
├── command1.md
├── command2.md
└── subcommand/
└── action.md # For /plugin:subcommand:action
```
### Command Naming
**Plugin auto-prefixes command names**:
**File**: `commands/start.md`
**Plugin**: `workflow`
**Invoked as**: `/workflow:start`
**CRITICAL**: Don't duplicate prefix!
- ✓ File: `start.md` → `/workflow:start`
- ✗ File: `workflow:start.md` → `/workflow:workflow:start`
### Basic Command Format
```yaml
---
name: command-name
description: Brief description of what command does
usage: |
/plugin:command <required-arg> [optional-arg] --flag value
examples:
- /plugin:command example1
- /plugin:command example2 --verbose
---
# Command Name
Detailed description of command purpose and behavior.
## Arguments
### Required
- `arg1` - Description of required argument
### Optional
- `arg2` - Description of optional argument (default: value)
### Flags
- `--flag` - Description of flag
## Process
1. Step one
2. Step two
3. Step three
## Examples
### Example 1: Basic Usage
```bash
/plugin:command basic-example
```
What happens:
- [Explain the outcome]
### Example 2: Advanced Usage
```bash
/plugin:command complex-example --flag value
```
What happens:
- [Explain the outcome]
## Integration
- Works with: [Related plugins/commands]
- Requires: [Dependencies if any]
```
## YAML Frontmatter
### Required Fields
```yaml
---
name: command-name # Must match filename
description: Brief desc # Shows in help text
---
```
### Full Frontmatter
```yaml
---
name: command-name
description: One-line description for command listing
usage: |
/plugin:command <required> [optional] --flag value
/plugin:command --help
examples:
- /plugin:command example1
- /plugin:command example2 --verbose
- /plugin:command --interactive
aliases:
- shortname
- alternate-name
---
```
## Argument Patterns
### Positional Arguments
```yaml
---
usage: |
/plugin:create <plugin-name> [directory]
---
# Create Command
## Arguments
- `plugin-name` (required) - Name of plugin to create
- `directory` (optional) - Target directory (default: ./plugins)
## Examples
```bash
/plugin:create my-plugin
/plugin:create my-plugin ./custom-dir
```
```
### Flags and Options
```yaml
---
usage: |
/plugin:validate [path] --strict --format <json|text>
---
# Validate Command
## Flags
- `--strict` - Enable strict validation mode
- `--format <format>` - Output format: json or text (default: text)
## Examples
```bash
/plugin:validate # Current directory, text format
/plugin:validate --strict # Strict mode
/plugin:validate --format json # JSON output
/plugin:validate ./my-plugin --strict --format json
```
```
### Subcommands
```yaml
---
usage: |
/plugin:add skill <name>
/plugin:add command <name>
/plugin:add agent <name>
/plugin:add hook <event>
---
# Add Command
Adds a component to existing plugin.
## Subcommands
### skill
Add a new skill to the plugin.
```bash
/plugin:add skill my-skill
```
### command
Add a new command to the plugin.
```bash
/plugin:add command my-command
```
### agent
Add a new agent to the plugin.
```bash
/plugin:add agent my-agent
```
### hook
Add an event hook to the plugin.
```bash
/plugin:add hook PreToolUse
```
```
## Command Patterns
### Simple Action Command
**Purpose**: Single, straightforward action
```yaml
---
name: build
description: Build the project
usage: /plugin:build [--watch]
examples:
- /plugin:build
- /plugin:build --watch
---
# Build Command
Compiles the project.
## Process
1. Clean output directory
2. Compile source files
3. Copy assets
4. Generate build report
## Flags
- `--watch` - Watch mode for development
```
### Interactive Workflow Command
**Purpose**: Multi-step guided process
```yaml
---
name: init
description: Initialize new project interactively
usage: /plugin:init [project-name]
examples:
- /plugin:init
- /plugin:init my-project
---
# Init Command
Interactive project initialization.
## Process
1. **Prompt for project details**:
- Project name (if not provided)
- Description
- License type
- Dependencies
2. **Create structure**:
- Generate directory layout
- Create configuration files
- Install dependencies
3. **Verify**:
- Run validation
- Show summary
```
### Multi-Action Command
**Purpose**: Multiple related actions in one command
```yaml
---
name: task
description: Manage tasks
usage: |
/plugin:task create <title>
/plugin:task list [--status pending|done]
/plugin:task complete <id>
/plugin:task delete <id>
examples:
- /plugin:task create "Implement feature"
- /plugin:task list
- /plugin:task list --status pending
- /plugin:task complete 1
---
# Task Command
Complete task management.
## Subcommands
### create
Create a new task.
### list
List all tasks, optionally filtered by status.
### complete
Mark a task as completed.
### delete
Delete a task.
```
### Delegating Command
**Purpose**: Routes to skills or agents
```yaml
---
name: start
description: Start workflow with auto-detection
usage: |
/plugin:start <description>
/plugin:start <description> --mode <auto|spec|plan|simple>
examples:
- /plugin:start "Implement user authentication"
- /plugin:start "Fix login bug" --mode simple
---
# Start Command
Initiates workflow with complexity detection.
## Process
1. **Analyze request**:
- Parse description
- Detect complexity
- Identify project context
2. **Route to appropriate workflow**:
- Complex → Spec + Validation
- Medium → Spec + TDD
- Simple → Simple Planning
3. **Hand off to skill/agent**:
- Invoke appropriate skill
- Or launch specialized agent
```
## Using AskUserQuestion
Commands can ask interactive questions:
```markdown
## Process
1. **Gather plugin details**:
Use AskUserQuestion to ask:
- Plugin name
- Description
- Components to include (commands, skills, agents, hooks)
- Author name
2. **Create structure**:
Based on user responses, generate plugin files
3. **Confirm**:
Show what was created
```
Example in command:
```markdown
Ask user to choose components:
- [ ] Commands - User-invoked actions
- [ ] Skills - Guidance and workflows
- [ ] Agents - Autonomous workers
- [ ] Hooks - Event handlers
Then create the selected components.
```
## Integration Patterns
##Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.