Agent skill
frontmatter-validation
Validate YAML frontmatter in documentation against template requirements. Use when creating or editing docs, or when the user asks to check frontmatter.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/frontmatter-validation
SKILL.md
Frontmatter Validation Skill
Purpose: Validate YAML frontmatter in documentation against template requirements. Ensures consistency across all docs.
Trigger
When: Any .md file in docs/ is saved or created
Context Needed: Document content, template for document_type
MCP Tools: mcp_payment-syste_query_docs_by_type, read_file
Required Fields
All documents MUST have:
---
document_type: "[type]" # REQUIRED
module: "[module]" # REQUIRED
status: "[status]" # REQUIRED
version: "X.Y.Z" # REQUIRED
last_updated: "YYYY-MM-DD" # REQUIRED
author: "@username" # REQUIRED
keywords:
- "[keyword1]" # REQUIRED (5-10)
related_docs: # REQUIRED (can be empty)
database_schema: ""
api_design: ""
ux_flow: ""
---
Document Types → Templates
| document_type | Template | Extra Fields |
|---|---|---|
general |
00-GENERAL | doc_metadata |
feature-design |
01-FEATURE | feature_metadata |
adr |
02-ADR | adr_metadata |
database-schema |
03-DATABASE | database, schema_stats |
api-design |
04-API | api_metadata |
sync-strategy |
05-SYNC | sync_metadata |
ux-flow |
06-UX | ux_metadata |
testing-strategy |
07-TESTING | testing_metadata |
deployment-runbook |
08-DEPLOYMENT | deployment_metadata |
security-audit |
09-SECURITY | security_metadata |
Status Values
status: "draft" # Work in progress
status: "in-review" # Under review
status: "approved" # Ready for use
status: "deprecated" # No longer valid
Validation Rules
- Type Check:
document_typemust match valid types - Date Format:
last_updatedmust be ISO date (YYYY-MM-DD) - Version Format:
versionmust be semver (X.Y.Z) - Keywords: At least 5 keywords required
- Author: Must start with
@ - Related Docs: Paths must exist or be empty string
Auto-Fix Suggestions
When validation fails, suggest:
- Missing fields with defaults
- Date format corrections
- Path corrections for related_docs
Example Output
{
"valid": false,
"errors": [
{
"field": "last_updated",
"message": "Invalid date format",
"suggestion": "2026-01-26"
}
],
"warnings": [
{ "field": "keywords", "message": "Only 3 keywords, recommend 5-10" }
]
}
Reference
- DOCUMENTATION-WORKFLOW.md
- docs/templates/
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?