docs-sync-audit

软件研发 安全与合规 2 文件 EN 原文 1 脚本

Run a read-only documentation drift audit for a

Run a read-only documentation drift audit for a feature, PR, branch, release, API, configuration change, workflow, CLI, package, or repository area. Use when the user asks whether docs are stale, missing, inconsistent with code, or need updates after code changes. Checks README files, setup guides, API docs, env docs, changelogs, examples, comments, generated docs, and user-facing instructions. This is not a general code review; it compares what the docs claim against what the code does.

说明语言:英文

来源githubawesome-copilot ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/github/awesome-copilot --skill docs-sync-audit

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: docs-sync-audit description: Run a read-only documentation drift audit for a feature, PR, branch, release, API, configuration change, workflow, CLI, package, or repository area. Use when the user asks whether docs are stale, missing, inconsistent with code, or need updates after code changes. Checks README files, setup guides, API docs, env docs, changelogs, examples, comments, generated docs, and user-facing instructions. This is not a general code review; it compares what the docs claim against what the code does. license: MIT ---

Docs Sync Audit

Check whether documentation still matches the code, configuration, API behavior, commands, examples, and user workflows. Report stale or missing docs with concrete evidence and update direction.

Core Rules

Inputs

Accept any docs-sync target, including:

If scope is unclear, infer the smallest useful boundary and state it. If no scope is stated, do not ask for one; proceed with a full-repo docs audit. Ask only when different scopes would produce materially different doc checks.

Discovery Workflow

  1. Establish source of truth.
  2. Check git status --short.
  3. For PR/branch audits, identify the base and changed files when possible.
  4. Locate manifests, scripts, routes, configs, schema files, migrations, API handlers, CLI entrypoints, env validation, generated-doc sources, and tests that reveal expected behavior.
  1. Locate related documentation.
  2. Search README files, docs folders, API docs, OpenAPI/Swagger specs, changelogs, setup guides, deployment docs, env examples, examples, fixtures, comments, storybook/docs pages, package docs, and runbooks.
  3. Include docs near the feature and docs users would reasonably consult first.
  4. For generated docs, locate the source file, generator command, committed output, and any docs build or codegen step before deciding where updates belong.
  1. Compare code and docs.
  2. Run the bundled scripts/docs_drift.py first when it is available. It checks only claims with a definite answer: documented npm run scripts and make targets against the ones that exist, relative Markdown links against the filesystem, and environment variable names in both directions between docs and code. The path is relative to this skill's own directory, which varies by host. Use python if python3 is not on PATH.
  3. python <skill-dir>/scripts/docs_drift.py --top 30, or --format json to filter results yourself.
  4. It flags a documented setting that is read only inside a module nothing imports, which is config that reads as working but cannot take effect. Confirm the module really is unreachable before reporting it: the check uses name matching and cannot see dynamic imports.
  5. Add --check-paths only when you want backticked paths checked too. It is off by default because most such references are ambiguous, and on a large repo the noise buries the real findings. Read its output as leads, not findings.
  6. The script never judges prose. Wording, completeness, and whether an explanation is actually correct are your job, and are usually where the important drift is.
  7. Commands/scripts: names, arguments, package manager, working directory, prerequisites, outputs.
  8. APIs: routes, methods, auth requirements, request/response shape, status codes, errors, pagination, webhooks, versioning.
  9. Config/env: required vars, defaults, examples, secrets, feature flags, deployment settings.
  10. UI/workflows: screens, labels, steps, permissions, roles, states, screenshots, examples.
  11. Data/schema: fields, migrations, enums, limits, constraints, seed data, import/export formats.
  12. Tests/examples: sample code, fixtures, SDK usage, curl examples, screenshots, expected outputs.
  1. Verify safely.
  2. Run low-risk commands that reveal docs/source mismatch when available: docs build, link check, typecheck examples, OpenAPI generation, CLI help, package scripts, or focused tests.
  3. Do not install dependencies or regenerate large docs unless the user asks or the repo clearly expects it.
  4. Never run a command that writes into the repository as a side effect. python -m compileall and py_compile emit .pyc files, formatters rewrite sources, and installers touch lockfiles. .pyc output is usually gitignored, so git status will look clean while the tree has in fact been modified. Prefer checks that write nothing, and if a language offers no read-only check, say so under checks skipped.
  5. Record checks run and checks skipped.

What To Look For

Severity Rubric

Evidence Standards

Report Format

Use this structure unless the user asks otherwise:

**Docs Sync Audit: <scope>**

No code changed. I compared <source/code/change scope> against <docs checked>. <verification summary>. No P0s found / P0s found: <count>.

1. **P1: <finding title>.**
   Drift: <what docs say or omit vs what code/config does>.
   Impact: <who is misled or blocked>.
   Evidence: source `<path>:<line>`; docs `<path>:<line>`.
   Suggested update: <specific docs change direction>.

2. **P2: <finding title>.**
   Drift: <what is stale/missing>.
   Impact: <why it matters>.
   Evidence: source `<path>:<line>`; docs `<path>:<line>` or expected docs area.
   Suggested update: <specific direction>.

**Likely Docs To Update**
- `<path>`: <why>

**Surveyed But Not Deeply Inspected**
- <For full-repo audits only: surfaces that were inventoried but not inspected deeply this pass, and which to run next. Omit this section entirely for scoped audits.>

**Checks Run**
- `<command>`: <result>

**Not Tested**
- <docs build, link check, generated-doc rebuild, or external-doc gaps and why; state residual risk when generated output was not rebuilt>

**Assumptions**
- <only include if useful>

If no drift is found, say that clearly and list residual risks such as generated docs not rebuilt, docs build/link checks not run, or external docs not accessible.

Post-Audit Update Workflow

When the user asks to update docs:

Related Skills

This skill is one of seven review skills that share a single report contract: every finding carries a P0-P3 severity and a path:line you can open. test-gap-audit is the other one in this repository. The remaining five cover launch readiness, security, repo structure, improvement ideas, and pull request communication, at https://github.com/specialone0007/review-skills.

Agent Portability Notes

同类技能
api-securityapk-reverseattack-chainattack-tree-constructionaudit-integrityauth-implementation-patternsbinary-diffbinary-ninja-reverse
本页内容来自开源项目 github, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。