🎯

skill-writing

🎯Skill

from meriley/claude-code-skills

VibeIndex|
What it does

Guides developers in creating high-quality Claude Code skills by providing a structured workflow for identifying needs, designing evaluations, and documenting skills effectively.

πŸ“¦

Part of

meriley/claude-code-skills(18 items)

skill-writing

Installation

git cloneClone repository
git clone https://gitea.cmtriley.com/mriley/claude-config.git .claude
npm installInstall npm package
npm install -g @anthropic-ai/claude-code
pip installInstall Python package
pip install uv
πŸ“– Extracted from docs: meriley/claude-code-skills
1Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Create new Claude Code skills following best practices including optimal descriptions, progressive disclosure, proper structure, and testing guidelines. Use when creating new skills or skill templates.

Overview

# Skill Writing

Purpose

Guide the creation of new Claude Code skills following official best practices to ensure optimal performance, discoverability, and maintainability.

Quick Start Workflow

Step 1: Identify the Gap

Ask: Does Claude really need this skill?

```bash

# Test Claude's baseline performance WITHOUT the skill

# - Can Claude already do this task reasonably well?

# - What specific knowledge/capability is missing?

# - Will a skill genuinely improve results?

```

Only create a skill if:

  • βœ… Claude lacks specific domain knowledge
  • βœ… Task requires exact procedures or formats
  • βœ… Performance improvement is measurable
  • ❌ Claude can already handle it well
  • ❌ Only saves a few minutes
  • ❌ Task is too variable/creative

Step 2: Create Evaluations First

Before writing extensive documentation:

```python

# Create 3+ test scenarios

evaluations = [

{

"input": "Process this PDF with forms",

"expected": "Extracted form data in JSON format",

"baseline_performance": "fails to extract structured data"

},

{

"input": "Generate chart from spreadsheet",

"expected": "Bar chart with proper labels",

"baseline_performance": "creates chart but missing labels"

},

# Add more scenarios...

]

```

Test baseline: Run scenarios without skill, measure gaps

Step 3: Write Minimal SKILL.md

Keep under 500 lines

```bash

# Create skill directory

mkdir -p ~/.claude/skills/my-skill

# Create SKILL.md

touch ~/.claude/skills/my-skill/Skill.md

```

Start with this template:

```markdown

---

name: processing-pdfs

description: Extract text, tables, and forms from PDF files including scanned documents. Use when working with PDFs or document extraction tasks.

version: 1.0.0

---

# PDF Processing

Purpose

[One sentence: what this skill does]

Workflow

Step 1: [Action]

\\\`bash

# Concrete command

\\\`

Step 2: [Action]

[Clear instructions]

Examples

[2-3 input/output examples]

```

Step 4: Test with Fresh Instances

```bash

# Open new Claude Code session

# Test skill by triggering scenarios

# Observe where Claude struggles

# Note which files get accessed

```

Step 5: Iterate Based on Usage

```markdown

# Refinement cycle:

  1. Observe real usage patterns
  2. Identify missing information
  3. Add only what's needed
  4. Test again
  5. Repeat until evaluations pass

```

Skill Structure Requirements

Directory Structure

```

skill-name/ # Use gerund: verb + -ing

β”œβ”€β”€ Skill.md # Required (capital S)

β”œβ”€β”€ REFERENCE.md # Optional (large reference material)

β”œβ”€β”€ TEMPLATE.md # Optional (output templates)

└── scripts/ # Optional (executables)

└── helper.py

```

YAML Frontmatter (Required)

```yaml

---

name: processing-pdfs # Gerund form, lowercase-with-hyphens, max 64 chars

description: Extract text, tables, and forms from PDF files including scanned documents. Use when working with PDFs or document extraction tasks. # Max 1024 chars, third person, specific

version: 1.0.0 # SemVer format

dependencies: python>=3.8, pdfplumber>=0.9.0 # Optional, list required packages

---

```

