code-documentation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCode Documentation Skill
代码文档技能
Purpose
用途
This skill provides TSDoc format templates, type documentation guidelines, and maintenance workflows. Use this when:
- Writing or editing TSDoc comments for any function, type, or module
- Reviewing documentation quality
- Creating comprehensive API documentation
- Documenting complex type structures
- Cleaning up non-compliant comments (performance notes, timestamps, inline explanations)
- Synchronizing out-of-sync TSDoc with code changes
- Removing orphaned documentation for deleted code
Key Standard: No sections - tests and stories serve as living examples.
@example本技能提供TSDoc格式模板、类型文档指南以及维护流程。在以下场景中使用:
- 为任何函数、类型或模块编写或编辑TSDoc注释
- 评审文档质量
- 创建全面的API文档
- 记录复杂的类型结构
- 清理不符合规范的注释(如性能说明、时间戳、内联解释)
- 同步与代码变更不同步的TSDoc注释
- 删除已删除代码对应的孤立文档
核心标准:不使用章节——测试和示例代码可作为动态示例。
@exampleQuick Reference
快速参考
- Creating TSDoc: See workflow.md for the generation workflow
- Maintaining TSDoc: See maintenance.md for cleanup and sync guidelines
This skill contains detailed templates for:
- Public API Functions
- Internal Module Documentation
- Public and Internal Types
- Helper Functions
- Behavioral Programming Functions
- Special Annotations (Security, Performance, Deprecated)
- Type Documentation (Complex Objects, Unions, Functions, Utilities, Branded Types, etc.)
- 创建TSDoc:查看workflow.md了解生成流程
- 维护TSDoc:查看maintenance.md了解清理和同步指南
本技能包含以下内容的详细模板:
- 公共API函数
- 内部模块文档
- 公共与内部类型
- 辅助函数
- 行为编程函数
- 特殊注解(安全、性能、已废弃)
- 类型文档(复杂对象、联合类型、函数、工具类型、品牌类型等)
Navigation
导航
- workflow.md - TSDoc generation workflow (4 phases)
- maintenance.md - Comment policy, sync tasks, orphaned doc handling
- public-api-templates.md - Templates for public-facing APIs
- internal-templates.md - Templates for internal code and modules
- type-documentation.md - Comprehensive type documentation templates
- workflow.md - TSDoc生成流程(4个阶段)
- maintenance.md - 注释规范、同步任务、孤立文档处理
- public-api-templates.md - 面向外部的API模板
- internal-templates.md - 内部代码与模块模板
- type-documentation.md - 全面的类型文档模板
Related Skills
相关技能
- typescript-lsp: Use for type verification and discovery during documentation workflow. Essential for Phase 1 (type analysis) and Phase 2 (usage discovery) of the TSDoc generation process. Run to verify signatures,
lsp-hoverto find usages, andlsp-referencesto understand file structure.lsp-symbols
- typescript-lsp:在文档编写流程中用于类型验证和发现。是TSDoc生成流程中第1阶段(类型分析)和第2阶段(用法发现)的必备工具。运行验证签名,
lsp-hover查找用法,lsp-references了解文件结构。lsp-symbols