المهارات api-documentation-generator
📚

api-documentation-generator

آمن ⚙️ الأوامر الخارجية🌐 الوصول إلى الشبكة

从 API 路由生成 OpenAPI 文档

متاح أيضًا من: sickn33

手动创建 API 文档需要花费数小时的工作。此技能可自动分析 Express、FastAPI、NestJS、Flask 和 Rails 路由文件,生成包含模式、参数和响应的完整 OpenAPI 3.0 规范。

يدعم: Claude Codex Code(CC)
📊 70 كافٍ
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "api-documentation-generator". 为我的 Express API 路由生成 OpenAPI 文档

النتيجة المتوقعة:

  • 生成了包含 3 个标签下 12 个端点的 openapi.yaml
  • 创建了模式:User、CreateUserRequest、Product、Order
  • 添加了身份验证方案:BearerAuth (JWT) 和 ApiKeyAuth
  • 包含了错误响应:400、401、404、500
  • 保存到:/project/openapi.yaml

استخدام "api-documentation-generator". 为我的 FastAPI 后端创建 API 文档

النتيجة المتوقعة:

  • 分析了 routes/users.py 和 routes/products.py 中的 8 个端点
  • 提取了 UserResponse、ProductCreate 的 Pydantic 模型
  • 生成了包含分页参数的 OpenAPI 3.0 规范
  • 添加了 401 和 422 错误响应定义

التدقيق الأمني

آمن
v5 • 1/16/2026

This is a prompt-based documentation skill with no executable code. It provides instructions for generating OpenAPI documentation and includes template files and examples. All static findings are false positives triggered by documentation patterns (HTTP method names, API endpoint syntax, and security concept references). No network access, no file system manipulation beyond normal AI operations, and no data collection.

4
الملفات التي تم فحصها
737
الأسطر التي تم تحليلها
2
النتائج
5
إجمالي عمليات التدقيق
تم تدقيقه بواسطة: claude عرض سجل التدقيق →

درجة الجودة

38
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
21
المجتمع
100
الأمان
91
الامتثال للمواصفات

ماذا يمكنك بناءه

记录 REST API

从 Express、FastAPI 或 NestJS 路由定义自动生成 OpenAPI 规范,供 API 使用者使用。

创建 API 参考文档

将代码库路由文件转换为 Swagger UI 就绪的文档,无需手动编写规范。

生成 API 契约

为 API 网关配置和集成测试创建标准化的 OpenAPI 规范。

جرّب هذه الموجهات

基本 API 文档
Use the API Documentation Generator skill to analyze my Express routes and generate an openapi.yaml file in the project root.
FastAPI 增强
Use the API Documentation Generator skill to read my FastAPI endpoints and enhance the auto-generated OpenAPI docs with additional examples and detailed error responses.
多框架
Use the API Documentation Generator to find all API routes in my codebase, including Express routes in the backend folder and Flask APIs in the api directory, then generate a unified OpenAPI specification.
完整规范
Generate comprehensive OpenAPI 3.0 documentation for my REST API. Include all discovered endpoints, request/response schemas, authentication requirements, and group them by Users, Products, and Orders tags.

أفضل الممارسات

  • 在添加新端点后运行该技能以保持文档最新
  • 在发布之前根据实际 API 行为审查生成的模式
  • 向路由添加 JSDoc 注释或文档字符串以获得更丰富的端点描述

تجنب

  • 使用生成的文档而不验证响应的准确性
  • 跳过已认证端点的安全方案配置
  • 在无法访问路由源文件的情况下生成文档

الأسئلة المتكررة

此技能支持哪些框架?
Express、FastAPI、NestJS、Flask 和 Ruby on Rails。它分析路由装饰器和定义来提取端点信息。
它最多可以记录多少个端点?
没有硬性限制。该技能批量处理端点,并为所有发现的路由生成规范。
它能否与现有的 OpenAPI 文件集成?
可以。该技能可以读取现有规范并添加或更新端点,而不会覆盖自定义配置。
此技能会将我的代码发送到外部服务吗?
不会。所有分析都在 AI 上下文中本地进行。生成的 OpenAPI 文件直接保存到您的项目中。
为什么我生成的文档缺少某些端点?
确保路由文件可访问并使用标准框架模式。非标准路由或动态生成的路由可能无法被检测到。
这与框架自动文档相比如何?
FastAPI 和 NestJS 会自动生成文档,但此技能通过示例、错误详情和跨框架一致性来增强它们,适用于多语言项目。

تفاصيل المطور

المؤلف

CrazyDubya

الترخيص

MIT

مرجع

main

بنية الملفات