Naming Rules:

  • βœ… Use gerund form (verb + -ing): processing-pdfs, analyzing-spreadsheets
  • βœ… Max 64 characters
  • βœ… Lowercase letters, numbers, hyphens only
  • ❌ Avoid vague names: helper, utils, tool

Description Rules:

  • βœ… Third person: "Extracts text from PDFs"
  • ❌ First/second person: "I can extract" or "You can use"
  • βœ… Specific: "Extract text, tables, and forms from PDF files"
  • ❌ Vague: "Helps with documents"
  • βœ… Include WHAT it does: "Extracts text, tables, forms"
  • βœ… Include WHEN to use: "Use when working with PDFs"
  • βœ… Include key terms: "PDF", "document extraction", "tables"

Good vs Bad Descriptions

```yaml

# ❌ Bad - Vague, first person, no triggers

description: I help you process different types of files and documents.

# ❌ Bad - Too generic, missing context

description: Processes data efficiently.

# ❌ Bad - Second person, unclear

description: You can use this to work with files.

# βœ… Good - Specific, third person, clear triggers

description: Extract text, tables, and forms from PDF files including scanned documents. Use when working with PDFs or document extraction tasks.

# βœ… Good - Clear capability and context

description: Analyze Excel spreadsheets, create pivot tables, generate charts. Use when analyzing tabular data or Excel files.

```

Content Organization

Progressive Disclosure Pattern

Keep SKILL.md under 500 lines for optimal performance (target: under 300 lines for complex skills)

#### Directory Structure

```

skill-name/

β”œβ”€β”€ SKILL.md # Main file (always loaded, <500 lines)

└── references/ # On-demand detailed content

β”œβ”€β”€ WORKFLOW-STEPS.md # Detailed step-by-step procedures

β”œβ”€β”€ TROUBLESHOOTING.md # Error handling and edge cases

β”œβ”€β”€ TEMPLATE-EXAMPLES.md # Templates and code examples

└── [DOMAIN-SPECIFIC].md # Skill-specific detailed content

```

#### SKILL.md Structure (Always Loaded)

```markdown

Workflow (Quick Summary)

Core Steps

  1. Step Name: Brief description of what to do
  2. Step Name: Brief description of what to do

[...concise steps...]

For detailed step-by-step workflow with commands and examples:

\\\`

Read ~/.claude/skills/[skill-name]/references/WORKFLOW-STEPS.md

\\\`

Use when: Performing the task, need specific commands, or understanding each step

```

#### Loading Guidance Format

Always include explicit loading instructions with "Use when" context:

```markdown

For [detailed topic]:

\\\`

Read ~/.claude/skills/[skill-name]/references/[FILENAME].md

\\\`

Use when: [specific scenario requiring this content]

```

#### What to Extract to references/

| Content Type | Reference File | Extract When |

| ------------------ | ---------------------- | ------------------------------ |

| Detailed workflows | WORKFLOW-STEPS.md | Steps exceed 20 lines |

| Troubleshooting | TROUBLESHOOTING.md | >5 error scenarios |

| Templates/examples | TEMPLATE-EXAMPLES.md | Complex output formats |

| Domain checks | [DOMAIN]-CHECKS.md | Language/tool-specific details |

| Validation rules | VERIFICATION-CHECKS.md | Detailed verification criteria |

#### Example: Before and After

Before (680 lines - too long):

```markdown

Workflow

Step 1: Discovery

[50 lines of detailed commands and examples]

Step 2: Extraction

[80 lines of detailed procedures]

...

```

After (200 lines - optimal):

```markdown

Workflow (Quick Summary)

Core Steps

  1. Discovery: Identify files using grep/glob patterns
  2. Extraction: Read source, copy exact signatures
  3. Documentation: Use templates, follow patterns
  4. Verification: Check accuracy against source

For detailed workflow with commands and verification checklists:

\\\`

Read ~/.claude/skills/my-skill/references/WORKFLOW-STEPS.md

\\\`

```

