Communitygithub.com

grahama1970/openai-docs

當使用者詢問如何利用 OpenAI 產品或 API 進行建置、詢問 Codex 本身或選擇 Codex 使用介面、需要附有引用來源的最新官方文件、協助選擇適合使用案例的最新模型、最新的/當前的/預設模型的提示指引、或模型升級與提示升級指導時使用;使用 OpenAI docs MCP 工具處理非 Codex 的文件問題,先使用 Codex 手冊助手處理廣泛的 Codex 自我知識,並將備用瀏覽限制在官方 OpenAI 網域。

openai-docs 是什麼?

此技能提供來自 OpenAI 開發者文件的權威、最新指引,主要透過 developers.openai.com MCP 伺服器存取。它管理 OpenAI 文件搜尋、文件擷取以及 OpenAPI 規格查詢,確保使用者能獲得最準確且最新的資訊。技能也涵蓋模型選擇、API 模型遷移以及提示升級建議,尤其針對最新模型變更,會執行專用解析器來獲取結構化指引。為了處理 Codex 自我知識,技能會使用本機程式碼助手工具(`fetch-codex-manual.mjs`)來擷取並快取 Codex 手冊,並依據文件公告、使用介面對應以及受界限的不確定性來回答問題。該技能支援 macOS、Linux 和 Windows 平台,並在 API 金鑰驗證、文件來源優先順序以及備用瀏覽策略方面提供明確指引。透過這些機制,它確保開發者能獲得一致且可靠的文件查詢體驗,從概念解釋、範例程式碼到最新模型的提示與遷移指導都涵蓋在內。

相容平台~Claude Code✓Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/.system/openai-docs

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

OpenAI 文件

使用 developers.openai.com MCP 伺服器提供來自 OpenAI 開發者文件的最新權威指引。「Docs MCP」指的是 mcp__openaiDeveloperDocs__search_openai_docs 和 mcp__openaiDeveloperDocs__fetch_openai_doc;對於 API 參考、結構定義、參數或必要欄位問題,也請在可用時使用 mcp__openaiDeveloperDocs__get_openapi_spec。僅在這些工具不可用或無幫助時,才將官方網域網頁搜尋作為備用方案。廣泛的 Codex 問題則在 Docs MCP 之前使用手冊助手。此技能也負責模型選擇、API 模型遷移以及提示升級指導。

API 金鑰設定

對於建置、執行、設定、除錯或實作 API 後端應用程式、腳本、CLI、生成器或工具的請求,請在可用時先使用 openai-platform-api-key。解決該憑證閘道後,再根據需要回到此處取得目前文件。

將此技能直接用於僅需文件、引用、模型/API 指導、概念性解釋以及不需要建置或執行 API 後端產物的範例。

對於最新/當前/預設/未指定模型的遷移或提示指導請求,請在 API 金鑰憑證閘道之前,先完成唯讀的最新模型解析器及指南擷取。憑證閘道仍會阻止編輯、測試和 API 後端實作,直到解決為止;它不會阻止唯讀擷取當前模型、遷移或提示指導。

最新模型變更的首要動作

在讀取記憶體、檢查儲存庫、擷取文件或檢查 API 憑證之前,先對請求進行分類:

  • 最新/當前的提示指導,或請求變更 + 最新/當前/最新/推薦/預設/旗艦/未指定的目標: 立即使用下方平台特定指令執行解析器,並檢查其 JSON 輸出。這包括詢問如何提示最新模型、變更提示、模型選擇器、模型參考、SDK 整合、將較舊的命名模型替換為「當前模型」,或詢問「我應該遷移/升級到哪個模型?」。不要為此分支直接擷取 latest-model.md。
  • 純粹的模型選擇問題(僅問題本身,沒有提示指導或請求變更): 直接擷取 https://developers.openai.com/api/docs/guides/latest-model.md;不要執行解析器。
  • 請求變更 + 明確的目標模型: 保留該目標;不要執行最新模型解析器。對於明確的 GPT-5.6 Sol 或 GPT-5.6 系列遷移,請擷取即時 GPT-5.6 模型指導頁面,並閱讀 references/upgrading-to-gpt-5p6-sol.md 以取得特定於技能的遷移判斷。
  • 針對明確命名的 GPT-5 系列模型的提示或遷移指導: 透過 Docs MCP 擷取 https://developers.openai.com/api/docs/guides/model-guidance?model=<requested-model>,並提取相關的遷移章節或從 ## Prompting Best Practices 開始到下一 H2 標題的內容。不要替換為最新模型指導。

