AgentSkillsCN

docs-check

在合并或发布前,对文档进行严格的质量把关。验证代码示例是否正常运行,链接是否有效,API 是否与实现完全匹配,以及各部分内容是否完整。适用于文档审计、文档 PR 审核,或当提及“验证”“质量门”“文档审计”“检查示例”等术语时。

SKILL.md
--- frontmatter
name: docs-check
description: Rigorous quality gate for documentation before merge or publish. Verifies code examples run, links resolve, APIs match implementation, and all sections are complete. Use when auditing docs, reviewing documentation PRs, or when "verify", "quality gate", "docs audit", or "check examples" is mentioned.
context: fork
agent: editor
metadata:
  version: "1.0.0"

Documentation Check

Rigorous quality gate for documentation. Focused on correctness, completeness, and comprehensiveness — not just voice and style.

Usage

code
/docs-check [focus]

Examples

code
/docs-check                              # Full quality gate
/docs-check focus on code examples       # Verify examples run
/docs-check check API completeness       # Parameter coverage
/docs-check are all links valid?         # Link check
/docs-check just the Quick Start         # Section-specific

Arguments

Focus: $ARGUMENTS

Use arguments to narrow the scope:

Argument TypeExampleBehavior
Section namejust the Quick StartAudit only that section
Quality dimensionfocus on correctnessPrioritize that checklist
Specific questionare the code examples runnable?Answer directly with evidence
None provided(empty)Run full checklist across all dimensions

Verification Checklist

Work through each dimension. For each item, document: PASS/FAIL + evidence.

Correctness (accuracy)

CheckHow to Verify
Code examples runExtract and execute each example. Report errors verbatim.
API signatures matchCompare documented signatures against source code.
Links resolveCheck each link target exists (relative paths, anchors, URLs).
Technical claims accurateCross-reference against implementation or authoritative source.
Versions currentVerify version numbers match package.json, Cargo.toml, etc.

Completeness (nothing missing)

CheckHow to Verify
Required sections presentCompare against applicable template (README, API ref, guide).
Parameters documentedEach param has: type, purpose, constraints, default value.
Error scenarios coveredDocument what happens when things go wrong.
Edge cases addressedEmpty inputs, nulls, boundaries, concurrent access.
Success and failure examplesShow both happy path and error handling.

Comprehensiveness (depth)

CheckHow to Verify
Common use casesList 3-5 typical scenarios; verify each is addressed.
Migration pathsBreaking changes include upgrade instructions.
Cross-referencesRelated docs linked where helpful.
Agent-friendlyStructured for AI consumption (clear headers, examples).
TroubleshootingCommon issues and solutions documented.

Execution

  1. Identify target — What documentation is being checked?
  2. Run checks — Work through the checklist, executing verification steps
  3. Collect evidence — Note specific line numbers, error messages, missing items
  4. Classify issues — Blocking (must fix) vs. suggestions (nice to have)
  5. Report — Structured output per format below

Output Format

markdown
# Documentation Check: {doc-name}

**Verdict**: PASS | NEEDS WORK | BLOCKED
**Blocking issues**: {count}
**Suggestions**: {count}

## Blocking Issues (must fix)

1. **{Check name}**: {Issue description}
   - Location: {file:line or section}
   - Evidence: {error message, mismatch, etc.}
   - Fix: {specific action to resolve}

## Suggestions (nice to have)

1. {Improvement with rationale}

## Passed Checks

- {List of checks that passed}

## Summary

{One sentence: ready to publish or what must be addressed first}

When to Use

  • Before merging documentation PRs
  • Before publishing READMEs to new packages
  • Quarterly documentation audits
  • After major feature changes

Relationship with docs-review

For combined voice/style and technical verification, load both this skill and the internal:docs-review skill.

Dimensiondocs-reviewdocs-check
FocusVoice, style, structureCorrectness, completeness
Question"Does it sound right?""Is it accurate and complete?"
ApproachSubjective assessmentObjective verification
OutputEditorial feedbackPass/fail with evidence
SpeedQuick passThorough audit

When to use each:

  • docs-review — Polishing prose, checking tone, improving flow
  • docs-check — Quality gate before merge, verifying technical accuracy
  • Both — Full documentation audit (load both skills)