/context-engineering:skill-devfrom context-engineering
Guides creation of Claude Code skills with proper directory structure, frontmatter, and discovery-optimized descriptions. Invoked when users request skill development.
Ships in context-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill helps create production-ready Claude Code skills following Anthropic's official specifications and best practices.
| Aspect | Skills | Sub-agents |
|---|---|---|
| Invocation | Model-invoked (automatic) | User-invoked (explicit) or Task tool |
| Scope | Single capability | Multiple capabilities |
| File | Directory with SKILL.md | Single .md file |
| Supporting files | Can include templates, scripts | System prompt only |
| Discovery | Description matching | Description + explicit invocation |
| Use case | Reusable patterns, tools, workflows | Specialized AI assistants |
When to use Skills: Create autonomous capabilities that Claude should invoke automatically when context matches (e.g., PDF processing, form filling, specific workflows)
When to use Agents: Create specialized AI assistants for complex domains requiring multi-step reasoning (e.g., database expert, security auditor)
Anthropic identifies three common skill categories:
| Category | Purpose | Example |
|---|---|---|
| Document & Asset Creation | Produce tangible outputs (reports, documents, designs, code) | A frontend-design skill that creates production-grade UI components |
| Workflow Automation | Orchestrate multi-step processes with validation gates | A skill-creator skill that walks users through use case definition, frontmatter, and validation |
| MCP Enhancement | Add knowledge and best practices on top of MCP tool access | A sentry-code-review skill that uses Sentry's MCP to analyze and fix bugs in PRs |
The kitchen analogy: MCP provides the professional kitchen (tools, ingredients, equipment). Skills provide the recipes (step-by-step instructions on how to create something valuable). Together, they enable users to accomplish complex tasks without figuring out every step themselves. See patterns/skill-mcp-integration.md for in-depth MCP integration guidance.
When designing a skill, choose your framing:
Most skills lean one direction. Knowing which framing fits your use case helps you choose the right pattern (see Common Patterns below).
skill-name/
├── SKILL.md # Required: Skill definition and content
├── examples/ # Optional: Example usage
│ ├── basic-usage.md
│ └── advanced-patterns.md
├── templates/ # Optional: Code templates
│ └── template-file.py
├── references/ # Optional: Reference materials
│ └── api-docs.md
├── assets/ # Optional: Static resources (templates, fonts, icons)
│ └── report-template.md
└── scripts/ # Optional: Helper scripts
└── helper.py
Important: Do NOT include README.md inside skill directories. SKILL.md serves as both the skill definition and documentation. When distributing via GitHub, use a repo-level README for human users — that is separate from the skill folder contents.
---
name: skill-name
description: >
Detailed description of what this skill does, when Claude should use it,
and specific trigger terms. This field is CRITICAL for skill discovery.
Include:
- What the skill accomplishes
- When to activate (specific scenarios)
- Key trigger terms users might mention
- Concrete examples of usage
allowed-tools: Tool1, Tool2 # Optional: Tool restrictions
---
# Skill Content
Main skill content starts here. This is what Claude sees when the skill is activated.
Include:
- Clear instructions
- Examples
- Best practices
- Common patterns
- Error handling
Reference supporting files with relative paths:
- See `examples/basic-usage.md` for getting started
- Use templates from `templates/` directory
- Consult `references/api-docs.md` for API details
Unique identifier for the skill.
Constraints:
name: pdf-form-filling # Good
name: PDF Form Filling # Bad - no spaces/capitals
name: helper # Bad - too generic
name: skill-that-does-pdf-form-filling-and-extraction # Bad - too long
The MOST IMPORTANT field. Claude uses this to decide when to activate the skill.
Critical elements:
Constraints: Description must be under 1024 characters. No XML angle brackets (< or >).
Debug technique: Ask Claude: "When would you use the [skill name] skill?" Claude will quote the description back — adjust based on what's missing or misaligned.
Good description example:
description: >
Extract text and tables from PDF documents, fill PDF forms programmatically,
and merge multiple PDFs. Use when user mentions PDF files, form filling,
document parsing, or PDF manipulation.
Activate for:
- "Extract data from this PDF"
- "Fill out this PDF form"
- "Parse tables from PDF"
- "Combine these PDFs"
Do NOT use for:
- Creating PDFs from scratch (use document generation skill)
- Image extraction (use image processing skill)
Bad description example:
description: Helps with documents # Too vague, no trigger terms
Restrict which tools the skill can use when activated.
# Read-only skill
allowed-tools: Read, Grep, Glob
# File manipulation skill
allowed-tools: Read, Write, Edit
# Full access (can run commands)
allowed-tools: Read, Write, Bash, Grep
When to restrict tools:
When to omit (inherit all tools):
Beyond name, description, and allowed-tools, skills support these optional fields:
# Optional fields
license: MIT # For open-source skills
compatibility: claude-code, claude-ai, api # 1-500 chars, environment requirements
# Note: Skills work identically across Claude.ai, Claude Code, and API.
# Create once, use everywhere — provided the environment supports any
# dependencies the skill requires.
metadata:
author: Your Name
version: 1.0.0
mcp-server: server-name # If skill enhances an MCP server
category: workflow # document | workflow | mcp-enhancement
tags: [deployment, automation]
documentation: https://example.com/docs
support: [email protected]
# Skill Name
## Overview
Brief description of what this skill provides and when to use it.
## Capabilities
- List specific capabilities
- Be concrete and actionable
- Include limitations
## Usage
When this skill is activated, follow these steps:
1. **Step 1**: Clear action with example
```python
# Code example
Step 2: Next action
Step 3: Final action
### 3. Include Examples
```markdown
## Examples
### Basic Usage
User request: "Extract text from this PDF"
Response approach:
1. Use Read tool to access PDF
2. Parse with PDF library
3. Return extracted text
### Advanced Usage
User request: "Fill out this tax form PDF with data from CSV"
Response approach:
1. Load CSV data
2. Map fields to PDF form
3. Fill and save
## Templates
Use the templates in `templates/` directory:
- `templates/pdf-parser.py` - Basic PDF parsing
- `templates/form-filler.py` - Form field population
## Examples
See `examples/` for complete workflows:
- `examples/basic-extraction.md` - Simple text extraction
- `examples/form-automation.md` - Automated form filling
## Error Handling
Common issues and solutions:
**PDF is password protected**:
- Ask user for password
- Use PyPDF2 decrypt method
**Form fields not found**:
- List available fields
- Ask user to map fields manually
~/.claude/skills/
├── pdf-processing/
│ ├── SKILL.md
│ ├── examples/
│ └── templates/
└── data-analysis/
├── SKILL.md
└── scripts/
.claude/skills/
├── api-testing/
│ ├── SKILL.md
│ ├── templates/
│ │ ├── test-template.py
│ │ └── mock-data.json
│ └── examples/
└── deployment-checks/
└── SKILL.md
plugin-name/
└── skills/
├── capability-one/
│ └── SKILL.md
└── capability-two/
├── SKILL.md
└── helpers/
Concrete usage examples that users can reference.
# examples/basic-pdf-extraction.md
## Extracting Text from PDF
User: "Get the text from report.pdf"
Assistant approach:
1. Read the PDF file
2. Use PyPDF2 to extract text
3. Return formatted text
Code:
\`\`\`python
import PyPDF2
# ... extraction code
\`\`\`
Output:
- Extracted text
- Page numbers
- Formatting preserved
Reusable code scaffolding.
# templates/pdf-parser.py
"""
Template for PDF text extraction
Usage: Adapt for specific PDF parsing needs
"""
import PyPDF2
from typing import List, Dict
def extract_text(pdf_path: str) -> List[str]:
"""Extract text from all pages."""
with open(pdf_path, 'rb') as file:
reader = PyPDF2.PdfReader(file)
return [page.extract_text() for page in reader.pages]
def extract_tables(pdf_path: str) -> List[Dict]:
"""Extract tables from PDF."""
# Implementation here
pass
External documentation, API references, best practices.
# references/pdf-libraries.md
## Python PDF Libraries
### PyPDF2
- Basic PDF manipulation
- Good for simple text extraction
- Free and lightweight
### pdfplumber
- Advanced table extraction
- Better text positioning
- Recommended for complex layouts
### reportlab
- PDF generation from scratch
- Not for reading existing PDFs
Helper utilities that support the skill.
# scripts/pdf-validator.py
"""Validate PDF files before processing."""
def is_valid_pdf(file_path: str) -> bool:
"""Check if file is a valid PDF."""
# Implementation
pass
def get_pdf_info(file_path: str) -> dict:
"""Extract PDF metadata."""
# Implementation
pass
description: >
Process Excel and CSV files, perform data transformations, generate reports.
Trigger terms: Excel, CSV, spreadsheet, data import, pivot table, VLOOKUP,
data cleaning, pandas, dataframe, export to Excel
description: >
Handle authentication with JWT tokens, OAuth 2.0, and session management.
Use for login, logout, token refresh, and authorization checks.
Do NOT use for:
- Password hashing (use security-utils skill)
- User registration (use user-management skill)
- Email verification (use notification skill)
description: >
Database migration management with zero-downtime deployments.
Activate when user mentions:
- "Create a migration"
- "Roll back database changes"
- "Add a column without downtime"
- "Database schema updates"
Example: User says "I need to add a new column to the users table"
→ Activate this skill to create safe migration
After creating a skill:
Test activation: Use natural language that should trigger the skill
User: "Extract the tables from this PDF report"
Expected: Claude activates pdf-processing skill
Verify autonomy: Ensure Claude invokes WITHOUT explicit mention
Check boundaries: Confirm skill doesn't activate for out-of-scope requests
User: "Create a PDF from scratch"
Expected: Skill does NOT activate (out of scope)
Review supporting files: Ensure referenced files exist and are accessible
Define success criteria before building. These are aspirational targets — rough benchmarks rather than precise thresholds.
Quantitative:
Qualitative:
Before building a skill from scratch:
This produces higher-quality skills than designing from theory alone. It leverages Claude's in-context learning and provides faster signal than broad testing. Once you have a working foundation, expand to multiple test cases for coverage.
Skills support progressive disclosure - Claude loads content as needed:
Structure your skill to enable this:
# Main Skill Content (loaded immediately)
Brief instructions and common patterns.
## Detailed Examples
See `examples/advanced-usage.md` for detailed examples (loaded on demand).
## API Reference
Consult `references/api-docs.md` for complete API documentation (loaded on demand).
Five canonical patterns for skill design, based on Anthropic's official guidance:
Orchestrates multi-step processes in a specific order with validation at each stage.
Use when: Users need multi-step processes executed in a defined sequence with dependencies between steps.
---
name: customer-onboarding
description: >
End-to-end customer onboarding workflow. Handles account creation,
payment setup, and subscription management. Use when user says
"onboard new customer", "set up subscription", or "create account".
Do NOT use for account deletion or billing disputes.
---
# Customer Onboarding
## Step 1: Create Account
Call MCP tool: `create_customer`
Parameters: name, email, company
## Step 2: Setup Payment
Call MCP tool: `setup_payment_method`
Wait for: payment method verification
## Step 3: Create Subscription
Call MCP tool: `create_subscription`
Parameters: plan_id, customer_id (from Step 1)
## Step 4: Send Welcome Email
Call MCP tool: `send_email`
Template: welcome_email_template
Key techniques: Explicit step ordering, dependencies between steps, validation at each stage, rollback instructions for failures.
Orchestrates workflows that span multiple MCP services.
Use when: A workflow requires coordinating data and actions across different services.
---
name: design-handoff
description: >
Design-to-development handoff workflow. Exports assets from Figma,
stores in Drive, creates Linear tasks, notifies Slack. Use when
user mentions "design handoff", "dev handoff", or "hand off designs".
Do NOT use for design review or feedback workflows.
metadata:
category: workflow
mcp-server: figma, google-drive, linear, slack
---
# Design-to-Dev Handoff
## Phase 1: Design Export (Figma MCP)
1. Export design assets from Figma
2. Generate design specifications
3. Create asset manifest
## Phase 2: Asset Storage (Drive MCP)
1. Create project folder in Drive
2. Upload all assets
3. Generate shareable links
## Phase 3: Task Creation (Linear MCP)
1. Create development tasks
2. Attach asset links to tasks
3. Assign to engineering team
## Phase 4: Notification (Slack MCP)
1. Post handoff summary to #engineering
2. Include asset links and task references
Key techniques: Clear phase separation, data passing between MCPs, validation before moving to next phase, centralized error handling.
Output quality improves through validation loops.
Use when: The task benefits from draft-check-refine cycles rather than single-pass execution.
---
name: report-generation
description: >
Generate and refine data reports with quality validation. Use when user
requests "create report", "generate analysis", or "build summary".
Do NOT use for ad-hoc data queries or simple lookups.
---
# Iterative Report Creation
## Initial Draft
1. Fetch data via MCP
2. Generate first draft report
3. Save to temporary file
## Quality Check
1. Run validation script: `scripts/check_report.py`
2. Identify issues: missing sections, inconsistent formatting, data errors
## Refinement Loop
1. Address each identified issue
2. Regenerate affected sections
3. Re-validate
4. Repeat until quality threshold met
## Finalization
1. Apply final formatting
2. Generate summary
3. Save final version
Key techniques: Explicit quality criteria, iterative improvement, validation scripts, clear exit conditions for the refinement loop.
Same outcome, different tools depending on context.
Use when: The skill needs to dynamically choose between tools or approaches based on input characteristics.
---
name: smart-file-storage
description: >
Intelligently store files in the appropriate service based on type
and size. Use when user wants to "save", "store", or "upload" files.
Do NOT use for file retrieval or search.
---
# Smart File Storage
## Decision Tree
1. Check file type and size
2. Determine best storage location:
- Large files (>10MB): Use cloud storage MCP
- Collaborative docs: Use Notion/Docs MCP
- Code files: Use GitHub MCP
- Temporary files: Use local storage
## Execute Storage
Based on decision:
- Call appropriate MCP tool
- Apply service-specific metadata
- Generate access link
## Provide Context to User
Explain why that storage was chosen
Key techniques: Clear decision criteria, fallback options, transparency about choices made.
Skill adds specialized knowledge beyond raw tool access.
Use when: The skill's value comes from embedding domain expertise, compliance rules, or institutional knowledge that users would otherwise need to supply manually.
---
name: payment-compliance
description: >
Payment processing with regulatory compliance checks. Handles
transaction validation, sanctions screening, and audit trails.
Use when user mentions "process payment", "transaction", or
"payment compliance". Do NOT use for refunds or chargebacks.
metadata:
category: mcp-enhancement
mcp-server: payment-gateway
---
# Payment Processing with Compliance
## Before Processing (Compliance Check)
1. Fetch transaction details via MCP
2. Apply compliance rules:
- Check sanctions lists
- Verify jurisdiction allowances
- Assess risk level
3. Document compliance decision
## Processing
IF compliance passed:
- Call payment processing MCP tool
- Apply appropriate fraud checks
- Process transaction
ELSE:
- Flag for review
- Create compliance case
## Audit Trail
- Log all compliance checks
- Record processing decisions
- Generate audit report
Key techniques: Domain expertise embedded in logic, compliance-before-action flow, comprehensive documentation, clear governance.
❌ Vague description
description: Helps with files
✅ Specific description with triggers
description: >
Extract text, tables, and metadata from PDF files. Use when user
mentions PDF parsing, form filling, or document extraction.
❌ Skill too broad
name: backend-development
description: Handles all backend tasks
✅ Focused skill
name: database-migration
description: Create and manage database migrations with zero downtime
❌ Missing trigger terms
description: Processes spreadsheets
✅ Explicit trigger terms
description: >
Process Excel and CSV files. Activate for: Excel, CSV, spreadsheet,
XLSX, pandas, dataframe, pivot table
❌ No supporting files structure
skill-name.md # Just a file, not a directory
✅ Proper directory structure
skill-name/
├── SKILL.md
├── examples/
└── templates/
Bundled scripts: For critical validations, bundle a script in scripts/ rather than relying on language instructions. Scripts are deterministic; language interpretation isn't.
Model laziness: If Claude skips steps, add explicit phrasing: "Take your time. Quality is more important than speed. Do not skip validation steps." Note: this is more effective in user prompts than in SKILL.md.
SKILL.md size: Keep SKILL.md under 5,000 words. Move detailed documentation to references/. If the skill seems slow or responses degrade, check whether too much content is inline.
Simultaneous skills: Claude supports 20-50 skills simultaneously. Beyond that, activation accuracy may decrease. Consider skill "packs" for related capabilities and selective enablement.
< or >) in SKILL.md content — they can conflict with Claude's internal processing and create security vulnerabilities| Need | Use |
|---|---|
| Autonomous capability (model-invoked) | Skill |
| User-invoked reusable prompt | Command (slash command) |
| Specialized AI assistant | Agent (sub-agent) |
| Multi-step workflow automation | Skill |
| Quick text expansion | Command |
| Complex reasoning in specific domain | Agent |
Reference the examples directory for:
Next Steps: After creating a skill, test activation by using natural language that should trigger it. Refine the description based on actual discovery patterns. Add supporting files progressively as users request more capabilities.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub andisab/swe-marketplace --plugin context-engineering7 skills in this plugin
/agent-devUse this skill when creating or refining Claude Code sub-agent definitions. Helps design specialized AI assistants with proper YAML frontmatter, system prompts, tool access, and example-driven descriptions. Automatically invoked when user requests "create an agent", "design a sub-agent", "make a specialist", or mentions agent development. Ensures agents follow Anthropic best practices with focused responsibilities, discovery-optimized descriptions, and proper tool restrictions.
/command-devUse this skill when creating or refining custom Claude Code slash commands. Slash commands are user-invoked reusable prompts that can accept arguments, reference files, and execute bash operations. Helps design command syntax, argument handling, file references, bash execution, and frontmatter configuration. Automatically invoked when user requests "create a command", "make a slash command", "add a /command", or mentions custom command development.
/hook-devUse this skill when creating or refining Claude Code hooks. Hooks are shell commands that execute at specific lifecycle events (tool use, prompt submit, notifications, session events). Helps design event handlers for notifications, formatting, logging, feedback, and permission control. Automatically invoked when user requests "create a hook", "add automation", "event handler", "workflow automation", or mentions hook development.
Other plugins' skills for the same job