From claude-code-dev
Two SKILL.md documentation patterns - comprehensive executable skill structure vs lightweight reference skill structure
npx claudepluginhub manifoldlogic/claude-code-plugins --plugin claude-code-devThis skill uses the workspace's default tool permissions.
This skill documents the two distinct SKILL.md documentation patterns used in the claude-code-plugins repository. Understanding these patterns is essential when creating new skills, as the structure depends on whether the skill provides executable capabilities or reference documentation.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
This skill documents the two distinct SKILL.md documentation patterns used in the claude-code-plugins repository. Understanding these patterns is essential when creating new skills, as the structure depends on whether the skill provides executable capabilities or reference documentation.
Two patterns:
Used for operational skills with executable scripts. Example: tab-management, pane-management.
Complete structure:
---
name: skill-name
description: Brief description of skill capabilities
---
# Skill Title
**Last Updated:** YYYY-MM-DD
**Plugin:** plugin-name
**Scripts Location:** `plugins/{plugin}/skills/{skill}/scripts/`
## Overview
[1-2 paragraphs explaining what the skill does and why it exists]
**Key Capabilities:**
- Bullet list of main features
- What operations are supported
- Integration points
**When to Use This Skill vs Manual Operations:**
| Use This Skill | Use Manual Operations |
|----------------|----------------------|
| Automation scenarios | One-off manual tasks |
| Scripting workflows | Exploratory testing |
## Prerequisites
### Required for All Modes
- List of required tools
- Installation instructions
- System requirements
### [Optional: Context-Specific Requirements]
- Additional requirements for specific execution contexts
## Skills Overview
| Script | Purpose | Key Options |
|--------|---------|-------------|
| script-name.sh | What it does | Main flags |
## Decision Tree
Guidance on choosing between different operations:
Start | +-- Scenario A? --> Use script-one.sh | +-- Scenario B? --> Use script-two.sh
## Common Scenarios
### Scenario 1: [Use Case Title]
**When:** Describe when to use this
**Example:**
```bash
./script.sh --option value
Expected Output:
Example output here
[Repeat for 3-5 common scenarios]
Purpose: What the script does
Usage:
script-name.sh [OPTIONS] [ARGS]
Options:
| Flag | Description | Default | Required |
|---|---|---|---|
| -f | Flag description | value | Yes/No |
Examples:
# Example 1: Basic usage
./script.sh --basic
# Example 2: Advanced usage
./script.sh --advanced --with-options
[Repeat Script Reference section for each script]
| Code | Meaning | When It Occurs |
|---|---|---|
| 0 | Success | Operation completed |
| 1 | Error type 1 | Specific condition |
| 2 | Error type 2 | Specific condition |
Symptoms: What users see
Cause: Why it happens
Solution:
# Commands to fix
[Repeat for 5-7 common issues]
How this skill integrates with:
**Real example:** See `plugins/iterm/skills/tab-management/SKILL.md` (779 lines)
**Section count:** 12+ sections for comprehensive documentation
---
### Pattern 2: Reference Skill Structure
Used for documentation-only pattern skills. Example: `iterm-applescript-generation`, `eleven-category-test-structure`.
**Complete structure:**
```markdown
---
name: skill-name
description: One-line description under 200 characters
origin: TICKET_ID
created: YYYY-MM-DD
tags: [tag1, tag2, tag3]
---
# Skill Title
## Overview
[2-3 paragraphs explaining what pattern/convention this documents and why it's important]
This pattern ensures [benefit 1], [benefit 2], and [benefit 3].
## When to Use
Apply this pattern when:
- Creating/modifying [context 1]
- Building [context 2]
- Implementing [context 3]
- [4-6 specific triggers]
## Pattern/Procedure
### Core Structure
[Description of the pattern with code examples]
```language
# Example of the pattern
code here
[Detailed explanation with examples]
# Component example
Why: Rationale for this component
When to use: When this component is needed
When to skip: When it's not needed
[Repeat for 3-5 key components]
Context: When this example applies
Implementation:
# Complete example code
Key points:
[Repeat for 2-4 examples from real code]
path/to/file.ext (where pattern is used)path/to/another.ext (another example)
**Real examples:**
- `plugins/iterm/skills/iterm-applescript-generation/SKILL.md` (302 lines)
- `plugins/iterm/skills/iterm-cross-skill-sourcing/SKILL.md` (139 lines)
- `plugins/iterm/skills/eleven-category-test-structure/SKILL.md` (436 lines)
**Section count:** 5 sections (Overview, When to Use, Pattern/Procedure, Examples, References)
## Examples
### Example 1: Executable Skill (pane-management from ISKIM.1003)
**Context:** Documenting the iterm-split-pane.sh script
**SKILL.md frontmatter:**
```yaml
---
name: pane-management
description: iTerm2 pane splitting for opening new panes within existing tabs from macOS host or Linux container environments.
---
Structure used:
Total: 515 lines, 11 major sections
Why this pattern: The skill provides an executable script with options, exit codes, and operational concerns requiring comprehensive documentation.
Context: Documenting AppleScript generation pattern for iTerm scripts
SKILL.md frontmatter:
---
name: iterm-applescript-generation
description: Pattern for generating iTerm2 AppleScript with window checks, dual tell blocks, and conditional configuration
origin: PANE-001
created: 2026-02-08
tags: [iterm, applescript, code-generation]
---
Structure used:
Total: 302 lines, 5 major sections
Why this pattern: The skill documents a code pattern, not an executable script. It guides developers/agents in writing consistent AppleScript, making the lightweight reference structure appropriate.
Creating a new skill?
|
+-- Does it include executable scripts?
| |
| YES -> Use Executable Skill Pattern
| - 12+ sections
| - Include: Script Reference, Exit Codes, Troubleshooting, Performance
| - Examples: tab-management, pane-management
|
+-- Is it documentation/pattern/convention?
|
YES -> Use Reference Skill Pattern
- 5 sections
- Focus on: Pattern/Procedure, Examples
- Examples: applescript-generation, test-structure
Problem: Documentation-only skill has Script Reference, Exit Codes, Troubleshooting sections
Why it's wrong: No scripts to document, these sections are empty or irrelevant
Fix: Use reference skill pattern with 5 sections focused on the pattern itself
Problem: Skill with scripts lacks exit codes, troubleshooting, or options documentation
Why it's wrong: Users can't effectively use the scripts without this operational information
Fix: Use executable skill pattern with comprehensive sections
Problem: Skills in same plugin use different structures arbitrarily
Why it's wrong: Makes navigation unpredictable, harder to find information
Fix: Apply patterns based on skill type (executable vs reference), not personal preference
Problem: Reference skill lacks origin/created/tags, or executable skill lacks description
Why it's wrong: Breaks skill discovery and metadata tracking
Fix:
plugins/iterm/skills/tab-management/SKILL.md (executable pattern, 779 lines)plugins/iterm/skills/pane-management/SKILL.md (executable pattern, 515 lines)plugins/iterm/skills/iterm-applescript-generation/SKILL.md (reference pattern, 302 lines)plugins/iterm/skills/iterm-cross-skill-sourcing/SKILL.md (reference pattern, 139 lines)plugins/iterm/skills/eleven-category-test-structure/SKILL.md (reference pattern, 436 lines)