Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
hylarucoder avatar

Hai Audit Docs Against Code

  • 6 installs
  • 277 repo stars
  • Updated June 11, 2026
  • hylarucoder/hai-stack

Audits README and docs against the actual code, config, schemas, and API contracts, producing a severity-ranked report of stale or mismatched claims.

About

Finds stale or implementation-inconsistent doc claims backed by evidence from source, config, and contract files, ranked P0-P3. A developer uses it to verify docs still match the code after a rename or refactor.

  • Runs both docs-to-code and code-to-docs directions
  • Treats contracts (OpenAPI, schema, types) as strongest source of truth

Hai Audit Docs Against Code by the numbers

  • 6 all-time installs (skills.sh)
  • +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #1,205 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hylarucoder/hai-stack --skill hai-audit-docs-against-code

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs6
repo stars277
Last updatedJune 11, 2026
Repositoryhylarucoder/hai-stack

What it does

Audits README and docs against the actual code, config, schemas, and API contracts, producing a severity-ranked report of stale or mismatched claims.

Files

SKILL.mdMarkdownGitHub ↗

Hai Audit Docs Against Code

For Chinese readers, see SKILL.zh_CN.md. The English SKILL.md is the execution source of truth.

Overview

Find stale or implementation-inconsistent claims in README and documentation, each backed by evidence from source code, configuration, schemas, API contracts, or generated types. The audit runs in both directions — docs-to-code and code-to-docs — and reports findings as a severity-ranked list, not prose.

Core Principles

1. Code is truth: when documentation conflicts with implementation, source code, configuration, and contract files win. 2. Contracts first: OpenAPI, protobuf, GraphQL schema, database schema, and TypeScript types are strong sources of truth — prefer them over hand-written prose. 3. Tighten safety defaults: security, permissions, sandboxing, privacy, billing, and destructive operations get elevated severity (see Severity table). 4. Evidence before judgment: every issue needs a concrete doc location and a concrete code/config/contract reference — operationalized in the Workflow. 5. Audit by scenario: organize around real user/developer/operator scenarios, not file-by-file scavenging — operationalized in the Workflow. 6. Explain the repair value: every fix states the benefit (reduced misuse, smoother onboarding, fewer failed integrations) — a required per-issue field.

Workflow

1. Enumerate the documentation surface.

  • When the user names targets — a single file or any batch of files — audit exactly those.

Do not widen the scope to sibling docs or a whole directory uninvited.

  • Only when no target is given, default to the standard surface: root README, docs/**/*.md,

API docs, examples, setup guides, generated docs.

  • Contract files: OpenAPI, protobuf, GraphQL schema, database schema, and TS types.

2. Define audit themes.

  • Extract 3-8 concrete scenarios from the README, docs, APIs, and configuration (quickstart setup, API integration, environment configuration, permissions/security, lifecycle states, domain entities).
  • Group issues by theme; use a general documentation-hygiene bucket only when no theme fits.

3. Review each document (docs-to-code), driven by references/checklist.md.

  • Use the checklist to extract important claims: behavior, commands, defaults, fields, API endpoints, permissions, examples, lifecycle states, configuration.
  • Search the codebase for the matching implementation or contract.
  • Classify mismatches: missing feature, renamed concept, changed behavior, outdated default, broken command, stale example, wrong API shape, or unsupported claim.
  • Record each issue with the per-issue fields under Output.

4. Cross-check from implementation back to docs (code-to-docs), also driven by references/checklist.md.

  • Use contract files, configuration, routes, CLI definitions, public types, and tests to find user-facing behavior that docs omit or describe incorrectly.
  • Prioritize omissions that cause setup failure, integration failure, unsafe operation, or wrong mental models.

5. Produce the audit.

  • Assemble findings into the report; keep uncertain findings as "needs evidence" rather than overstating them.
  • Read references/output-template.md and fill it in before finalizing.

Severity

LevelMeaningExample
P0Security issue or severe misleading claimDocs say sandboxing is enabled but code does not enforce it
P1Core workflow mismatchFollowing docs causes setup, API use, or execution to fail
P2Incomplete example, naming mismatch, or stale non-blocking detailDocs use an old field name
P3Minor wording, formatting, or link issueBroken low-impact link
Needs evidenceSuspicion without enough proofRequires further investigation

Elevate severity by at least one level when the claim touches security, permissions, sandboxing, privacy, billing, or destructive operations — a wrong claim there is more dangerous than elsewhere.

Output

Each issue carries: severity, document location, implementation/config/contract evidence, impact, minimal suggested fix, repair value, and related principle. End with a summary verdict (pass / conditional pass / fail), counts by severity, and a recommended fix order.

The full report shape — issue fields, summary verdict table, and worked examples — lives in references/output-template.md. Read it and fill it in before finalizing; do not invent a second schema.

Parallelization

If scope is large, split work by documentation type (README / API docs / setup docs / guides), module or feature area, or direction (docs-to-code and code-to-docs). When combining parallel audits, deduplicate issues and normalize severity.

Use a different skill when

  • The comparison is doc-vs-doc with no codebase as truth source (internal contradictions, stale sections, duplication) — use hai-audit-docs-internally.
  • You are auditing entity/data-model fields against a PRD (which fields exist, store-vs-compute, column-vs-config) — use entity-model-auditor.
  • The document has drifted from the discussion conclusions and the user wants it rewritten, not a mismatch report — use hai-rewrite-doc.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.