執行解析器時,不要依賴檔案系統的可執行位元:

  • POSIX shell:sh <skill-dir>/scripts/resolve-latest-model-info
  • Windows:使用 Node.js 18 或更新版本執行 CommonJS 實作:node <skill-dir>\scripts\resolve-latest-model-info.cjs。如果 node 不可用或太舊,且 load_workspace_dependencies 可用,請使用它傳回的 Node.js 可執行檔來執行此指令。不要嘗試在 Windows 上直接執行無副檔名的 POSIX 包裝器。

對於解析器分支,不要抑制或重新導向其 stdout。成功需要 JSON 包含 model、migrationGuideUrl 和 promptingGuideUrl;如果指令結束時缺少這三個欄位,請在任何備用方案之前再執行一次。

來源優先順序

  • 對於 Codex 自我知識,請使用下面的 Codex 來源路徑;它負責決定何時使用手冊助手、Docs MCP 或受界限的不確定性。
  • 對於非 Codex 的 OpenAI 文件問題,請使用 mcp__openaiDeveloperDocs__search_openai_docs 尋找最相關的文件頁面。
  • 對於非 Codex 的 OpenAI 文件問題,請在回答之前使用 mcp__openaiDeveloperDocs__fetch_openai_doc 擷取相關頁面。如果搜尋結果雜亂,請執行範圍更窄的 Docs MCP 搜尋;當任何合理的官方 OpenAI 文件 URL 已知或被發現時,請在依賴網頁搜尋內容之前,嘗試透過 Docs MCP 擷取該 URL。
  • 對於 API 參考、結構定義、參數或必要欄位問題,請在可用時使用 mcp__openaiDeveloperDocs__get_openapi_spec 來驗證 API 形狀,同時參考相關指南或參考頁面。
  • 僅在需要瀏覽或發現沒有明確查詢的非 Codex 頁面時,才使用 mcp__openaiDeveloperDocs__list_openai_docs。
  • 對於最新/當前的提示指導、模型升級或提示升級,請套用上述首要動作分類器,並使用其平台特定的解析器指令。在 POSIX 上,包裝器使用來自 $NODE、PATH 或捆綁/系統備用方案的相容 Node.js 18+ 執行環境。在 Windows 上,使用相容的 Node.js 可執行檔直接執行 .cjs 實作。如果沒有相容的執行環境,請在可用時呼叫 load_workspace_dependencies,並使用傳回的 Node.js 可執行檔重試一次適當的指令。
  • 對於僅限文件、不要求變更應用程式、專案、儲存庫、模型設定或提示的模型選擇問題,請先擷取 https://developers.openai.com/api/docs/guides/latest-model.md。如果該頁面不可用,請載入 references/latest-model.md。
  • 保留明確的目標請求:如果使用者指定了目標模型,例如「遷移到 GPT-5.4」,請保留該請求的目標,即使 latest-model.md 命名了更新的模型。僅選擇性地提及更新的指導。
  • 如果需要當前的遠端指導,請將傳回的遷移和提示指導 URL 視為不透明,並直接擷取這些確切的 URL。不要衍生、替換或附加模型查詢到它們。如果提示指導 URL 解析為一個組合的模型指導頁面,請僅提取從 ## Prompting Best Practices 開始到下一 H2 標題的內容。如果擷取的指南僅包含標題或沒有實質內容,請透過 MCP/搜尋備用方案重試確切的 markdown URL;如果仍然失敗,請使用捆綁的備用參考文件,並揭露這是備用方案。

OpenAI 產品快照

  1. Apps SDK:透過提供 Web 元件 UI 和一個將應用程式的工具暴露給 ChatGPT 的 MCP 伺服器,來建置 ChatGPT 應用程式。
  2. Responses API:一個統一的端點,專為在代理工作流程中進行有狀態、多模態、使用工具的互動而設計。
  3. Chat Completions API:根據構成對話的訊息清單產生模型回應。
  4. Codex:OpenAI 的軟體開發程式碼代理,能夠編寫、理解、審查和除錯程式碼。
  5. gpt-oss:在 Apache 2.0 授權下發布的開放權重 OpenAI 推理模型(gpt-oss-120b 和 gpt-oss-20b)。
  6. Realtime API:建置低延遲、多模態體驗,包括自然的語音到語音對話。
  7. Agents SDK:一個用於建置代理應用程式的工具包,其中模型可以使用工具和上下文、移交給其他代理、串流處理部分結果,並保留完整的追蹤。

