Quick Documentation Lint
Perform a fast lint check on a single documentation file.
Instructions
Read the specified file using the Read tool
Check frontmatter (first priority):
Required fields:
- title: string (non-empty)
- category: string (non-empty)
- tags: array (at least one tag)
- order: integer (>= 0)
Check markdown basics:
- Exactly one H1 header
- H1 appears before any other content (after frontmatter)
- No skipped header levels
- Code blocks have language tags
Check line length:
- Flag lines > 100 characters
- Ignore: URLs, code blocks, tables
Check naming:
- Filename should be kebab-case
- No uppercase letters
- No underscores
Output Format
Use a compact, scannable format:
## Lint: docs/guides/my-doc.md
[PASS] Frontmatter valid
[PASS] Single H1 header
[FAIL] Line 23: exceeds 100 chars (142)
[FAIL] Line 45: code block missing language
[WARN] Line 67: H4 after H2 (skipped H3)
Result: 2 errors, 1 warning
Or for passing files:
## Lint: docs/guides/my-doc.md
All checks passed!
Checks Performed
| Check |
Severity |
Description |
| Frontmatter exists |
ERROR |
Must have YAML frontmatter |
| Required fields |
ERROR |
title, category, tags, order |
| Single H1 |
ERROR |
Exactly one # header |
| Header hierarchy |
WARN |
No skipped levels |
| Code language |
ERROR |
All ``` blocks need language |
| Line length |
WARN |
Lines > 100 chars |
| Filename format |
WARN |
Must be kebab-case |
Example Usage
/doc-lint docs/guides/getting-started.md
/doc-lint example/api/authentication.md