What are Agent Skills?
Web Quality Skills follows the Agent Skills specification - a standard format for packaging instructions that AI coding agents can load and execute. Think of skills as specialized instruction sets that teach agents how to perform specific tasks.Agent Skills are not traditional code libraries. They are instruction files that AI agents read to understand how to perform specialized tasks like auditing web quality, optimizing performance, or improving accessibility.
Skill Structure
Each skill follows a consistent directory structure designed for progressive disclosure:SKILL.md: The Core File
Every skill centers around aSKILL.md file with YAML frontmatter:
Why YAML frontmatter?
Why YAML frontmatter?
The frontmatter provides machine-readable metadata that agents use to:
- Identify the skill by name
- Understand when to activate it (via the description)
- Track versions and authorship
- Manage licensing
Scripts Directory
Thescripts/ directory contains executable automation scripts that:
- Use
#!/bin/bashshebang - Follow fail-fast behavior with
set -e - Write status to stderr, results to stdout
- Output machine-readable data (typically JSON)
- Script Structure
- Why Scripts?
References Directory
Thereferences/ directory contains detailed documentation:
- Individual files focused on single topics (< 200 lines each)
- Loadable independently by agents
- Include practical examples
- Link to authoritative sources
Progressive Disclosure Pattern
Web Quality Skills uses progressive disclosure to manage complexity:Keep SKILL.md Under 500 Lines
The main instruction file must be concise. This ensures agents can:
- Load skills quickly without consuming too much context
- Understand the core functionality at a glance
- Decide whether to load additional references
Move Details to References
Detailed explanations, edge cases, and extensive examples go in
references/:- Each reference file under 200 lines when possible
- Focused on a single topic
- Agents load them only when needed
How Skills Load into AI Agents
- CLI Tools
- claude.ai
- OpenCode
Real Examples from Web Quality Skills
Example 1: Core Web Vitals Skill
- Three metrics overview table
- Common issues and quick fixes for each metric
- Optimization checklists
- Debugging code snippets
- Framework-specific patterns
- Extensive optimization strategies
- Edge case handling
- Performance profiling techniques
- Advanced debugging approaches
Example 2: Web Quality Audit Skill
- Main file provides high-level audit structure
- References other skills for deep-dives
- Includes severity levels and prioritization
- Provides output format templates
Naming Conventions
Consistent naming helps agents discover and load skills correctly.
| Element | Convention | Examples |
|---|---|---|
| Skill directory | kebab-case | core-web-vitals, best-practices |
| Main file | UPPERCASE | SKILL.md (exact) |
| Scripts | kebab-case.sh | analyze-performance.sh, audit.sh |
| References | UPPERCASE.md | LCP.md, WCAG.md, FAQ.md |
Content Guidelines
When authoring skills, follow these patterns:Guidelines Format
Code Examples Format
Always show problem and solution:- Bad Example
- Good Example
Thresholds Format
Use tables for clarity:| Metric | Good | Needs improvement | Poor |
|---|---|---|---|
| LCP | ≤ 2.5s | 2.5s – 4.0s | > 4.0s |
| INP | ≤ 200ms | 200ms – 500ms | > 500ms |
| CLS | ≤ 0.1 | 0.1 – 0.25 | > 0.25 |
Framework Agnostic Design
Web Quality Skills work across all frameworks:- Show vanilla HTML/CSS/JS first
- Add framework notes in separate sections
- Never require a specific framework
- Use standard web APIs when possible