AgentSkillsCN

update-docs

在实现新功能、调整行为,或修改公共 API 时使用。在 README 和相关文档中详细记录各项变更。

SKILL.md
--- frontmatter
name: update-docs
description: Use when implementing new features, changing behavior, or modifying the public API. Documents changes in README and relevant docs.
allowed-tools: [Read, Edit, Grep, Glob, Bash]

Documentation Update

Purpose

Ensure user-facing changes are properly documented across all relevant locations.

Trigger Conditions

  • Adding new public API methods or types
  • Changing existing behavior
  • Adding new features or capabilities
  • Modifying variable replacement rules
  • Making breaking changes

Documentation Locations

LocationPurposeUpdate Criteria
README.mdQuick reference, installation, usageMajor features, API changes
docs/user_guide.mdDetailed usage guideComplex features, tutorials
docs/api_reference.mdAPI documentationAll public API changes
docs/design_pattern.mdArchitecture docsStructural changes
docs/path_validation.mdPath validation rulesValidation behavior changes
.claude/CLAUDE.mdDevelopment guidelinesInternal workflow changes

Decision Matrix

code
Change Type → Documentation Scope
├── New public API (type, function, class)
│   ├── README.md: Brief mention with example
│   ├── docs/api_reference.md: Full signature and usage
│   └── mod.ts: Export and JSDoc comment
├── New feature
│   ├── README.md: Brief description
│   └── docs/user_guide.md: Detailed usage (if complex)
├── Behavior change
│   ├── README.md: Update existing description
│   └── CHANGELOG.md: Note the change
├── Variable system change
│   ├── README.md: Update template format section
│   └── docs/variables.ja.md / docs/type_of_variables.ja.md: Update design docs
└── Internal change
    └── .claude/CLAUDE.md: If affects development workflow

Process

  1. Identify what changed: git diff --name-only
  2. Categorize: API change? Feature? Behavior change?
  3. Update appropriate documentation locations
  4. Verify code examples in docs still work

Guidelines

  • Concise: One sentence per feature in README
  • Example-first: Show usage before explaining
  • Searchable: Include keywords users would search for

What NOT to Document

  • Internal implementation details (unless in design docs)
  • Temporary workarounds
  • Debug-only options