feat: Enhance claude-skills module with new templates, improved script, and detailed documentation

This commit is contained in:
tukuaiai 2025-12-14 08:29:55 +08:00
parent 8830a20cc5
commit 4c5ff9901e
5 changed files with 641 additions and 401 deletions

View File

@ -1,22 +1,108 @@
--- ---
name: claude-skills name: claude-skills
description: Meta-skill for creating Claude Skills. Use this to generate, structure, and optimize Skills that teach Claude domain-specific expertise from any source material. description: Meta-skill for creating, optimizing, and managing Claude Skills. Use when building new skills from documentation, converting domain expertise into AI capabilities, structuring skill files, or learning skill development best practices. This is the foundational skill that generates other skills.
--- ---
# Claude Skills Meta-Skill # Claude Skills Meta-Skill
> **Meta-skill**: A skill that creates other skills. The core tool for building new Claude capabilities. The definitive guide to creating production-grade Claude Skills. This meta-skill teaches Claude how to transform any domain knowledge into structured, reusable AI capabilities.
## Overview
Skills are folders containing instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks. This skill teaches you how to create, use, and optimize Skills.
## When to Use This Skill ## When to Use This Skill
This skill should be triggered when:
- Creating a new Claude Skill from scratch - Creating a new Claude Skill from scratch
- Converting domain knowledge/documentation into a Skill - Converting documentation, APIs, or domain knowledge into a Skill
- Optimizing existing Skill structure and content - Optimizing or restructuring existing Skills
- Learning Skill best practices and patterns - Learning Skill architecture patterns and best practices
- Debugging or troubleshooting Skill behavior
- Understanding YAML frontmatter and Skill metadata
- Building multi-file Skills with references, scripts, and assets
## Quick Reference
### Skill Directory Structure
```
skill-name/
├── SKILL.md # Required: Main instructions with YAML frontmatter
├── references/ # Optional: Detailed documentation files
│ ├── index.md # Navigation index for references
│ ├── api.md # API documentation
│ └── examples.md # Code examples
├── scripts/ # Optional: Helper scripts and automation
│ └── setup.sh # Setup/installation scripts
└── assets/ # Optional: Templates, configs, media
└── templates/ # Boilerplate files
```
### YAML Frontmatter Specification
```yaml
---
name: skill-name # Required: lowercase, hyphens, unique
description: Complete description # Required: What it does + when to trigger
---
```
### Production SKILL.md Template
```markdown
---
name: my-skill
description: [Purpose] + [Trigger conditions]. Use when [specific scenarios].
---
# [Skill Name] Skill
[One-paragraph overview]
## When to Use This Skill
This skill should be triggered when:
- [Trigger 1]
- [Trigger 2]
- [Trigger 3]
## Quick Reference
### Common Patterns
**Pattern 1:** [Name]
```[language]
[code]
```
### Example Code Patterns
**Example 1** ([language]):
```[language]
[complete working example]
```
## Reference Files
This skill includes documentation in `references/`:
- **[file.md]** - [Description]
## Working with This Skill
### For Beginners
[Getting started guidance]
### For Specific Features
[How to find detailed information]
## Resources
### references/
[Description]
### scripts/
[Description]
### assets/
[Description]
```
--- ---
@ -24,250 +110,229 @@ Skills are folders containing instructions, scripts, and resources that Claude l
### What is a Skill? ### What is a Skill?
**Skill = Folder + SKILL.md + Optional Resources** **A Skill is a folder containing instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks.**
Skills teach Claude to complete specific tasks repeatably: Skills teach Claude to:
- Apply company brand guidelines to documents - Apply domain-specific knowledge consistently
- Analyze data using specific workflows - Follow organization-specific workflows
- Automate personal tasks - Work with specific APIs, file formats, or tools
- Work with specific file formats or APIs - Automate complex multi-step processes
- Apply domain-specific knowledge
### Skill Directory Structure ### Skill Activation Triggers
``` Skills activate based on:
skill-name/ - **Explicit mention**: "Use the [skill-name] skill to..."
├── SKILL.md # Required: Main instructions - **Description matching**: Task matches skill's description keywords
├── assets/ # Optional: Templates, configs, images - **Context relevance**: Task domain aligns with skill's purpose
├── scripts/ # Optional: Helper scripts
└── references/ # Optional: Reference documentation
```
--- ---
## SKILL.md Specification ## Creating Production-Grade Skills
### YAML Frontmatter (Required) ### Step 1: Define Scope
```yaml Answer before writing:
--- 1. What specific problem does this skill solve?
name: skill-name # Unique identifier (lowercase, hyphens) 2. What triggers should activate this skill?
description: What it does and when to use it 3. What are the boundaries (what it should NOT do)?
---
```
### Recommended Structure ### Step 2: Gather Source Material
Collect:
- Official documentation
- API references
- Code examples and patterns
- Common errors and solutions
### Step 3: Structure the SKILL.md
**Critical sections:**
1. YAML frontmatter with comprehensive description
2. "When to Use This Skill" with specific triggers
3. "Quick Reference" with common patterns
4. Code examples that are complete and working
5. Reference file pointers
### Step 4: Create Reference Files
**references/index.md:**
```markdown ```markdown
--- # [Skill Name] Documentation Index
name: my-skill
description: Clear description of purpose and trigger scenarios
---
# Skill Name ## Quick Links
- Getting Started → `getting_started.md`
## Overview - API Reference → `api.md`
Brief explanation of the skill's purpose. - Examples → `examples.md`
## When to Use This Skill
- Trigger scenario 1
- Trigger scenario 2
## Instructions
Detailed execution steps and rules.
## Examples
### Example 1: Scenario
Concrete input/output examples.
## Constraints
- Limitation 1
- Limitation 2
## Error Handling
Common errors and solutions.
## Resources
Reference links and documentation.
``` ```
--- ### Step 5: Add Scripts and Assets
## Creating a Skill
### Step 1: Create Directory
```bash ```bash
mkdir -p my-skill/{assets,scripts,references} # scripts/setup.sh
``` #!/bin/bash
echo "Setting up [skill-name]..."
### Step 2: Create SKILL.md
```bash
cat > my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: Skill description
---
# Skill Name
## Overview
[Purpose]
## When to Use This Skill
- [Trigger scenario]
## Instructions
[Detailed instructions]
## Examples
[Usage examples]
EOF
```
### Step 3: Add Resources (Optional)
- `assets/` - Templates, config files
- `scripts/` - Helper scripts
- `references/` - Reference docs
### Step 4: Test and Iterate
```
"Use my-skill to [task description]"
``` ```
--- ---
## Best Practices ## Best Practices
### 1. Clear Description ### Description Writing
```yaml ```yaml
# ❌ Bad # ❌ Too vague
description: Process data description: Helps with databases
# ✅ Good # ✅ Comprehensive
description: Clean and transform CSV data using pandas, with support for missing value handling, type conversion, and data validation description: PostgreSQL database development including SQL queries, schema design, performance optimization. Use when working with PostgreSQL, writing SQL, or managing databases.
``` ```
### 2. Specific Instructions ### Trigger Conditions
```markdown ```markdown
# ❌ Bad # ❌ Vague
Handle user input - Working with code
# ✅ Good # ✅ Specific
## Input Handling Rules - Writing PostgreSQL queries or stored procedures
1. Validate input format is JSON - Designing database schemas or indexes
2. Check required fields: name, email, age - Optimizing slow queries
3. Age must be positive integer
4. Email validation regex: ^[\w.-]+@[\w.-]+\.\w+$
``` ```
### 3. Complete Examples ### Code Examples
```markdown ```markdown
## Example # ❌ Incomplete
```sql
### Input SELECT * FROM users
```json
{"name": "John", "age": 25}
``` ```
### Output # ✅ Complete with context
```json **Example: Paginated query with filtering**
{"status": "success", "data": {"name": "John", "age": 25, "validated": true}} ```sql
SELECT id, username, email, created_at
FROM users
WHERE status = 'active'
ORDER BY created_at DESC
LIMIT 20 OFFSET 0;
``` ```
``` ```
### 4. Explicit Constraints ---
## Skill Patterns by Category
### API/Library Skills
```markdown ```markdown
## Constraints ## Quick Reference
- Max data size: 10MB per request
- UTF-8 encoding only ### Authentication
- No sensitive data processing ```python
client = APIClient(api_key="your-key")
``` ```
--- ### Common Operations
```python
# Create
resource = client.create(name="example")
## Templates # List
resources = client.list(limit=10)
### Minimal Template # Delete
client.delete(resource_id)
```
### Error Handling
```python
try:
result = client.operation()
except APIError as e:
print(f"Error {e.code}: {e.message}")
```
```
### Framework Skills
```markdown ```markdown
--- ## Project Structure
name: minimal-skill ```
description: Brief description my-project/
--- ├── src/
├── tests/
# Skill Name └── config/
## Instructions
[Core instructions]
## Examples
[Usage examples]
``` ```
### Complete Template ## Common Commands
```bash
framework init my-project
framework dev
framework build
```
```
### Domain Knowledge Skills
```markdown ```markdown
--- ## Core Concepts
name: complete-skill
description: Full description with purpose and trigger scenarios
---
# Skill Name ### Concept 1
[Explanation]
## Overview ### Concept 2
Brief explanation of the skill's purpose and value. [Explanation]
## When to Use This Skill ## Decision Framework
- Scenario 1: [description]
- Scenario 2: [description]
## Instructions When to use Approach A:
- [Condition 1]
- [Condition 2]
### Step 1: [Name] When to use Approach B:
[Details] - [Condition 1]
- [Condition 2]
### Step 2: [Name]
[Details]
## Examples
### Example 1: [Scenario]
**Input:**
```
[input]
```
**Output:**
```
[output]
```
## Constraints
- Limitation 1
- Limitation 2
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Error 1 | Cause | Fix |
## Resources
- [Resource 1](link)
``` ```
--- ---
## Using Skills ## Generating Skills from Source Material
### Transformation Process
```
Source Material
Extract: concepts, patterns, examples, edge cases, errors
Structure: YAML → When to Use → Quick Reference → Details
Create: references/index.md + categorized docs
Production-Grade Skill
```
### Generation Prompt
When creating a skill from source material:
```
Create a production-grade Claude Skill:
1. Analyze source material
2. Extract core concepts and patterns
3. Create SKILL.md with:
- Comprehensive description (purpose + triggers)
- Specific "When to Use" conditions
- Quick Reference with code patterns
- Complete working examples
4. Create references/index.md
5. Organize detailed docs in references/
```
---
## Platform Integration
### Claude Code ### Claude Code
@ -279,77 +344,73 @@ Brief explanation of the skill's purpose and value.
/plugin install example-skills@anthropic-agent-skills /plugin install example-skills@anthropic-agent-skills
# Use # Use
"Use the PDF skill to extract form fields from path/to/file.pdf" "Use the PDF skill to extract tables from report.pdf"
``` ```
### Claude.ai ### Claude.ai
1. Go to Claude.ai (paid plan required) 1. Navigate to Claude.ai (paid plan)
2. Upload custom skills via skills interface 2. Upload custom skill folder
3. Reference skill in conversation 3. Reference in conversations
### Claude API ### Claude API
Upload and use skills via API. See [Skills API Quickstart](https://docs.claude.com/en/api/skills-guide) See: https://docs.claude.com/en/api/skills-guide
--- ---
## Generating Skills from Source Material ## Troubleshooting
### Input Types ### Skill Not Activating
1. **Official docs** - API documentation, user manuals 1. Check `description` includes trigger keywords
2. **Code examples** - Sample code, best practices 2. Verify `name` is lowercase with hyphens
3. **Specifications** - Design specs, coding standards 3. Ensure valid YAML (no tabs)
4. **FAQs** - Common questions and solutions 4. Try explicit: "Use the [skill-name] skill to..."
### Generation Flow ### Inconsistent Behavior
``` 1. Add more specific trigger conditions
1. Collect material → 2. Extract core knowledge → 3. Structure → 4. Write SKILL.md → 5. Test & iterate 2. Include more code examples
``` 3. Make instructions unambiguous
4. Add explicit constraints
### Prompt Template
```
Generate a Claude Skill from the following material:
## Source Material
[paste your material]
## Requirements
1. Follow SKILL.md specification
2. Include YAML frontmatter (name, description)
3. Clear structure: Overview, Instructions, Examples, Constraints
4. Concrete, executable examples
```
--- ---
## Skill Categories Reference ## Reference Files
| Category | Examples | This skill includes documentation in `references/`:
|----------|----------|
| Creative | algorithmic-art, canvas-design, slack-gif-creator |
| Development | artifacts-builder, mcp-server, webapp-testing |
| Enterprise | brand-guidelines, internal-comms, theme-factory |
| Documents | docx, pdf, pptx, xlsx |
| Meta | skill-creator, template-skill |
--- - **README.md** - Official Anthropic Skills repository documentation
- **index.md** - Documentation index and quick links
## Working with This Skill
### For Creating New Skills
Follow the 5-step process in "Creating Production-Grade Skills"
### For Optimizing Existing Skills
Review "Best Practices" and compare against your skill
### For Understanding Architecture
Read "Core Concepts" for foundational understanding
## Resources ## Resources
### Official Documentation ### references/
- [What are skills?](https://support.claude.com/en/articles/12512176-what-are-skills) - Official Anthropic documentation
- [Using skills in Claude](https://support.claude.com/en/articles/12512180-using-skills-in-claude) - Navigation index
- [Creating custom skills](https://support.claude.com/en/articles/12512198-creating-custom-skills)
- [Skills API Quickstart](https://docs.claude.com/en/api/skills-guide)
- [Anthropic Skills GitHub](https://github.com/anthropics/skills)
### This Skill's Assets ### scripts/
- `references/README.md` - Official repository README - `create-skill.sh` - Quick skill directory generator
- `references/index.md` - Documentation index
- `assets/template-minimal.md` - Minimal template ### assets/
- `assets/template-complete.md` - Complete template - `template-minimal.md` - Minimal template
- `scripts/create-skill.sh` - Quick creation script - `template-complete.md` - Full production template
## Notes
- Skills are portable across Claude Code, Claude.ai, and API
- The `description` field is critical for reliable activation
- Code examples should be complete and immediately usable
- This skill generates other production-grade skills

View File

@ -1,78 +1,109 @@
--- ---
name: my-skill name: my-skill
description: Full description of what this skill does, when to use it, and its core capabilities description: [Domain] development and operations including [capability 1], [capability 2], [capability 3]. Use when working with [domain], implementing [solutions], or troubleshooting [issues].
--- ---
# Skill Name # [Skill Name] Skill
## Overview Comprehensive assistance with [domain] development, generated from official documentation.
Brief explanation of the skill's purpose and value.
## When to Use This Skill ## When to Use This Skill
- Scenario 1: [description] This skill should be triggered when:
- Scenario 2: [description] - Working with [domain/technology]
- Scenario 3: [description] - Asking about [domain] features or APIs
- Implementing [domain] solutions
- Debugging [domain] code
- Learning [domain] best practices
## Instructions ## Quick Reference
### Step 1: [Step Name] ### Common Patterns
[Detailed explanation] **Pattern 1:** [Name]
```[language]
### Step 2: [Step Name] [code example]
[Detailed explanation]
### Step 3: [Step Name]
[Detailed explanation]
## Examples
### Example 1: [Scenario Name]
**Input:**
```
[input content]
``` ```
**Output:** **Pattern 2:** [Name]
```[language]
``` [code example]
[output content]
``` ```
### Example 2: [Scenario Name] **Pattern 3:** [Name]
```[language]
**Input:** [code example]
```
[input content]
``` ```
**Output:** ### Example Code Patterns
``` **Example 1** ([language]):
[output content] ```[language]
// [Description of what this example demonstrates]
[complete working code]
``` ```
## Constraints **Example 2** ([language]):
```[language]
// [Description]
[complete working code]
```
- Limitation 1: [description] ## [Domain-Specific Section 1]
- Limitation 2: [description]
- Limitation 3: [description]
## Error Handling ### [Subsection]
| Error | Cause | Solution | [Content]
|-------|-------|----------|
| Error 1 | [cause] | [solution] | ### [Subsection]
| Error 2 | [cause] | [solution] |
[Content]
## [Domain-Specific Section 2]
### [Subsection]
[Content]
## Reference Files
This skill includes comprehensive documentation in `references/`:
- **getting_started.md** - Installation, setup, first steps
- **api.md** - Complete API reference
- **examples.md** - Code examples by use case
- **troubleshooting.md** - Common issues and solutions
Use `view` to read specific reference files when detailed information is needed.
## Working with This Skill
### For Beginners
Start with the getting_started reference file for foundational concepts.
### For Specific Features
Use the api reference file for detailed function/method information.
### For Code Examples
The examples reference file contains patterns organized by use case.
## Resources ## Resources
- [Resource 1](link) ### references/
- [Resource 2](link) Organized documentation extracted from official sources:
- Detailed explanations
- Code examples with language annotations
- Links to original documentation
### scripts/
Helper scripts for common automation tasks.
### assets/
Templates, boilerplate, and example configurations.
## Notes
- This skill was generated from official documentation
- Reference files preserve structure from source docs
- Code examples include language detection for syntax highlighting
- Quick reference patterns are extracted from common usage

View File

@ -1,14 +1,37 @@
--- ---
name: my-skill name: my-skill
description: Brief description of what this skill does and when to use it description: [Domain] assistance including [key capability]. Use when [trigger condition].
--- ---
# Skill Name # [Skill Name] Skill
## Instructions [One-sentence overview of what this skill does]
[Core instructions here] ## When to Use This Skill
## Examples This skill should be triggered when:
- [Trigger 1]
- [Trigger 2]
- [Trigger 3]
[Usage examples here] ## Quick Reference
### Common Patterns
**Pattern 1:**
```[language]
[code]
```
**Pattern 2:**
```[language]
[code]
```
## Resources
### references/
[Documentation files if any]
### scripts/
[Helper scripts if any]

View File

@ -1,10 +1,13 @@
# Claude Skills Documentation Index # Claude Skills Documentation Index
## Overview
This index provides navigation for the Claude Skills meta-skill documentation.
## Categories ## Categories
### README ### Official Documentation
**File:** `README.md` **File:** `README.md`
**Pages:** 1 (122 lines)
Complete overview of Claude Skills including: Complete overview of Claude Skills including:
- What are skills and how they work - What are skills and how they work
@ -12,18 +15,46 @@ Complete overview of Claude Skills including:
- Document skills (source-available) - Document skills (source-available)
- Usage across platforms (Claude Code, Claude.ai, API) - Usage across platforms (Claude Code, Claude.ai, API)
- Creating basic skills - Creating basic skills
- Partner skills
## Quick Links ## Quick Links
- What are skills → `README.md` (line 1-9) | Topic | File | Section |
- Example skills list → `README.md` (line 24-45) |-------|------|---------|
- Document skills → `README.md` (line 47-56) | What are skills | `README.md` | Lines 1-9 |
- Claude Code setup → `README.md` (line 58-78) | Example skills list | `README.md` | Lines 24-45 |
- Claude.ai usage → `README.md` (line 80-84) | Document skills | `README.md` | Lines 47-56 |
- Claude API → `README.md` (line 86-88) | Claude Code setup | `README.md` | Lines 58-78 |
- Creating a skill → `README.md` (line 90-117) | Claude.ai usage | `README.md` | Lines 80-84 |
- Partner skills → `README.md` (line 119-122) | Claude API | `README.md` | Lines 86-88 |
| Creating a skill | `README.md` | Lines 90-117 |
## Skill Structure Reference
### Required Files
```
skill-name/
└── SKILL.md # Main instructions with YAML frontmatter
```
### Optional Directories
```
skill-name/
├── SKILL.md
├── references/ # Documentation files
├── scripts/ # Helper scripts
└── assets/ # Templates, configs
```
### YAML Frontmatter
```yaml
---
name: skill-name # lowercase, hyphens
description: What + When # Purpose and trigger conditions
---
```
## Topics Covered ## Topics Covered
@ -33,79 +64,37 @@ Complete overview of Claude Skills including:
- Platform availability - Platform availability
- Installation methods - Installation methods
### Example Skills by Category ### Skill Categories
**Creative & Design:** | Category | Examples |
- Algorithmic art generation |----------|----------|
- Canvas design | Creative | algorithmic-art, canvas-design, slack-gif-creator |
- Slack GIF creation | Development | artifacts-builder, mcp-server, webapp-testing |
| Enterprise | brand-guidelines, internal-comms, theme-factory |
**Development & Technical:** | Documents | docx, pdf, pptx, xlsx |
- HTML artifacts builder | Meta | skill-creator, template-skill |
- MCP server creation
- Webapp testing
**Enterprise & Communication:**
- Brand guidelines
- Internal communications
- Theme factory
**Meta Skills:**
- Skill creator guide
- Template skill
### Document Skills (Advanced)
- DOCX (Word documents)
- PDF (PDF manipulation)
- PPTX (PowerPoint presentations)
- XLSX (Excel spreadsheets)
### Creating Skills
- Basic structure (folder + SKILL.md)
- YAML frontmatter requirements
- Markdown instructions
- Template usage
### Platform Integration ### Platform Integration
- Claude Code plugin marketplace
- Claude.ai skills interface
- Claude API integration
- Cross-platform portability
## Skill Structure | Platform | Method |
|----------|--------|
``` | Claude Code | `/plugin marketplace add anthropics/skills` |
skill-name/ | Claude.ai | Upload via skills interface |
├── SKILL.md # Required: Main instructions | Claude API | Skills API endpoint |
├── references/ # Optional: Documentation
├── scripts/ # Optional: Helper scripts
└── assets/ # Optional: Resources
```
## YAML Frontmatter
```yaml
---
name: skill-name
description: Clear description of what the skill does
---
```
## External Resources ## External Resources
- **Support Articles:** ### Official Links
- What are skills? - [What are skills?](https://support.claude.com/en/articles/12512176-what-are-skills)
- Using skills in Claude - [Using skills in Claude](https://support.claude.com/en/articles/12512180-using-skills-in-claude)
- Creating custom skills - [Creating custom skills](https://support.claude.com/en/articles/12512198-creating-custom-skills)
- [Skills API Quickstart](https://docs.claude.com/en/api/skills-guide)
- [Anthropic Skills GitHub](https://github.com/anthropics/skills)
- **Blog Posts:** ### Blog Posts
- Equipping agents with Agent Skills - [Equipping agents with Agent Skills](https://anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
- **API Documentation:**
- Skills API Quickstart
- Creating skills via API
## License ## License
Example skills: Apache 2.0 (open source) - Example skills: Apache 2.0 (open source)
Document skills: Source-available (reference only) - Document skills: Source-available (reference only)

View File

@ -1,54 +1,190 @@
#!/bin/bash #!/bin/bash
# Quick Skill directory structure generator #
# Usage: ./create-skill.sh <skill-name> # create-skill.sh - Production-grade Skill directory generator
#
# Usage: ./create-skill.sh <skill-name> [--minimal]
#
# Examples:
# ./create-skill.sh postgresql
# ./create-skill.sh my-api --minimal
#
set -e
SKILL_NAME=$1 SKILL_NAME=$1
MINIMAL=$2
if [ -z "$SKILL_NAME" ]; then if [ -z "$SKILL_NAME" ]; then
echo "Usage: ./create-skill.sh <skill-name>" echo "Usage: ./create-skill.sh <skill-name> [--minimal]"
echo "Example: ./create-skill.sh my-awesome-skill" echo ""
echo "Examples:"
echo " ./create-skill.sh postgresql"
echo " ./create-skill.sh my-api --minimal"
exit 1 exit 1
fi fi
# Validate skill name (lowercase, hyphens only)
if [[ ! "$SKILL_NAME" =~ ^[a-z][a-z0-9-]*$ ]]; then
echo "Error: Skill name must be lowercase, start with letter, use hyphens"
echo "Example: my-skill-name"
exit 1
fi
echo "Creating skill: $SKILL_NAME"
# Create directory structure
mkdir -p "$SKILL_NAME"/{assets,scripts,references} mkdir -p "$SKILL_NAME"/{assets,scripts,references}
cat > "$SKILL_NAME/SKILL.md" << 'EOF' # Create references/index.md
cat > "$SKILL_NAME/references/index.md" << 'EOF'
# Documentation Index
## Categories
### Getting Started
- **getting_started.md** - Installation and setup
### API Reference
- **api.md** - Complete API documentation
### Examples
- **examples.md** - Code examples by use case
## Quick Links
- Installation → `getting_started.md`
- API Reference → `api.md`
- Examples → `examples.md`
EOF
if [ "$MINIMAL" == "--minimal" ]; then
# Minimal template
cat > "$SKILL_NAME/SKILL.md" << EOF
--- ---
name: SKILL_NAME_PLACEHOLDER name: $SKILL_NAME
description: Skill description description: [Domain] assistance including [key capability]. Use when [trigger condition].
--- ---
# Skill Name # ${SKILL_NAME^} Skill
## Overview [One-sentence overview]
Brief explanation of the skill's purpose.
## When to Use This Skill ## When to Use This Skill
- Scenario 1 This skill should be triggered when:
- Scenario 2 - [Trigger 1]
- [Trigger 2]
- [Trigger 3]
## Instructions ## Quick Reference
[Detailed instructions] ### Common Patterns
## Examples **Pattern 1:**
\`\`\`
[code]
\`\`\`
[Usage examples] ## Resources
## Constraints ### references/
Documentation files
- Limitation 1 ### scripts/
- Limitation 2 Helper scripts
EOF EOF
else
# Full production template
cat > "$SKILL_NAME/SKILL.md" << EOF
---
name: $SKILL_NAME
description: [Domain] development including [capability 1], [capability 2]. Use when working with [domain], implementing solutions, or troubleshooting issues.
---
sed -i "s/SKILL_NAME_PLACEHOLDER/$SKILL_NAME/g" "$SKILL_NAME/SKILL.md" # ${SKILL_NAME^} Skill
echo "✅ Created Skill: $SKILL_NAME/" Comprehensive assistance with [domain] development.
## When to Use This Skill
This skill should be triggered when:
- Working with [domain/technology]
- Asking about [domain] features or APIs
- Implementing [domain] solutions
- Debugging [domain] code
- Learning [domain] best practices
## Quick Reference
### Common Patterns
**Pattern 1:** [Name]
\`\`\`
[code example]
\`\`\`
**Pattern 2:** [Name]
\`\`\`
[code example]
\`\`\`
### Example Code Patterns
**Example 1:**
\`\`\`
[complete working code]
\`\`\`
## Reference Files
This skill includes documentation in \`references/\`:
- **index.md** - Documentation navigation
- **getting_started.md** - Setup and basics
- **api.md** - API reference
- **examples.md** - Code examples
## Working with This Skill
### For Beginners
Start with getting_started reference file.
### For Specific Features
Use api reference for detailed information.
### For Code Examples
See examples reference file.
## Resources
### references/
Organized documentation from official sources.
### scripts/
Helper scripts for automation.
### assets/
Templates and configurations.
## Notes
- Generated from official documentation
- Code examples are complete and working
EOF
fi
echo ""
echo "✅ Created skill: $SKILL_NAME/"
echo ""
echo " $SKILL_NAME/"
echo " ├── SKILL.md" echo " ├── SKILL.md"
echo " ├── assets/" echo " ├── assets/"
echo " ├── scripts/" echo " ├── scripts/"
echo " └── references/" echo " └── references/"
echo " └── index.md"
echo "" echo ""
echo "Next: Edit $SKILL_NAME/SKILL.md to add your instructions" echo "Next steps:"
echo " 1. Edit $SKILL_NAME/SKILL.md"
echo " 2. Add documentation to references/"
echo " 3. Add helper scripts to scripts/"
echo " 4. Add templates to assets/"