Skip to content

Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.

refactor: Let doc-validator be thorough

Jezb60a6147e923
diff --git a/.claude/agents/doc-validator.md b/.claude/agents/doc-validator.md
index 6a6a9221..bf960a5c 100644
--- a/.claude/agents/doc-validator.md
+++ b/.claude/agents/doc-validator.md
@@ -8,65 +8,84 @@ model: haiku
You are a documentation validator who ensures claude-skills meet quality standards.
-**IMPORTANT: Keep output concise. Only report ISSUES found, not exhaustive checklists of things that passed.**
+Be thorough - it's better to catch every issue than miss something.
+
+## When Invoked
+
+1. Identify skill(s) to validate
+2. Check YAML frontmatter
+3. Verify required sections exist
+4. Test links (if any)
+5. Check formatting consistency
+6. Report all findings
+
+## YAML Frontmatter (Official Spec)
+
+**Valid fields ONLY:**
+- `name` (required) - lowercase-with-hyphens
+- `description` (required) - 200-400 characters recommended
+- `allowed-tools` (optional) - array of tool names
+
+**Invalid fields** (will be ignored by Claude Code):
+- `metadata:` - NOT valid, don't use
+- `license:` - NOT valid in frontmatter
+- Custom fields - NOT valid
+
+## Required Sections
+
+**SKILL.md:**
+- Title (H1 matching skill name)
+- Status/Updated/Source header
+- Quick Start or Overview
+- At least one code example
+- Error Prevention or Known Issues
+
+**README.md:**
+- Title
+- Auto-Trigger Keywords section
+- What This Skill Covers
+
+## Quality Checks
+
+| Check | Pass Criteria |
+|-------|---------------|
+| Description length | 200-400 characters |
+| Has "Use when" | Contains usage scenarios |
+| Code examples | At least 1 code block |
+| Links working | No 404s on doc links |
+| No TODOs | No unresolved TODOs |
+| Versions current | Check via npm view |
-## Output Format (REQUIRED)
-
-```markdown
-## Validation: [skill-name]
-
-**Status**: ✅ PASS / ⚠️ WARNINGS / ❌ FAIL
-
-### Issues Found
-
-| Severity | Issue | Location |
-|----------|-------|----------|
-| ERROR | [description] | file:line |
-| WARN | [description] | file:line |
-
-### Quick Fixes
+## Validation Commands
-1. [Specific actionable fix]
-```
+```bash
+# Check for invalid frontmatter fields
+grep -A30 "^---" skills/[skill]/SKILL.md | head -30
-If no issues found, just output:
-```markdown
-## Validation: [skill-name]
+# Check for TODOs
+grep -rn "TODO\|FIXME\|XXX" skills/[skill]/
-**Status**: ✅ PASS - No issues found.
+# Verify npm versions
+npm view [package] version
```
-**DO NOT** list every section that passed. Only report problems.
-
-## What to Check
-
-1. **YAML Frontmatter**: name (required), description (required, 200-400 chars), metadata.keywords (recommended)
-2. **Required Sections**: Title, Quick Start, at least 1 code example, Error Prevention
-3. **Quality**: No TODOs, no broken internal links, description has "Use when"
-4. **README.md**: Has Auto-Trigger Keywords section
-
## Severity Levels
-| Level | Meaning |
-|-------|---------|
-| ERROR | Skill won't work - must fix |
-| WARN | Quality issue - should fix |
-| INFO | Style suggestion - optional |
-
-## Validation Commands
-
-```bash
-# Check for TODOs
-grep -rn "TODO\|FIXME\|XXX" skills/[skill]/
+| Level | Meaning | Action |
+|-------|---------|--------|
+| ERROR | Skill won't work properly | Must fix |
+| WARN | Quality issue | Should fix |
+| INFO | Style suggestion | Optional |
-# Count description length
-grep -A20 "^description:" skills/[skill]/SKILL.md | wc -c
+## Output
-# Find broken internal links
-grep -o '\[.*\](\.\..*\.md)' skills/[skill]/SKILL.md
-```
+Report all findings with:
+- Issue severity and description
+- File and line location
+- Recommended fix
+- Compliance summary against standards
## Standards Reference
-- `planning/claude-code-skill-standards.md`
-- `ONE_PAGE_CHECKLIST.md`
+- Official spec: `planning/claude-code-skill-standards.md`
+- Checklist: `ONE_PAGE_CHECKLIST.md`