documentation-generator
為程式碼生成文件
編寫文件需要大量時間且經常被忽視。此技能可自動建立 JSDoc、docstrings、README 檔案以及跨多種程式語言的 API 文件。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「documentation-generator」。 Document this function: function calculateTotal(basePrice, taxRate, discount = 0)
預期結果:
- 生成帶有 @param、@returns 和 @throws 標籤的 JSDoc 註解
- 包含所有參數的型別資訊
- 新增顯示輸入和輸出的使用範例
- 記錄錯誤條件
正在使用「documentation-generator」。 Create a README for my CLI tool
預期結果:
- 包含功能列表的完整專案概述
- npm 使用者的安裝說明
- 帶有命令語法的使用範例
- 記錄所有命令的 API 參考章節
安全審計
安全This is a pure prompt-based skill containing only documentation generation instructions for AI assistants. The static scanner flagged metadata fields (source URLs, content hashes), markdown code examples (backticks in code fences), and documentation keywords as security issues. All 30 findings are false positives - no executable code, network calls, command execution, or file system access exists in this skill.
風險因素
品質評分
你能建構什麼
為現有程式碼庫建立文件
為舊專案中未記錄的函式和方法新增全面的文件
建立專案文件
為公開儲存庫生成 README 檔案、API 參考和貢獻指南
標準化文件格式
確保專案中多種程式語言的文件風格一致
試試這些提示
Use the documentation-generator skill to generate JSDoc comments for the following JavaScript file:
@documentation-generator --format google-style Generate Python docstrings for this function with type hints and examples:
@documentation-generator --readme-only Create a complete README.md for my project including features, installation, usage, and API reference:
Use documentation-generator to document all functions in the src/utils/ directory. Apply appropriate format based on file extension (JSDoc for .js/.ts, Google style for .py, Rustdoc for .rs):
最佳實務
- 提供完整的函式簽章和參數型別以獲得準確的文件
- 分享有關邊界情況和效能考量的相關上下文
- 請求使用您現有的風格撰寫文件以保持程式碼庫的一致性
避免
- 為沒有註解或結構不清晰的程式碼請求文件
- 生成文件後未審查業務邏輯的準確性
- 使用此技能覆蓋精心撰寫的自訂文件