global/skills/doc-review/SKILL.md
Comprehensive markdown document review - anchors, accuracy, SSOT, cross-references, and redundancy analysis.
npx skillsauth add kcenon/claude-config doc-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive markdown document review with parallel agent analysis.
/doc-review # Review all docs (auto-detect directory)
/doc-review docs/reference # Specify docs directory
/doc-review --scope anchors # Anchor validation only
/doc-review --scope accuracy # Accuracy/consistency only
/doc-review --scope ssot # SSOT/redundancy only
/doc-review --scope all --fix # Full review with auto-fix
/doc-review --solo # Force solo mode (subagents)
/doc-review --team # Force team mode (Agent Teams)
/doc-review docs/ --scope all --fix --team # Full review, team mode, auto-fix
[docs-directory]: Path to documentation directory (optional)
docs/reference/ → docs/ → ./.md files are analyzed[--scope <phase>]: Limit review to a specific phase (optional)
anchors — Phase 1 only (anchor/link validation)accuracy — Phase 2 only (accuracy/consistency)ssot — Phase 3 only (SSOT/redundancy)all — All phases (default)[--fix]: Automatically apply fixes and commit (optional)
--fix: Report-only mode (no file modifications)--fix: Apply fixes → re-validate → commit[--solo|--team]: Execution mode override (optional)
--solo — Force solo mode (independent subagents, no coordination)--team — Force team mode (Agent Teams with shared task list)Parse $ARGUMENTS and extract directory, scope, and fix flag:
ARGS="$ARGUMENTS"
DOCS_DIR=""
SCOPE="all"
FIX_MODE=false
EXEC_MODE=""
# Extract flags
if [[ "$ARGS" == *"--fix"* ]]; then
FIX_MODE=true
ARGS=$(echo "$ARGS" | sed 's/--fix//g')
fi
if [[ "$ARGS" == *"--solo"* ]]; then
EXEC_MODE="solo"
ARGS=$(echo "$ARGS" | sed 's/--solo//g')
elif [[ "$ARGS" == *"--team"* ]]; then
EXEC_MODE="team"
ARGS=$(echo "$ARGS" | sed 's/--team//g')
fi
if [[ "$ARGS" =~ --scope[[:space:]]+([a-z]+) ]]; then
SCOPE="${BASH_REMATCH[1]}"
ARGS=$(echo "$ARGS" | sed -E 's/--scope[[:space:]]+[a-z]+//g')
fi
# Remaining argument is docs directory
DOCS_DIR=$(echo "$ARGS" | xargs)
# Auto-detect if not specified
if [ -z "$DOCS_DIR" ]; then
if [ -d "docs/reference" ]; then
DOCS_DIR="docs/reference"
elif [ -d "docs" ]; then
DOCS_DIR="docs"
else
DOCS_DIR="."
fi
fi
Determine whether to run in Solo mode (independent subagents) or Team mode (coordinated Agent Teams).
FILE_COUNT=$(find "$DOCS_DIR" -name "*.md" -type f | wc -l | xargs)
--solo or --team flag was providedSkip mode selection — use $EXEC_MODE directly.
Auto-recommend based on file count, then ask the user:
| File Count | Recommended Mode | Reason | |-----------|-----------------|--------| | 1-10 | Solo | Low coordination overhead | | 11+ | Team | Benefit from shared findings and coordinated review |
Use AskUserQuestion to present the choice:
$DOCS_DIR. Which execution mode?"Store the result in $EXEC_MODE (solo | team).
$EXEC_MODE == "solo" → Execute Solo Mode (subagent-based parallelism)$EXEC_MODE == "team" → Execute Team Mode (Agent Teams with coordination)Execute the document review workflow using independent subagents. Split files equally among agents based on file count.
Determine the number of parallel agents based on file count:
| File Count | Agents | Strategy | |-----------|--------|----------| | 1-5 | 1 | Single agent, all phases sequentially | | 6-15 | 2 | Split files evenly between 2 agents | | 16-30 | 4 | Split files evenly among 4 agents | | 31+ | 6 | Split files evenly among 6 agents |
Each agent receives its assigned file list and runs all applicable phases on those files. Use the Agent tool with subagent_type=general-purpose for each partition.
Scope: anchors or all
For each markdown file in the assigned partition:
Build anchor registry: Parse all headings to generate GitHub-style anchors
-1, -2 suffixes)Validate intra-file references: Check all ](#anchor) links against the file's own anchors
Validate inter-file references: Check all ](./file.md#anchor) and ](file.md#anchor) links
:)Report findings: For each broken reference, record:
Scope: accuracy or all
For each markdown file in the assigned partition:
Terminology consistency: Identify inconsistent use of key terms across documents
Fact checking: Flag statements that may be outdated or incorrect
Report findings: Classify each finding:
Scope: ssot or all
For each markdown file in the assigned partition:
SSOT declaration detection: Find explicit SSOT declarations
Redundancy detection: Find content that appears to duplicate another document's SSOT
Cross-reference completeness: Verify bidirectional cross-references
Report findings: Classify each finding:
Prerequisite: --fix flag must be set. If not set, skip this phase and output report only.
Edit tool
docs: fix N broken anchors, M cross-references, K redundancies
After all agents complete, aggregate results into a unified report.
See reference/team-mode.md for the complete team mode workflow with parallel agent analysis, including team architecture, task creation, teammate spawning (Analyzer/Fixer/Validator), workflow phases, cleanup, and fallback handling.
See _policy.md for common rules.
| Item | Rule |
|------|------|
| Scope | Only analyze .md files in the specified directory (recursive) |
| Code blocks | Always skip content inside fenced code blocks |
| Anchors | Use GitHub-compatible slug algorithm for anchor generation |
| Severity | Every finding must be classified as Must-Fix, Should-Fix, or Nice-to-Have |
| Commits | Commit messages in English, conventional commit format |
This skill runs in a forked context (context: fork) using the general-purpose agent — write access is required for --fix mode. The forked subagent does not see the calling conversation's history; operate entirely from the supplied arguments.
After completion, provide a structured review report:
## Document Review Report
| Metric | Value |
|--------|-------|
| Directory | $DOCS_DIR |
| Files analyzed | N |
| Execution mode | Solo / Team |
| Agents used | M |
| Scope | $SCOPE |
### Findings Summary
| Severity | Phase 1 (Anchors) | Phase 2 (Accuracy) | Phase 3 (SSOT) | Total |
|----------|-------------------|-------------------|----------------|-------|
| Must-Fix | A | B | C | A+B+C |
| Should-Fix | D | E | F | D+E+F |
| Nice-to-Have | G | H | I | G+H+I |
### Must-Fix Items
1. `file.md:42` — broken anchor `#nonexistent` → should be `#existing-heading`
2. ...
### Should-Fix Items
1. ...
### Nice-to-Have Items
1. ...
### Score
Overall: X.X/10 (Anchors: A/10, Accuracy: B/10, SSOT: C/10)
### Files Modified (--fix mode)
- file1.md (+3/-2)
- file2.md (+1/-1)
See reference/error-handling.md for prerequisite checks and runtime error handling.
development
Generate and validate the bidirectional traceability matrix linking requirements, design, code, tests, risk records, and standard clauses. Consumes docs/.index/{manifest,bundles,graph,router}.yaml plus an optional compliance/ directory and produces docs/.index/traceability.yaml (machine-readable) and docs/.index/traceability.md (human-readable). Read-mostly: writes only the two trace artifacts and never mutates source documents. Opt-in — no-op when docs/.index/graph.yaml is absent so non-regulated repos are unaffected.
development
Maintain a SOUP (Software Of Unknown Provenance) register for every third-party software item the project depends on. Discovers candidates from lockfiles (package-lock.json, go.sum, Cargo.lock, requirements.txt, pyproject.toml, pom.xml, packages.lock.json), enriches with human-supplied risk class and verification refs, validates against a license allow-list and the requirements catalogue, and emits a per-supplier report. Outputs docs/.index/soup.yaml plus docs/.index/soup.md. Subcommands: discover | enrich | validate | list | report. Bidirectional linking with traceability via the soup_ids[] field on requirement rows. Opt-in: no-op when no lockfile is detected and docs/.index/soup.yaml is absent. Atomic writes (*.tmp + rename); idempotent (records sorted by id). Implements IEC 62304 sections 5.3.3 (SOUP requirements) and 8.1.1 (configuration items).
devops
Parse sonarcloud[bot] PR comments, classify findings, codify whitelisted auto-fixes, escalate the rest.
testing
Manage Hazard and Risk records for projects on the regulated-industry track. Maintains a single normalized risk file (docs/.index/risk-file.yaml) holding hazard identification, initial and residual risk estimates, control measures with verification links, and bidirectional Risk<->Requirement linking via the requirements[] field. Subcommands: add | edit | evaluate | validate | list. Output is consumed by the traceability skill (matrix risk_ids[] field) and the evidence-pack skill (risk_file kind). Opt-in: no-op when docs/.index/manifest.yaml is absent so non-regulated repos are unaffected. Atomic writes via *.tmp + rename; idempotent for diffability. Implements ISO 14971 sections 5-9 operationally.