generate-swagger-docs by qodex-ai/ai-agent-skills
npx skills add https://github.com/qodex-ai/ai-agent-skills --skill generate-swagger-docs通过自动 API 密钥设置,在几秒钟内从您的代码库生成 OpenAPI 文档。
此技能自动化 Swagger/OpenAPI 文档生成过程:
您需要一个 OpenAI API 密钥才能使用此技能。如果您还没有,请从 OpenAI 平台 获取一个。
使用此技能最简单的方法是直接传递您的 API 密钥:
/Users/ankits/.claude/skills/generate-swagger-docs/generate-with-key.sh "sk-proj-your-api-key-here"
这将:
apimesh/ 目录并下载 apimesh 工具当您运行此技能时:
首次运行: 系统将提示您输入 OpenAI API 密钥(以 开头)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
sk-proj-后续运行: 技能将自动使用保存的 API 密钥
框架检测: 自动检测您的 API 框架
swagger.json)apimesh-docs.html)apimesh/swagger.json - OpenAPI 3.0 规范文件apimesh/apimesh-docs.html - 交互式 Swagger UI(自包含,可共享)apimesh/config.json - 保存的配置(包含您的设置,请将此文件加入 .gitignore)config.json 应添加到 .gitignore,因为它包含敏感信息使用提供的包装脚本,它能正确处理环境变量传播:
/Users/ankits/.claude/skills/generate-swagger-docs/generate-with-key.sh "sk-proj-your-api-key-here"
为什么这种方法最好:
使用方法 1 首次运行后,您的密钥将保存在 apimesh/config.json 中。在后续运行中,您可以省略密钥(如果您信任本地设置):
/Users/ankits/.claude/skills/generate-swagger-docs/generate-with-key.sh
重要: 切勿将 config.json 文件提交到版本控制系统。请将其添加到 .gitignore。
如果您需要更多控制,可以直接下载并运行 apimesh:
export OPENAI_API_KEY="sk-proj-your-api-key-here"
mkdir -p apimesh && \
curl -sSL https://raw.githubusercontent.com/qodex-ai/apimesh/refs/heads/main/run.sh -o apimesh/run.sh && \
chmod +x apimesh/run.sh && \
cd apimesh && \
OPENAI_API_KEY="$OPENAI_API_KEY" ./run.sh
注意: 必须如上所示将 OPENAI_API_KEY 显式传递给子进程。
每周安装数
99
代码库
GitHub 星标数
5
首次出现
2026年1月22日
安全审计
安装于
gemini-cli77
codex77
opencode77
github-copilot74
cursor68
amp66
Generate OpenAPI docs from your codebase in seconds with automatic API key setup.
This skill automates the Swagger/OpenAPI documentation generation:
You need an OpenAI API key to use this skill. Get one from OpenAI's platform if you don't have one already.
The easiest way to use this skill is to pass your API key directly:
/Users/ankits/.claude/skills/generate-swagger-docs/generate-with-key.sh "sk-proj-your-api-key-here"
This will:
apimesh/ directory and download the apimesh toolWhen you run this skill:
First Time: You'll be prompted for your OpenAI API key (starts with sk-proj-)
Subsequent Runs: The skill uses the saved API key automatically
Framework Detection: Automatically detects your API framework
swagger.json)apimesh-docs.html)apimesh/swagger.json - OpenAPI 3.0 specapimesh/apimesh-docs.html - Interactive Swagger UI (self-contained, shareable)apimesh/config.json - Saved configuration (includes your settings, gitignore this file)config.json should be added to .gitignore as it contains secretsUse the provided wrapper script that properly handles environment variable propagation:
/Users/ankits/.claude/skills/generate-swagger-docs/generate-with-key.sh "sk-proj-your-api-key-here"
Why this works best:
After the first run with Method 1, your key is saved in apimesh/config.json. On subsequent runs, you can omit the key (if you trust your local setup):
/Users/ankits/.claude/skills/generate-swagger-docs/generate-with-key.sh
Important: Never commit the config.json file to version control. Add it to .gitignore.
If you need more control, download and run apimesh directly:
export OPENAI_API_KEY="sk-proj-your-api-key-here"
mkdir -p apimesh && \
curl -sSL https://raw.githubusercontent.com/qodex-ai/apimesh/refs/heads/main/run.sh -o apimesh/run.sh && \
chmod +x apimesh/run.sh && \
cd apimesh && \
OPENAI_API_KEY="$OPENAI_API_KEY" ./run.sh
Note: The OPENAI_API_KEY must be explicitly passed to the subprocess as shown above.
Weekly Installs
99
Repository
GitHub Stars
5
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubFailSocketFailSnykFail
Installed on
gemini-cli77
codex77
opencode77
github-copilot74
cursor68
amp66
README 国际化工具:自动化翻译与多语言文档管理 | readme-i18n
46,000 周安装