Codex 自我知識

針對關於 Codex 本身的問題使用此路徑:設定、擴充、操作、故障排除、本地狀態、產品使用介面,或 Codex 行為應存放的位置。僅提及外掛程式、技能、鉤子、MCP 伺服器、瀏覽器或自動化的程式碼庫是不夠的。對於一般的軟體任務,直接回答該軟體任務;如果被問到 Codex 自我知識是否適用,簡短回答該元問題,並繼續請求的產物。

來源路徑

Codex 手冊是廣泛 Codex 綜合知識的第一來源。將手冊和 Docs MCP 視為不同的車道,而不是可互換的官方文件來源。對於已發布使用者的 Codex 產品答案,來源路徑是完整的:手冊、此路徑需要時的 Docs MCP、官方 OpenAI 網頁備用方案,以及當前對話中已暴露的可呼叫功能(當問題與該功能相關時)。developers.openai.com 之外的知識庫不屬於此公共產品答案的路徑。

對於廣泛的 Codex 行為、設定、客製化、技能、外掛程式、MCP、鉤子、AGENTS.md、自動化、使用介面、本地狀態或系統地圖問題:

  1. 重用同一對話線程中的手冊和大綱路徑(如果仍然有效)。
  2. 否則,在普通的可寫入對話中,先執行技能本地助手。僅在對話明確為唯讀、shell 執行不可用,或可見策略顯示不允許暫存快取時,才跳過它而不嘗試。
  3. 預設情況下,助手會按此順序選擇第一個可用的暫存快取目錄:$TMPDIR/openai-docs-cache、%TEMP%\openai-docs-cache、%TMP%\openai-docs-cache、/private/tmp/openai-docs-cache,然後是 /tmp/openai-docs-cache。僅工作區的寫入權限不足以用於此暫存快取。
  4. 除非需要覆蓋快取目錄,否則直接執行助手。當原生 fetch 不可用或存在代理環境變數時,助手會回退到 curl,因此不需要特定於 shell 的代理前綴。將 <skill-dir> 解析為此技能的實際目錄;在複製的本地評估工作目錄中,這通常是 .codex/skills/openai-docs:
node <skill-dir>/scripts/fetch-codex-manual.mjs

如果需要覆蓋快取目錄,請傳遞 --cache-dir <cache-dir>。在 Windows 上,助手會自動檢查 %TEMP% 和 %TMP%;在 PowerShell 中,$env:TEMP\openai-docs-cache 是典型的顯式覆蓋。

將助手的可用性視為由明確的唯讀/無 shell 策略或實際的指令結果所確定。猜測的沙箱或猜測的助手失敗不足以切換到 Docs MCP 或網頁查詢;在實際的助手指令失敗後,繼續到下面最狹窄的官方下一個來源。

助手會驗證新鮮度,寫入 codex-manual.md,並產生 codex-manual.outline.md。大綱將來源頁面和標題映射到行範圍;使用它來選擇相關的手冊章節,然後讀取或搜尋目標手冊章節以獲取 Codex 產品事實。使用技能目錄來定位和執行助手;在助手成功後,使用傳回的手冊和大綱路徑作為 Codex 產品事實和術語覆蓋範圍檢查的搜尋範圍。

對於後續的 Codex 問題,重用同一對話線程中的手冊和大綱路徑。當手冊是超過約一天前擷取的、路徑無法使用、路徑來自另一個對話線程或不確定來源,或者可能缺少最新資訊且過時的可能性合理時,請先重新整理。

對於手冊目前是否足夠新穎以值得信賴的問題,請在允許暫存快取時執行助手,並根據其傳回的狀態、手冊路徑和大綱路徑來回答。

如果手冊解決了一個 Codex 主張,則從中回答,並停止為該主張擴展來源;如果文件查詢只是其中的一個依賴項,則繼續使用者的更廣泛任務。手冊來源頁面和已知的書籤連結對於手冊涵蓋的素材來說是足夠的引用支援。

如果因為對話是唯讀、沒有 shell 執行或不允許暫存快取而跳過助手,則下一個來源是 Docs MCP:呼叫 mcp__openaiDeveloperDocs__search_openai_docs,然後針對相關的命中結果呼叫 mcp__openaiDeveloperDocs__fetch_openai_doc,然後再進行任何網頁備用方案。

如果使用者命名了一個新鮮手冊中未使用的 Codex 術語或模式,請搜尋手冊中明顯相關的概念,然後回答該確切術語沒有文件記錄,並使用最接近的已記錄術語。如果提示詢問該術語如何映射到 Codex 行為,請從相鄰的手冊章節解析映射。如果在該手冊遍歷之後,該確切術語仍然是實質性的或可能最新的,請在受界限的不確定性之前使用一次狹窄的 Docs MCP 搜尋/擷取;否則,該術語或映射主張的來源查詢即已完成。

僅在手冊不可用、助手失敗、不允許暫存快取、缺少另一個實質性主張或可能已過時,或者使用者明確需要特定頁面的引用時,才使用最狹窄的官方下一個來源。偏好一次特定的 Docs MCP 搜尋,如果它傳回一個明顯相關的頁面,則偏好一次擷取;對於未解決的 Codex 功能名稱、縮寫、排程術語或確切的錯誤文字,此 Docs MCP 步驟是網頁搜尋之前的下一個來源。在手冊加上任何允許的 Docs MCP 填補空白之後,將剩餘的空白解析為受界限的不確定性。僅在 Docs MCP 路徑不可用或無幫助時,才使用官方網域網頁備用方案。如果主張仍然無法確定,則以受界限的不確定性停止。如果官方文件/手冊與當前對話中已暴露的可呼叫功能衝突,請說明衝突,並優先選擇針對該環境驗證過的當前對話行為。

對於未記錄或看起來私有的模型標識符、產品模式標籤、權限標籤、帳戶存取路徑或發行名稱,請根據當前的公共文件和受界限的不確定性來回答。這些標籤不是離開公共來源路徑的理由。

對於支援風格的診斷,偏好根據手冊進行逐層回答,而不是特定於供應商的網頁查詢:已安裝/已啟用的外掛程式、捆綁應用程式或連接器授權、MCP 設定、工作區/管理員策略、重新啟動或新對話線程的期望,然後如果問題仍未解決,則轉向支援或意見回饋。

如果來源路徑仍然無法確定主張,則傳回受界限的不確定性,或將問題轉向支援、管理員或產品意見回饋,而不是擴大調查。

對於未解決的產品術語,根據手冊加上允許的官方下一個來源來回答。如果這些來源無法確定該術語,則根據這些來源以受界限的不確定性回答。

使用介面對應

當 Codex 名詞或持久指令使用介面重疊時,建議符合範圍的最小介面:

  • 提示或對話線程上下文 -> 一次性任務約束。
  • AGENTS.md -> 持久的儲存庫慣例、指令、驗證步驟和審查期望;較近巢狀的檔案在其子樹下套用。
  • 專案 .codex/config.toml ->

…

[為翻譯截斷]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agent-ecosystem

Canonical map and shared contracts for the agent-governance ecosystem: the pi.receipt_envelope.v1 boundary envelope, the component graph, and the rules for which component owns which schema. Use when wiring a skill or extension into the shared receipt world, when asking how shame, triage-error, tau, ask, project-watchdog, ops-herdr, ponytail, and Memory fit together, or when validating an envelope.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/align

Round-based context alignment before execution. Use when the human, project agent, WebGPT, scillm, ask, dogpile, memory, or project-knowledge may each hold different facts about a task; especially before ambiguous design, infographic, product workflow, high-stakes implementation, plan-iterate, project-infographic, or multi-review work.

grahama1970/analytics

Flexible data science analytics for any dataset. Auto-discovers schema, recommends charts, exports to create-figure. Works with JSONL, JSON, CSV from any source.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/assistant-lab

Self-improvement workbench for /assistant. All the tools needed to diagnose, train, evaluate, and promote models in a continuous loop. The "warm pond" where /assistant evolves its own inference stack.

相關技能