AgentSkillsCN

docs-check

分析 Git diff,识别需要更新文档的代码变更。对变更进行分类(数据库/架构、API 端点、组件、配置、身份验证),并推荐相关文档文件供查阅。适用场景包括:(1) 在完成代码变更后;(2) 在提交重大变更前;(3) 在新增功能或修改 API 时;(4) 在准备 PR 时;(5) 在处理数据库架构、API 路由、组件或配置文件时;(6) 为确保文档与代码变更保持同步;(7) 用于文档同步与维护;(8) 用于提交前的文档检查。触发条件:check docs、docs check、documentation check、update docs、sync documentation、what docs need updating、check if docs are up to date、after code changes、before committing。

SKILL.md
--- frontmatter
name: docs-check
description: "Analyze git diff to identify code changes requiring documentation updates. Categorizes changes (database/schema, API endpoints, components, configuration, authentication) and suggests relevant documentation files to review. Use when: (1) After making code changes, (2) Before committing significant changes, (3) When adding new features or modifying APIs, (4) During PR preparation, (5) When working with database schemas, API routes, components, or configuration files, (6) To ensure documentation stays synchronized with code changes, (7) For documentation sync and maintenance, or (8) For pre-commit documentation checks. Triggers: check docs, docs check, documentation check, update docs, sync documentation, what docs need updating, check if docs are up to date, after code changes, before committing."
metadata:
  author: ai-dev-atelier
  version: "1.0"

Documentation Check

Tools

  • ada::docs:check - Analyzes git diff and suggests documentation updates

What It Detects

The tool categorizes changes and suggests relevant documentation files:

  • Database/Schema changes → suggests .docs/db/ files
  • API changes → suggests .docs/api/ and .docs/workflow/ files
  • Component/UI changes → suggests component documentation
  • Configuration changes → suggests setup/install documentation
  • Authentication changes → suggests auth documentation
  • Test changes → suggests test documentation
  • And more...

Workflow

  1. Run check: bash skills/docs-check/scripts/check-docs.sh (or --verbose for details)

    • Analyzes git diff for code changes requiring documentation updates
  2. Review output: Categorized changes with suggested documentation files

  3. Validate structure: Read references/documentation-guide.md to verify existing docs follow standards

  4. Update documentation: Use skills/docs-write/SKILL.md workflow, reference references/documentation-guide.md for requirements

  5. Verify: Re-run check until all suggestions addressed

Integration with Other Skills

  • Run after ada::code-review to check if reviewed changes need documentation
  • Run before ada::code-quality finalization to ensure docs are updated with code
  • Use during PR preparation to ensure documentation is complete

Examples

Example 1: Basic Usage

bash
bash skills/docs-check/scripts/check-docs.sh

Example 2: Verbose Mode

bash
bash skills/docs-check/scripts/check-docs.sh --verbose

References

REQUIRED READING: Always load references/documentation-guide.md to:

  1. Validate existing documentation - Check if suggested docs follow correct structure, style, and alignment
  2. Guide updates - Reference standards when writing or updating documentation

The guide contains all standards, examples, patterns, and requirements. Do not make assumptions about documentation format, style, or structure - always reference the guide.

  • Documentation Guide: references/documentation-guide.md - REQUIRED: Complete documentation standards, style, structure, and examples. Load this file to validate existing docs and guide updates.
  • docs-write skill: skills/docs-write/SKILL.md - Complete workflow for writing/updating documentation

Output

The tool outputs:

  • Changed code files organized by category
  • Suggested documentation files to review
  • Guidance on what needs to be updated

Best Practices

  • Run this check before committing significant changes
  • Always load references/documentation-guide.md to validate documentation structure and alignment
  • Verify existing documentation follows guide standards (style, structure, format) - not just detect what needs updating
  • Review the Documentation Guide to understand what changes require documentation
  • Update documentation in the same PR as code changes
  • Fix structure/alignment issues when updating content
  • Use the verbose mode for more detailed information