#### Reference File Guidelines

  • βœ… Keep references ONE level deep (SKILL.md β†’ references/FILE.md)
  • βœ… Use ALL CAPS for reference filenames
  • βœ… Include complete, standalone content (don't reference other references)
  • βœ… Start each reference with brief context of what it contains
  • ❌ Don't nest references (references/A.md β†’ references/B.md)
  • ❌ Don't duplicate content between SKILL.md and references

File Naming Conventions

```

βœ… Good:

  • Skill.md (capital S, required)
  • REFERENCE.md (all caps for supporting docs)
  • TEMPLATE.md (all caps)
  • FORMS.md (all caps)

❌ Bad:

  • skill.md (lowercase s)
  • reference.txt (wrong extension)
  • my_template.md (underscores)

```

Instruction Clarity

Sequential Workflows

```markdown

Workflow

Step 1: Validate Input

\\\`bash

# Check file exists

test -f document.pdf || echo "File not found"

\\\`

Step 2: Extract Text

\\\`python

import pdfplumber

with pdfplumber.open('document.pdf') as pdf:

text = pdf.pages[0].extract_text()

\\\`

Step 3: Verify Output

Expected format:

\\\`json

{

"pages": 5,

"text": "extracted content..."

}

\\\`

```

Concrete Examples Pattern

Provide 2-3 examples minimum:

```markdown

Examples

Example 1: Simple Text Extraction

Input:

\\\`

document.pdf (invoice)

\\\`

Output:

\\\`json

{

"invoice_number": "INV-001",

"amount": "$100.00",

"date": "2024-01-01"

}

\\\`

Example 2: Table Extraction

Input:

\\\`

spreadsheet.pdf (financial data)

\\\`

Output:

\\\`json

[

{"month": "Jan", "revenue": 1000},

{"month": "Feb", "revenue": 1200}

]

\\\`

```

Template Patterns

When output format matters:

```markdown

Output Template

\\\`json

{

"field1": "value", // Required

"field2": 123, // Optional, number

"field3": ["array"], // Optional, array of strings

"metadata": { // Required

"timestamp": "ISO8601",

"version": "1.0"

}

}

\\\`

```

Validation Steps

```markdown

Validation Checklist

After extraction:

  • [ ] All required fields present
  • [ ] Data types correct
  • [ ] Values within expected ranges
  • [ ] No parsing errors in logs

```

Common Pitfalls to Avoid

Key anti-patterns to watch for:

  • ❌ Offering too many options (pick ONE default approach)
  • ❌ Vague descriptions (be specific about what skill does)
  • ❌ Deeply nested references (max one level: Skill.md β†’ REFERENCE.md)
  • ❌ Inconsistent terminology (choose one term per concept)
  • ❌ First/second person (use third person in descriptions)
  • ❌ Too much context (Claude knows programming basics)
  • ❌ Missing "When NOT to Use" section
  • ❌ No concrete examples (need 2-3 minimum)
  • ❌ Placeholder values in examples (use realistic values)

See REFERENCE.md Section 1 for detailed anti-patterns with examples.

Code and Script Guidance

Best practices for code in skills:

  • βœ… Explicit error handling (catch specific exceptions)
  • βœ… Configuration comments explain WHY, not WHAT
  • βœ… Forward slashes in all paths (cross-platform)
  • βœ… Input validation (fail fast with clear errors)
  • βœ… Resource cleanup (use context managers)

See REFERENCE.md Section 2 for detailed code guidance with examples.

Testing Guidelines

Required testing before releasing a skill:

  • βœ… Create 3+ evaluation scenarios first (test-driven approach)
  • βœ… Test across models (Haiku, Sonnet, Opus)
  • βœ… Fresh instance testing (no prior context)
  • βœ… Baseline comparison (prove skill adds value)
  • βœ… Real-world validation (actual user tasks)
  • βœ… Continuous improvement (iterate based on usage)

See REFERENCE.md Section 3 for comprehensive testing guidelines.

Quality Checklist

Before sharing a skill, verify:

Core Quality

  • [ ] Description includes specific key terms and usage triggers
  • [ ] Description written in third person
  • [ ] SKILL.md body under 500 lines
  • [ ] Additional details in separate reference files
  • [ ] Reference files one level deep from SKILL.md
  • [ ] Consistent terminology throughout
  • [ ] Concrete examples provided (2-3 minimum)
  • [ ] Clear workflow steps with verification points

Naming & Structure

  • [ ] Name uses gerund form (verb + -ing)
  • [ ] Name max 64 characters, lowercase-with-hyphens
  • [ ] Directory named correctly (matches skill name)
  • [ ] Skill.md with capital S
  • [ ] YAML frontmatter complete (name, description, version)

Content Quality

  • [ ] Only includes info Claude doesn't already know
  • [ ] Progressive disclosure pattern used
  • [ ] One default approach (not too many options)
  • [ ] No time-sensitive information
  • [ ] No deeply nested references
  • [ ] No vague confidence language

Code Quality (if applicable)

  • [ ] Scripts handle errors explicitly
  • [ ] All constants justified in comments
  • [ ] Required packages listed and verified available
  • [ ] Validation steps for critical operations
  • [ ] Forward slashes in all file paths

Testing

  • [ ] At least 3 evaluations created
  • [ ] Tested with Haiku, Sonnet, and Opus
  • [ ] Real-world usage scenarios validated
  • [ ] Fresh instance testing completed
  • [ ] Team feedback incorporated

Resources

  • [Official Skill Best Practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
  • [Skill Template](TEMPLATE.md)
  • [Example Skills](EXAMPLES.md)
  • [Claude Documentation](https://platform.claude.com/docs)

Quick Reference

```bash

# Create new skill

mkdir -p ~/.claude/skills/my-skill-name

cd ~/.claude/skills/my-skill-name

# Copy template

cp ~/.claude/skills/skill-writing/TEMPLATE.md ./Skill.md

# Edit frontmatter and content

# Test with fresh Claude instance

# Iterate based on usage

```

More from this repository10

🎯
vendure-admin-ui-writing🎯Skill

vendure-admin-ui-writing skill from meriley/claude-code-skills

🎯
vendure-admin-ui-reviewing🎯Skill

Reviews and analyzes the Vendure admin user interface codebase, providing insights into code quality, potential improvements, and identifying potential UI/UX issues or technical debt in the admin p...

🎯
run-tests🎯Skill

Runs automated tests for code projects, executing test suites and reporting results across different programming environments.

🎯
security-scan🎯Skill

I apologize, but I cannot generate a description without seeing the actual context or details about the "security-scan" skill. Could you provide more information about what the skill does, its purp...

🎯
vendure-plugin-writing🎯Skill

Guides developers in creating robust, configurable Vendure plugins using TypeScript, decorators, and dependency injection best practices.

🎯
safe-destroy🎯Skill

Enforces strict safety protocols by requiring explicit confirmation, listing affected files, and preventing accidental data loss during destructive git or file operations.

🎯
vendure-plugin-reviewing🎯Skill

Extends Vendure e-commerce platform with advanced product review capabilities, enabling custom review management and integration.

🎯
vendure-graphql-reviewing🎯Skill

Automatically reviews Vendure GraphQL resolvers for critical security, permission, and architectural violations during code audits.

🎯
skill-review🎯Skill

Helps developers review and analyze code changes, providing insights and suggestions for improving code quality and maintainability.

🎯
vendure-graphql-writing🎯Skill

Generates GraphQL schema and resolvers for Vendure e-commerce projects using Claude's code generation capabilities.