AgentSkillsCN

document

更新文档、README文件,并补充JSDoc/TypeDoc注释。

SKILL.md
--- frontmatter
name: document
description: Update documentation, READMEs, and add JSDoc/TypeDoc.

Document Skill

User-centric documentation and technical writing.

When to Activate

This skill is relevant when:

  • Code changes require documentation updates
  • Public APIs need documentation
  • README needs updating
  • Adding inline code comments
  • Creating technical guides
  • Updating architecture docs

Core Principles

Clarity

  • Explain why, not just what
  • Write for the target audience
  • Use clear, simple language
  • Avoid jargon where possible
  • Provide context and rationale

Accuracy

  • Code changes reflected in docs immediately
  • Keep documentation in sync with code
  • Verify all examples work
  • Update outdated sections
  • Test documentation accuracy

Completeness

  • No public API left undocumented
  • Cover all user-facing features
  • Document edge cases and limitations
  • Include examples and use cases
  • Provide troubleshooting guidance

User-Centric

  • Write for developers using the code
  • Consider different skill levels
  • Provide practical examples
  • Answer common questions
  • Make it easy to get started

Quick Checks

For documentation updates, verify:

  • README "Getting Started" is current
  • Public functions have JSDoc/TypeDoc
  • API documentation is complete
  • Code examples are tested and working
  • Architecture descriptions are accurate
  • Diagrams reflect current state
  • Links are valid and working
  • Markdown renders correctly
  • Complex logic has inline comments
  • Breaking changes documented
  • Migration guides provided
  • Configuration options documented
  • Environment variables listed
  • Dependencies documented
  • Changelog updated

Documentation Types

README

  • Getting Started guide
  • Installation instructions
  • Basic usage examples
  • Configuration overview

API Documentation

  • Function signatures
  • Parameter descriptions
  • Return value documentation
  • Usage examples

Inline Documentation

  • JSDoc/TypeDoc comments
  • Complex logic explanations
  • Algorithm descriptions
  • Edge case notes

Architecture Documentation

  • System design
  • Component relationships
  • Data flow diagrams
  • Technical decisions