Validate skill quality, completeness, and adherence to standards. Use before packaging to ensure skill meets quality requirements.
Single responsibility: Validate Claude skill packages for quality, completeness, and standards compliance before upload. (BP-4)
Before executing, VERIFY:
DO NOT validate without defining quality criteria.
ASK USER instead of guessing when:
NEVER auto-pass quality checks without proper validation.
| Context Type | Included | Excluded |
|---|---|---|
| RELEVANT | Skill directory, quality criteria | Other skills |
| PERIPHERAL | Quality examples for comparison | Source documentation |
| DISTRACTOR | Build process | Enhancement history |
| Dimension | Weight | Checks |
|---|---|---|
| Structure | 25% | Required files, directory layout |
| Content | 35% | SKILL.md completeness, references |
| Code Examples | 20% | Presence, syntax, relevance |
| Documentation | 20% | Clarity, navigation, completeness |
# Required files
SKILL_DIR="output/<skill-name>"
# Check SKILL.md
test -f "$SKILL_DIR/SKILL.md" && echo "ā
SKILL.md present" || echo "ā SKILL.md missing"
# Check references directory
test -d "$SKILL_DIR/references" && echo "ā
references/ present" || echo "ā references/ missing"
# Check at least one reference file
ls "$SKILL_DIR/references/"*.md >/dev/null 2>&1 && \
echo "ā
Reference files present" || echo "ā No reference files"
# Check for index
test -f "$SKILL_DIR/references/index.md" && \
echo "ā
Index present" || echo "ā ļø No index.md (recommended)"
SKILL_MD="output/<skill-name>/SKILL.md"
# Required sections
echo "=== Section Check ==="
grep -q "^# " "$SKILL_MD" && echo "ā
Title present" || echo "ā Missing title"
grep -q "^## Description\|^## Purpose" "$SKILL_MD" && echo "ā
Description present" || echo "ā Missing description"
# Recommended sections
grep -q "^## Quick Reference\|^## Overview" "$SKILL_MD" && echo "ā
Quick reference" || echo "ā ļø No quick reference"
grep -q "^## Code Examples\|^## Examples" "$SKILL_MD" && echo "ā
Examples section" || echo "ā ļø No examples section"
grep -q "^## Navigation\|^## Contents" "$SKILL_MD" && echo "ā
Navigation" || echo "ā ļø No navigation"
# Content quality
echo ""
echo "=== Content Metrics ==="
echo "Lines: $(wc -l < "$SKILL_MD")"
echo "Code blocks: $(grep -c '```' "$SKILL_MD")"
echo "Sections: $(grep -c '^## ' "$SKILL_MD")"
echo "Links: $(grep -oE '\[.*\]\(.*\)' "$SKILL_MD" | wc -l)"
SKILL_MD="output/<skill-name>/SKILL.md"
# Extract code blocks
echo "=== Code Examples ==="
example_count=$(grep -c '```' "$SKILL_MD")
echo "Total code blocks: $((example_count / 2))"
# Check for language tags
tagged=$(grep -c '```[a-z]' "$SKILL_MD")
echo "Language-tagged blocks: $tagged"
# Check code isn't just placeholders
placeholder_count=$(grep -E '```\n(# placeholder|// TODO|pass)\n```' "$SKILL_MD" | wc -l)
echo "Placeholder blocks: $placeholder_count"
# Minimum requirement: 3 real code examples
real_examples=$((example_count / 2 - placeholder_count))
if [ "$real_examples" -ge 3 ]; then
echo "ā
Sufficient code examples ($real_examples)"
else
echo "ā ļø Few code examples ($real_examples, recommend 3+)"
fi
REF_DIR="output/<skill-name>/references"
echo "=== Reference Files ==="
for file in "$REF_DIR"/*.md; do
if [ -f "$file" ]; then
lines=$(wc -l < "$file")
name=$(basename "$file")
if [ "$lines" -lt 10 ]; then
echo "ā ļø $name: $lines lines (sparse)"
else
echo "ā
$name: $lines lines"
fi
fi
done
# Total reference content
total_lines=$(cat "$REF_DIR"/*.md 2>/dev/null | wc -l)
echo ""
echo "Total reference content: $total_lines lines"
# Quality Report: <skill-name>
## Summary
- Overall Score: XX/100
- Status: PASS/WARN/FAIL
## Structure (25/25)
- [x] SKILL.md present
- [x] references/ directory
- [x] Reference files present
- [ ] Optional: scripts/, assets/
## Content (30/35)
- [x] Title present
- [x] Description clear
- [x] Quick reference
- [ ] FAQ section (missing)
## Code Examples (15/20)
- [x] 5 code examples
- [x] Language tags
- [ ] Example diversity (all Python)
## Documentation (18/20)
- [x] Navigation table
- [x] Links work
- [ ] Version info missing
## Recommendations
1. Add FAQ section based on common questions
2. Include examples in other languages
3. Add version/last updated info
On error:
File not found ā Check pathParse error ā Check file formatScript error ā Simplify validationState saved to: .aiwg/working/checkpoints/quality-checker/
checkpoints/quality-checker/
āāā structure_results.json
āāā content_results.json
āāā code_results.json
āāā docs_results.json
āāā final_report.md
| Level | Score | Action |
|---|---|---|
| PASS | 80-100 | Ready for packaging |
| WARN | 60-79 | Review recommendations |
| FAIL | <60 | Address issues before packaging |
{
"skill_dir": "output/myskill/",
"validation_level": "full",
"thresholds": {
"pass": 80,
"warn": 60
},
"requirements": {
"min_skill_md_lines": 100,
"min_code_examples": 3,
"min_reference_files": 2,
"require_navigation": true,
"require_faq": false
},
"output": {
"report_format": "markdown",
"save_report": true
}
}
| Level | Checks | Time |
|---|---|---|
| quick | Structure only | <5s |
| standard | Structure + content | <30s |
| full | All dimensions | <2m |
| strict | Full + extra rules | <5m |
Add custom rules via configuration:
{
"custom_rules": [
{
"name": "api_coverage",
"type": "grep",
"pattern": "^### .*\\(\\)",
"file": "references/api.md",
"min_matches": 10,
"message": "API reference should document at least 10 functions"
}
]
}
| Issue | Diagnosis | Solution |
|---|---|---|
| False positives | Rules too strict | Adjust thresholds |
| Missed issues | Rules too lenient | Use strict mode |
| Slow validation | Full mode on large skill | Use quick mode first |
| Parse errors | Malformed markdown | Fix source files |
doc-scraper ā skill-builder ā skill-enhancer ā quality-checker ā skill-packager
ā
[If FAIL: fix issues]
ā
[If WARN: review]
ā
[If PASS: package]
agentic/code/addons/writing-quality/