Best practices for writing Claude Code skills and agents. Use when creating, improving, or troubleshooting SKILL.md or agent files.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: skill-authoring description: Best practices for writing Claude Code skills and agents. Use when creating, improving, or troubleshooting SKILL.md or agent files.
Skill and Agent Authoring Guide
Skill Writing Principles
1. Strong Descriptions
Good: "Analyze Rust code for unsafe blocks, justify each usage. Use when reviewing Rust code for safety." Bad: "Helps with Rust" (too vague)
Include trigger keywords users would naturally say.
2. Progressive Disclosure
- Keep SKILL.md under 500 lines
- Split large content into separate files
- SKILL.md is the table of contents, not the encyclopedia
3. Validation Loops
Always include verify-fix-repeat patterns:
1. Run validator (script or checklist)
2. Fix issues
3. Re-validate
4. Only proceed when clean
4. File Organization
skill-name/
├── SKILL.md # Overview and workflow
├── REFERENCE.md # Detailed docs (optional)
├── EXAMPLES.md # Code examples (optional)
└── validate.sh # Utility scripts (optional)
Agent Writing Principles
1. Proactive Invocation
Use phrases in description:
- "Use PROACTIVELY after..."
- "MUST BE USED when..."
- "Automatically invoke for..."
2. Tool Restrictions
Only specify tools if you need restrictions:
tools: Read, Grep, Glob # Read-only agent
Omit for full tool access.
3. Model Selection
sonnet: Fast, efficient (default)opus: Complex reasoninginherit: Match main conversationhaiku: Very fast, simple tasks
4. Skills Integration
skills: rust-patterns, security-check
Agent loads these skills at startup.
Common Patterns
Research Agent
description: Deep codebase analysis. Use for complex refactoring planning.
tools: Read, Grep, Glob, Bash
model: opus
Review Agent
description: Code review specialist. Use PROACTIVELY after commits.
tools: Read, Grep, Glob
skills: code-standards, security-patterns
Fix Agent
description: Automated test fixer. Use when tests fail.
tools: Read, Edit, Bash
skills: test-patterns
Troubleshooting
Skill Not Loading
- Check filename is exactly
SKILL.md(case-sensitive) - Verify frontmatter starts on line 1 (no blank lines before
---) - Use spaces, not tabs in YAML
- Run
claude --debugto see errors
Skill Not Triggering
- Add more keywords to description
- Make description action-oriented
- Test with explicit keywords from description
Agent Not Invoked
- Add "PROACTIVELY" or "MUST BE USED" to description
- Make description more specific
- Explicitly mention: "Use the X agent to..."
Testing Checklist
- YAML frontmatter is valid
- Description includes trigger keywords
- Instructions are clear and actionable
- Examples are included
- Validation steps are defined
- File is under 500 lines (for skills)
- Runs with
claude --debugwithout errors
More by KristalAlfred
View allWoW 3.3.5a (WOTLK) modding overview. Use when working on WoW mod tasks, client patching, texture work, DBC editing, MPQ archives, or AIO plugins. Pulls in relevant sub-skills.
CLI for splitting and recombining PNG alpha channels when prepping WoW textures for AI image generation. Use when working with texture alpha channels, stripping alpha for AI generation, or recombining generated textures with original alpha data.
wow-aio-plugin: API Definition for writing AIO plugins (which are lua plugins in the Wow WOTLK 3.3.5 client)
