技能 api-documentation
📝

api-documentation

安全

生成 API 文件

也可從以下取得: CuriousLearner

這個工作流程協助開發人員建立完整的 API 文件,引導他們完成 OpenAPI 規格建立、開發人員指南撰寫、程式碼範例生成以及互動式文件設定。

支援: Claude Codex Code(CC)
🥉 72 青銅
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「api-documentation」。 使用 @api-documentation 工作流程為我的使用者管理 API 建立文件

預期結果:

我將引導您完成 7 個階段的完整 API 文件建立:

**第 1 階段:API 探索**
- 盤點您的端點
- 記錄請求/回應格式
- 識別驗證需求

[引導每個階段的具體動作]

正在使用「api-documentation」。 為我的電子商務 API 建立 OpenAPI 規格

預期結果:

這是您的 OpenAPI 規格結構:

```yaml
openapi: 3.0.0
info:
title: E-Commerce API
version: 1.0.0
paths:
/products:
get:
summary: List products
responses:
200:
description: Successful response
```

安全審計

安全
v1 • 2/24/2026

Security analysis confirms this is a safe documentation workflow skill. The static analyzer flagged 28 instances of 'external_commands' (Ruby/shell backtick execution) and 9 instances of 'weak cryptographic algorithms', but both are false positives. The backticks in the file are Markdown code spans (e.g., `api-documenter`) used for skill name references, not shell command execution. No actual security risks were identified.

1
已掃描檔案
165
分析行數
2
發現項
1
審計總數
中風險問題 (2)
False Positive: Markdown Code Spans Flagged as Shell Commands
Static analyzer detected 'Ruby/shell backtick execution' at 28 locations, but these are Markdown inline code formatting (backticks around skill names like `api-documenter`), not shell command substitution. This is a false positive.
False Positive: Cryptographic Algorithm Detection
Static analyzer flagged 9 instances of 'weak cryptographic algorithm', but this skill is a documentation workflow with no cryptographic operations. Likely triggered by pattern matching on the word 'api' or YAML content.
審計者: claude

品質評分

38
架構
100
可維護性
87
內容
50
社群
95
安全
83
規範符合性

你能建構什麼

新 API 專案文件

從頭開始為新的 REST API 建立完整文件,包括 OpenAPI 規格、開發人員指南和互動式文件。

舊版 API 文件更新

更新並現有化現有的 API 文件,包括 OpenAPI 規格、程式碼範例和互動式試用功能。

內部 API 入口網站建立

為內部團隊建立內部 API 入口���站,包含完整的文件、程式碼範例和整合指南。

試試這些提示

開始建立 API 文件
使用 @api-documentation 工作流程為我的 REST API 建立文件。我有端點清單,需要協助產生 OpenAPI 規格和開發人員指南。
產生 OpenAPI 規格
使用 @api-documentation 為我的 API 建立 OpenAPI 規格。此 API 透過 JWT 進行驗證,並包含使用者、產品和訂單的端點。
新增程式碼範例
使用 @api-documentation 工作流程為我的現有 API 文件新增程式碼範例。我需要 Python、JavaScript 和 cURL 的範例。
設定互動式文件
使用 @api-documentation 為我的現有 OpenAPI 規格設定 Swagger UI 和 Redoc 的互動式文件。設定試用功能。

最佳實務

  • 在產生文件之前,先從 API 探索開始以了解所有端點
  • 使用自動化讓 OpenAPI 規格與實際 API 變更保持同步
  • 測試所有程式碼範例以確保在生產環境中正常運作

避免

  • 略過探索階段,直接跳到文件產生
  • 在未驗證 API 規格準確性的情況下產生文件
  • 建立 API 變更時永不更新的靜態文件

常見問題

這個工作流程會呼叫哪些技能?
這個工作流程會呼叫 api-documenter、openapi-spec-generation、api-documentation-generator、docs-architect 等技能來執行特定的文件任務。
我需要安裝其他技能嗎?
是的,某些階段需要您的技能庫中具備其他技能,例如 api-documenter、openapi-spec-generation 和 documentation-templates。
這個工作流程可以為 GraphQL API 產生文件嗎?
這個工作流程是針對具有 OpenAPI 規格的 REST API 進行最佳化。GraphQL 支援需要調整或額外的技能。
如何讓我的 API 文件保持最新?
第 7 階段涵蓋了自動化設定,包括驗證和監控。您可以設定 webhook 以在 API 變更時觸發文件重新建置。
這個工作流程支援哪些輸出格式?
工作流程會產生 OpenAPI(YAML/JSON)、Markdown 開發人員指南、多種語言的程式碼範例,並設定 Swagger UI 或 Redoc 用於互動式文件。
我可以自訂文件範本嗎?
是的,您可以修改工作流程階段和提示以符合您組織的文件標準和品牌需求。

開發者詳情

檔案結構

📄 SKILL.md