home / skills / anthropics / claude-plugins-official / example-skill

This skill helps you learn to create Claude Code plugin skills with a clear structure, activation rules, and examples.

npx playbooks add skill anthropics/claude-plugins-official --skill example-skill

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.7 KB
---
name: example-skill
description: This skill should be used when the user asks to "demonstrate skills", "show skill format", "create a skill template", or discusses skill development patterns. Provides a reference template for creating Claude Code plugin skills.
version: 1.0.0
---

# Example Skill

This skill demonstrates the structure and format for Claude Code plugin skills.

## Overview

Skills are model-invoked capabilities that Claude autonomously uses based on task context. Unlike commands (user-invoked) or agents (spawned by Claude), skills provide contextual guidance that Claude incorporates into its responses.

## When This Skill Applies

This skill activates when the user's request involves:
- Creating or understanding plugin skills
- Skill template or reference needs
- Skill development patterns

## Skill Structure

### Required Files

```
skills/
└── skill-name/
    └── SKILL.md          # Main skill definition (required)
```

### Optional Supporting Files

```
skills/
└── skill-name/
    ├── SKILL.md          # Main skill definition
    ├── README.md         # Additional documentation
    ├── references/       # Reference materials
    │   └── patterns.md
    ├── examples/         # Example files
    │   └── sample.md
    └── scripts/          # Helper scripts
        └── helper.sh
```

## Frontmatter Options

Skills support these frontmatter fields:

- **name** (required): Skill identifier
- **description** (required): Trigger conditions - describe when Claude should use this skill
- **version** (optional): Semantic version number
- **license** (optional): License information or reference

## Writing Effective Descriptions

The description field is crucial - it tells Claude when to invoke the skill.

**Good description patterns:**
```yaml
description: This skill should be used when the user asks to "specific phrase", "another phrase", mentions "keyword", or discusses topic-area.
```

**Include:**
- Specific trigger phrases users might say
- Keywords that indicate relevance
- Topic areas the skill covers

## Skill Content Guidelines

1. **Clear purpose**: State what the skill helps with
2. **When to use**: Define activation conditions
3. **Structured guidance**: Organize information logically
4. **Actionable instructions**: Provide concrete steps
5. **Examples**: Include practical examples when helpful

## Best Practices

- Keep skills focused on a single domain
- Write descriptions that clearly indicate when to activate
- Include reference materials in subdirectories for complex skills
- Test that the skill activates for expected queries
- Avoid overlap with other skills' trigger conditions

Overview

This skill provides a clear reference template and guidance for creating Claude Code plugin skills. It explains when to invoke a skill, what files and metadata to include, and how to write effective trigger descriptions. Use it as a concise blueprint when designing or reviewing skills.

How this skill works

The skill inspects the context of a user request to decide whether a skill template or development guidance is relevant. It outlines required structure, optional supporting materials, and recommended frontmatter fields so Claude can reliably detect and use the skill. The guidance focuses on concise trigger phrases, keywords, and actionable instructions.

When to use it

  • When a user asks to demonstrate or show a skill format
  • When creating a new plugin skill template or example
  • When discussing skill development patterns or activation rules
  • When reviewing descriptions to ensure Claude will invoke the right capability
  • When you need a minimal, production-ready skill reference

Best practices

  • Keep each skill narrowly scoped to a single domain or capability
  • Write a precise description listing trigger phrases and relevant keywords
  • Include optional supporting documents for complex logic or examples
  • Structure content logically with purpose, activation conditions, steps, and examples
  • Test that the description triggers the skill for expected queries

Example use cases

  • Create a new plugin skill that triggers on specific user phrases and keywords
  • Review an existing skill description to reduce overlap with other skills
  • Produce a minimal template that includes metadata fields like name, description, and version
  • Draft examples and supporting files demonstrating typical inputs and outputs
  • Train contributors on how to write effective trigger descriptions

FAQ

What metadata fields should I include?

Include a name and a clear description as required fields; optionally add version and license information for maintainability.

How specific should trigger phrases be?

Be specific enough to avoid accidental activation, but include common synonyms and keywords users might use so the skill is reliably invoked.