update-docs

📁 aleister1102/skills 📅 9 days ago
9
总安装量
7
周安装量
#31357
全站排名
安装命令
npx skills add https://github.com/aleister1102/skills --skill update-docs

Agent 安装分布

opencode 7
trae 6
cursor 6
kiro-cli 6
github-copilot 6

Skill 文档

Documentation Updates

Guides you through keeping documentation aligned with code changes. Use it whenever touched code requires corresponding updates in README/docs artifacts.

Quick Start

  1. Analyze changes: run update-docs/scripts/doc_impact.sh --base <base-ref> --head <head-ref>
  2. Inspect suggestions: confirm the mapped docs/README files and doc roots before editing
  3. Update docs: edit the identified files with the required behavior/config descriptions
  4. Validate: run the repo’s lint/build/check commands (see agents-md-generator/references/repo_detection_heuristics.md for clues)
  5. Commit: stage the doc files and describe the scope of the updates

Generic Workflow

Step 1: Understand the scope

  • Use git diff (or your repo’s equivalent) to highlight the code, config, and API changes that need documentation coverage.
  • Capture the affected packages/modules so you can trace their docs later.

Step 2: Identify documentation targets

  • Run update-docs/scripts/doc_impact.sh --base <base> --head <head> to list likely files and doc roots; review the candidate files before touching them.
  • Provide a custom mapping file via --map or place one under .codex/docs-mapping.* or docs/DOCS-MAPPING.* so the script can suggest precise targets.
  • Reference references/MAPPING_FORMAT.md when authoring or expanding your mapping file.

Step 3: Update the docs

  • Apply edits that clearly describe the change (behavior, API, config, migration) and keep prose aligned with the touched code.
  • Use references/GENERIC_TEMPLATES.md for boilerplate sections you can reuse, and track deliverables with references/GENERIC_CHECKLIST.md.
  • Refresh anchors, navigation entries, and related links that point to the updated docs.

Step 4: Validate and finalize

  • Execute whichever validation commands your repo uses (lint, tests, doc builds) and record them for future reference.
  • Rerun doc_impact.sh if you edited docs outside the original target set to make sure nothing blinded you.
  • Stage the updated files and include a brief description of what documentation now reflects.

Next.js Mode (optional)

When the repository contains packages/next/src + docs/01-app, the skill switches to Next.js-specific guidance:

  • doc_impact.sh loads references/CODE-TO-DOCS-MAPPING.md and the previous Next.js heuristics.
  • Validate with pnpm lint and update-docs/scripts/mdx_quick_check.sh <paths> to keep MDX conventions safe.
  • Use references/TEMPLATES.mdx and the MDX conventions in references/DOC-CONVENTIONS.md for shared App/Pages docs.
  • Update the App Router source when a Pages Router file uses a source: frontmatter value.
  • After correctness edits, run docs-cleaner if you discover duplications or overlapping guides.

References

  • references/GENERIC_CHECKLIST.md – Generic doc update checklist
  • references/GENERIC_TEMPLATES.md – Plain Markdown templates for change notes
  • references/MAPPING_FORMAT.md – How to author repo-specific mappings
  • references/TEMPLATES.mdx – Next.js templates + related-links snippet (Next.js mode)
  • references/DOC-CONVENTIONS.md – Next.js MDX/conventions reference (Next.js mode)
  • references/CODE-TO-DOCS-MAPPING.md – Next.js code→doc mapping table (Next.js mode)
  • agents-md-generator/references/repo_detection_heuristics.md – Discover repo commands and tool hints