create claude code skills with comprehensive best practices and patterns
Creates validated Claude Code skills with proper structure, best practices, and testing workflows. Use when building new skills or refining existing ones to ensure they follow official patterns and trigger correctly.
/plugin marketplace add existential-birds/beagle/plugin install beagle@existential-birdsCreate, validate, and refine Claude Code skills following official best practices.
1. Gather Requirements → 2. Design Structure → 3. Write SKILL.md → 4. Add Supporting Files → 5. Validate → 6. Test
Before writing any skill, collect this information from the user:
Required:
Optional:
allowed-tools)?Ask clarifying questions if the scope is unclear. Skills should be focused on one capability.
Determine the skill complexity:
Simple Skill (single file):
skill-name/
└── SKILL.md
Use when: Single capability, no scripts, under 200 lines of content.
Multi-file Skill (progressive disclosure):
skill-name/
├── SKILL.md # Overview + navigation (under 500 lines)
├── reference.md # Detailed API/schema info
├── examples.md # Extended examples
└── scripts/ # Utility scripts
├── helper.py
└── validate.py
Use when: Complex domain, multiple sub-capabilities, utility scripts needed.
---
name: skill-name-here
description: What it does and when to use it. Include trigger keywords.
allowed-tools: Read, Grep, Glob # Optional: restrict tool access
---
Name rules:
processing-pdfs, generating-commitsDescription rules:
Description pattern:
<what it does>. <trigger conditions>.
Good examples:
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
description: Analyze Excel spreadsheets, create pivot tables, generate charts. Use when analyzing Excel files, spreadsheets, tabular data, or .xlsx files.
description: Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.
Bad examples:
description: Helps with documents # Too vague
description: I can process data # Wrong person, too vague
description: Does stuff with files # Useless
Use this template:
# Skill Name
## Quick Start
<Minimal working example - 3-5 lines max>
## Instructions
<Step-by-step guidance - be specific about WHAT to do>
## Workflows
<For complex tasks, provide checklists Claude can track>
## Examples
<Input/output pairs showing desired style and output>
## Advanced
<Link to additional files if needed>
For detailed reference, see [reference.md](reference.md).
Default assumption: Claude is already very smart.
Only add context Claude doesn't have. Challenge each piece of information:
Bad (verbose):
PDF (Portable Document Format) files are a common file format that contains
text, images, and other content. To extract text from a PDF, you'll need to
use a library. There are many libraries available...
Good (concise):
Use pdfplumber for text extraction:
\`\`\`python
import pdfplumber
with pdfplumber.open("file.pdf") as pdf:
text = pdf.pages[0].extract_text()
\`\`\`
Match specificity to task fragility:
High freedom (text-based instructions) - when multiple approaches are valid:
## Code review process
1. Analyze the code structure and organization
2. Check for potential bugs or edge cases
3. Suggest improvements for readability
Low freedom (exact commands) - when operations are fragile:
## Database migration
Run exactly this script:
\`\`\`bash
python scripts/migrate.py --verify --backup
\`\`\`
Do not modify the command or add additional flags.
For quality-critical tasks, add validation steps:
## Editing Process
1. Make your edits
2. **Validate immediately**: `python scripts/validate.py`
3. If validation fails:
- Review the error message
- Fix the issues
- Run validation again
4. **Only proceed when validation passes**
Provide copyable checklists:
## Form Filling Workflow
Copy this checklist and track progress:
```
Task Progress:
- [ ] Step 1: Analyze the form
- [ ] Step 2: Create field mapping
- [ ] Step 3: Validate mapping
- [ ] Step 4: Fill the form
- [ ] Step 5: Verify output
```
Show input/output pairs for style guidance:
## Commit Message Format
**Example 1:**
Input: Added user authentication with JWT tokens
Output:
```
feat(auth): implement JWT-based authentication
Add login endpoint and token validation middleware
```
**Example 2:**
Input: Fixed bug where dates displayed incorrectly
Output:
```
fix(reports): correct date formatting in timezone conversion
Use UTC timestamps consistently across report generation
```
Reference additional files instead of including everything:
## Advanced Features
**Form filling**: See [FORMS.md](FORMS.md) for complete guide
**API reference**: See [REFERENCE.md](REFERENCE.md) for all methods
**Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns
Critical: Keep references one level deep from SKILL.md. Don't create chains of references.
Before finalizing, verify:
Core Quality:
Technical:
If using allowed-tools:
After creating the skill:
Place in correct location:
~/.claude/skills/skill-name/SKILL.md.claude/skills/skill-name/SKILL.mdRestart Claude Code to load the skill
Test with natural language that matches your description triggers:
User: "Help me extract text from this PDF"
→ Should invoke skill with "PDF" trigger
Verify Claude navigates correctly to reference files when needed
Iterate based on observation:
DON'T:
scripts\helper.py)DO:
---
name: your-skill-name
description: <What it does>. Use when <trigger conditions>.
---
# Your Skill Name
## Quick Start
<Minimal example - get user productive immediately>
## Instructions
<Clear, numbered steps for common use cases>
## Examples
<2-3 input/output examples showing desired style>
SKILL.md:
---
name: your-skill-name
description: <What it does>. Use when <trigger conditions>.
---
# Your Skill Name
## Quick Start
<Minimal example>
## Common Tasks
### Task A
<Brief instructions>
### Task B
<Brief instructions>
## Advanced
- **Full reference**: See [reference.md](reference.md)
- **Examples**: See [examples.md](examples.md)
- **Utility scripts**: See [scripts/](scripts/)
reference.md:
# Reference
## Contents
- Section A
- Section B
- Section C
## Section A
<Detailed content>
...
After gathering requirements for a "code-review" skill:
Created skill: .claude/skills/reviewing-code/
Files:
├── SKILL.md (245 lines) - Core instructions and checklists
├── security-patterns.md - Common security issues to check
└── examples.md - Example review outputs
Description: "Reviews code changes for production readiness, checking code quality, architecture, testing, and security. Use when reviewing PRs, checking code before merge, or auditing code quality."
Next steps:
1. Review the generated files
2. Restart Claude Code to load the skill
3. Test with: "Review the changes in my current branch"
When the user asks for a skill:
Iterative refinement: If the user reports the skill isn't working: