Openai Docs Skill

am-will/codex-skills/skills/openai-docs-skill

作者 am-will9f954c3b63fda0d1875252009c196bf15072c1ca无许可证1K 个星标收录于 2026年10月9日更新于 2026年10月9日仓库2个月前更新

Query the OpenAI developer documentation via the OpenAI Docs MCP server using CLI (curl/jq). Use whenever a task involves the OpenAI API (Responses, Chat Completions, Realtime, etc.), OpenAI SDKs, ChatGPT Apps SDK, Codex, MCP integrations, endpoint schemas, parameters, limits, or migrations and you need up-to-date official guidance.

AI 生成的概览

通过命令行查询 OpenAI 开发者文档 MCP 服务器,获取最新的官方 API 与 SDK 指南。

功能
该技能将 OpenAI 开发者文档 MCP 服务器封装为命令行工具,使用 curl 和 jq 访问默认端点。它支持初始化服务器、列出工具、搜索或浏览文档索引、以 Markdown 形式获取文档页面或锚点、列出 OpenAPI 端点,以及获取 OpenAPI 架构或代码示例等子命令。它会产出搜索结果、抓取的文档文本以及端点或架构信息,并要求代理在回答中注明所使用的文档网址。
适用场景
当任务涉及 OpenAI API、OpenAI SDK、ChatGPT Apps SDK、Codex、MCP 集成、端点架构、参数、限制或迁移,并且需要最新官方文档时使用。它用于在 OpenAI 平台相关工作中替代依赖记忆或非官方来源的做法。
运行要求
需要带有 curl 和 jq 的命令行环境,并能访问 OpenAI 文档 MCP 端点(默认为 MCP_URL 环境变量覆盖)。技能附带可执行脚本 scripts/openai-docs-mcp.sh。未提及需要凭据。

OpenAI Docs MCP Skill

Overview

Use the OpenAI developer documentation MCP server from the shell to search and fetch authoritative docs. Always do this for OpenAI platform work instead of relying on memory or non-official sources.

Core rules

  • Always use this skill for OpenAI API/SDK/Apps/Codex questions or when precise, current docs are required.
  • Query the MCP server via the CLI wrapper in scripts/openai-docs-mcp.sh (do not rely on Codex MCP tools).
  • Use search or list to find the best doc page, then fetch the page (or anchor) for exact text.
  • Surface the doc URL you used in your response so sources are clear.

Quick start

bash
scripts/openai-docs-mcp.sh search "Responses API" 5scripts/openai-docs-mcp.sh fetch https://platform.openai.com/docs/guides/migrate-to-responses

Workflow

  1. Discover: search with a focused query. If unsure, use list to browse.
  2. Read: fetch the most relevant URL (optionally add an anchor).
  3. Apply: summarize and/or quote relevant sections; include the URL.

Script reference

The CLI wrapper is at scripts/openai-docs-mcp.sh and uses curl + jq against https://developers.openai.com/mcp.

Subcommands:

  • init: initialize and inspect server capabilities.
  • tools: list available tools on the MCP server.
  • search <query> [limit] [cursor]: return JSON hits from the docs index.
  • list [limit] [cursor]: browse docs index.
  • fetch <url> [anchor]: return markdown for a doc page or section.
  • endpoints: list OpenAPI endpoints.
  • openapi <endpoint-url> [lang1,lang2] [code-only]: fetch OpenAPI schema or code samples.

Environment:

  • MCP_URL: override the default MCP endpoint.

来源与署名

来源:am-will/codex-skills位于skills/openai-docs-skill提交9f954c3

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架