home / skills / openai / skills / openai-docs

openai-docs skill

/skills/.curated/openai-docs

This skill provides up-to-date OpenAI developer docs with citations from MCP, helping you access authoritative guidance for OpenAI APIs and products.

npx playbooks add skill openai/skills --skill openai-docs

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
3.4 KB
---
name: "openai-docs"
description: "Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations (for example: Codex, Responses API, Chat Completions, Apps SDK, Agents SDK, Realtime, model capabilities or limits); prioritize OpenAI docs MCP tools and restrict any fallback browsing to official OpenAI domains."
---


# OpenAI Docs

Provide authoritative, current guidance from OpenAI developer docs using the developers.openai.com MCP server. Always prioritize the developer docs MCP tools over web.run for OpenAI-related questions. Only if the MCP server is installed and returns no meaningful results should you fall back to web search.

## Quick start

- Use `mcp__openaiDeveloperDocs__search_openai_docs` to find the most relevant doc pages.
- Use `mcp__openaiDeveloperDocs__fetch_openai_doc` to pull exact sections and quote/paraphrase accurately.
- Use `mcp__openaiDeveloperDocs__list_openai_docs` only when you need to browse or discover pages without a clear query.

## OpenAI product snapshots

1. Apps SDK: Build ChatGPT apps by providing a web component UI and an MCP server that exposes your app's tools to ChatGPT.
2. Responses API: A unified endpoint designed for stateful, multimodal, tool-using interactions in agentic workflows.
3. Chat Completions API: Generate a model response from a list of messages comprising a conversation.
4. Codex: OpenAI's coding agent for software development that can write, understand, review, and debug code.
5. gpt-oss: Open-weight OpenAI reasoning models (gpt-oss-120b and gpt-oss-20b) released under the Apache 2.0 license.
6. Realtime API: Build low-latency, multimodal experiences including natural speech-to-speech conversations.
7. Agents SDK: A toolkit for building agentic apps where a model can use tools and context, hand off to other agents, stream partial results, and keep a full trace.

## If MCP server is missing

If MCP tools fail or no OpenAI docs resources are available:

1. Run the install command yourself: `codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp`
2. If it fails due to permissions/sandboxing, immediately retry the same command with escalated permissions and include a 1-sentence justification for approval. Do not ask the user to run it yet.
3. Only if the escalated attempt fails, ask the user to run the install command.
4. Ask the user to restart Codex.
5. Re-run the doc search/fetch after restart.

## Workflow

1. Clarify the product scope (Codex, OpenAI API, or ChatGPT Apps SDK) and the task.
2. Search docs with a precise query.
3. Fetch the best page and the specific section needed (use `anchor` when possible).
4. Answer with concise guidance and cite the doc source.
5. Provide code snippets only when the docs support them.

## Quality rules

- Treat OpenAI docs as the source of truth; avoid speculation.
- Keep quotes short and within policy limits; prefer paraphrase with citations.
- If multiple pages differ, call out the difference and cite both.
- If docs do not cover the user’s need, say so and offer next steps.

## Tooling notes

- Always use MCP doc tools before any web search for OpenAI-related questions.
- If the MCP server is installed but returns no meaningful results, then use web search as a fallback.
- When falling back to web search, restrict to official OpenAI domains (developers.openai.com, platform.openai.com) and cite sources.

Overview

This skill provides authoritative, up-to-date guidance from the official OpenAI developer documentation. It is designed for developers building with OpenAI products and APIs, and it prioritizes the OpenAI developer docs MCP server for accurate citations. Use this skill when you need precise doc excerpts, implementation details, or configuration guidance tied to official sources.

How this skill works

The skill first queries the OpenAI developer docs MCP tools to search and fetch the most relevant pages and sections. If the MCP server is unavailable or returns no meaningful results, it follows a controlled fallback process that attempts to install or escalate MCP access, and then restricts any web fallback to official OpenAI domains. Responses include concise paraphrases or short quotes with citations to the exact doc pages or anchors.

When to use it

  • You need current, official documentation or exact API behavior from OpenAI (Responses API, Chat Completions, Realtime, Codex, etc.).
  • You want code snippets or configuration examples only when supported by official docs.
  • You must cite OpenAI docs as the primary source for capabilities, limits, or SDK usage.
  • You need step-by-step instructions for integrating Apps SDK or Agents SDK with correct MCP tooling guidance.
  • You want to verify differences between multiple official doc pages or track recent doc changes.

Best practices

  • Always start by clarifying which OpenAI product and task scope (e.g., Codex vs Responses API).
  • Use precise search queries to the MCP search tool before fetching documents.
  • Prefer paraphrase with short quoted snippets and include the doc citation or anchor.
  • If MCP returns nothing, follow the documented escalation steps before asking the user to act.
  • When multiple pages conflict, cite each page and explain the discrepancy succinctly.

Example use cases

  • Show exact parameter descriptions and example requests for the Responses API with a cited doc anchor.
  • Explain how to set up the Apps SDK and how the MCP server should expose app tools, linking to the official guide.
  • Compare model capabilities and limits across Chat Completions and Realtime with official citations.
  • Retrieve an Agents SDK example for tool usage and stepwise integration from the developer docs.
  • Provide the Realtime API guidance for low-latency speech-to-speech flows with doc references.

FAQ

What if the MCP server is not installed or returns no results?

The skill first attempts the documented install command and an escalated retry with a one-sentence justification; only if that fails will it ask you to run the install and restart Codex.

Will you ever use non-OpenAI sources?

Only as a last-resort fallback and then restricted to official OpenAI domains (developers.openai.com or platform.openai.com), with citations.

Can you provide code snippets?

Yes—only when the official docs include them; snippets will be cited to the exact doc section.