npx skills add https://github.com/openai/skills --skill chatgpt-apps通过文档优先、示例优先的工作流程,快速搭建 ChatGPT 应用 SDK 的实现,并生成遵循当前应用 SDK 和 MCP 应用桥接模式的代码。
使用此技能来生成:
window.openai 兼容性/扩展)@modelcontextprotocol/ext-apps 启动脚手架,用于低依赖性的备用方案在构建或更改 ChatGPT 应用 SDK 应用时,请首先使用 $openai-docs。
$openai-docs(首选)或直接调用 OpenAI 文档 MCP 服务器。apps-sdk/build/mcp-server广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
apps-sdk/build/chatgpt-uiapps-sdk/build/examplesapps-sdk/plan/toolsapps-sdk/referenceapps-sdk/quickstart,并在从头开始发明脚手架之前检查官方示例仓库/页面。apps-sdk/deployapps-sdk/deploy/submissionapps-sdk/app-submission-guidelines如果 $openai-docs 不可用,请使用:
mcp__openaiDeveloperDocs__search_openai_docsmcp__openaiDeveloperDocs__fetch_openai_doc请阅读 references/apps-sdk-docs-workflow.md 以获取建议的文档查询和简洁的检查清单。在选择示例或脚手架之前,请阅读 references/app-archetypes.md 将请求分类为少数几种受支持的应用形态。在生成或审查仓库时,请阅读 references/repo-contract-and-validation.md,以确保输出保持在稳定的“可行应用”契约范围内。当应用类似连接器、仅处理数据、面向同步,或旨在与公司知识或深度研究良好配合时,请阅读 references/search-fetch-standard.md。当开始一个全新的应用,或决定是采用上游示例还是使用本地备用脚手架时,请阅读 references/upstream-example-workflow.md。当任务需要 ChatGPT 特定的小组件行为,或翻译使用包装器特定 app.* 助手的仓库示例时,请阅读 references/window-openai-patterns.md。
使用明确将此技能与 $openai-docs 配对的提示词,以便生成的脚手架基于当前文档。
首选的提示词模式:
使用 $chatgpt-apps 和 $openai-docs 为 <用例> 搭建一个带有 <TS/Python> MCP 服务器和 <React/原生> 小组件的 ChatGPT 应用。使用 $chatgpt-apps 和 $openai-docs 将最接近的官方应用 SDK 示例适配为用于 <用例> 的 ChatGPT 应用。使用 $chatgpt-apps 和 $openai-docs 将此应用 SDK 演示重构为具有工具注解、CSP 和 URI 版本控制的生产就绪结构。使用 $chatgpt-apps 和 $openai-docs 首先规划工具,然后生成 MCP 服务器和小组件代码。在响应时,请在编码之前询问或推断以下输入:
在选择示例、仓库结构或脚手架之前,请将请求分类为一个主要原型并予以说明。
tool-onlyvanilla-widgetreact-widgetinteractive-decoupledsubmission-ready除非缺少的细节确实构成阻碍,否则请推断原型。使用原型来选择:
server/ + web/ 布局search 和 fetch 作为默认的只读工具界面有关决策标准,请阅读 references/app-archetypes.md。
对于全新的应用,按顺序优先选择以下起点:
@modelcontextprotocol/ext-apps 示例:当用户需要更低层级或更便携的 MCP 应用基线时。scripts/scaffold_node_ext_apps.mjs:仅当没有相近示例适合、用户想要一个极简的 Node + 原生启动器,或者不希望进行网络访问/示例检索时。如果已有相近的上游示例,请不要从头开始生成大型自定义脚手架。复制最小的匹配示例,移除不相关的演示代码,然后根据当前文档和用户请求进行修补。
在规划工具或选择起点之前,选择一个主要原型。
submission-ready。根据用户意图定义工具界面范围。
readOnlyHint、destructiveHint、openWorldHint;当为真时添加 idempotentHint)。search 和 fetch 工具,而不是发明自定义的只读等效工具。当 search 和 fetch 可能相关时,请阅读 references/search-fetch-standard.md。
选择适合目标的最简单结构。
对于非简单的应用,优先选择解耦模式:
structuredContent。_meta.ui.resourceUri 和可选的 _meta["openai/outputTemplate"]。search”)。对于全新的工作,当上游示例与请求的应用相近时,默认使用它们。
@modelcontextprotocol/ext-apps 示例。_meta.ui.*、CSP、URI 版本控制和本地运行说明。有关选择和适配标准,请阅读 references/upstream-example-workflow.md。
仅当用户想要一个快速、全新的 Node 启动器,并且原生 HTML 小组件可以接受,且没有上游示例是更好的起点时,才使用 scripts/scaffold_node_ext_apps.mjs。
@modelcontextprotocol/ext-apps 服务器,以及一个默认使用 MCP 应用桥接的原生 HTML 小组件。ui/message 桥接上,并且仅将 window.openai 用于可选的主机信号/扩展。生成一个服务器,该服务器:
text/html;profile=mcp-app)或使用 @modelcontextprotocol/ext-apps/server 时的 SDK 常量(RESOURCE_MIME_TYPE)注册小组件资源/模板structuredContent(模型 + 小组件)、content(模型叙述)和 _meta(仅小组件数据)openai/toolInvocation/*)保持 structuredContent 简洁。将大型或敏感的仅小组件负载移动到 _meta。
首先使用 MCP 应用桥接以实现可移植性,然后在能实质性改善用户体验时添加 ChatGPT 特定的 window.openai API。
ui/notifications/tool-result(通过 postMessage 的 JSON-RPC)structuredContent 渲染tools/call 进行组件发起的工具调用ui/update-model-context将 window.openai 用于兼容性和扩展(文件上传、模态框、显示模式等),而不是作为新应用的唯一集成路径。
app 对象包装桥接(例如 @modelcontextprotocol/ext-apps/react),并暴露助手名称,如 app.sendMessage()、app.callServerTool()、app.openLink() 或主机获取器方法。window.openai.callTool(...)、window.openai.sendFollowUpMessage(...)、window.openai.openExternal(...)、window.openai.requestDisplayMode(...),以及直接全局变量,如 window.openai.theme、window.openai.locale、window.openai.displayMode、window.openai.toolInput、window.openai.toolOutput、window.openai.toolResponseMetadata 和 window.openai.widgetState。window.openai 或 MCP 应用桥接原语,并说明该包装器不是规范的 API 界面。references/window-openai-patterns.md 获取包装器到规范 API 的映射以及 React 助手提取模式。在小组件资源/模板上慎重设置资源元数据:
_meta.ui.csp 包含精确的 connectDomains 和 resourceDomains_meta.ui.domain 用于应用提交就绪的部署_meta.ui.prefersBorder(或在需要时使用 OpenAI 兼容性别名)openai/widgetDescription 以减少冗余叙述除非 iframe 嵌入是产品的核心,否则避免使用 frameDomains。
每个生成的仓库在完成前都应满足一个小的、稳定的契约。
/mcp 端点。search 和 fetch 工具形态。有关详细的检查清单和验证阶梯,请阅读 references/repo-contract-and-validation.md。
针对最小可行仓库契约进行验证,而不仅仅是“文件是否已创建”。
/mcp 健康检查(如果可行)有关验证阶梯,请阅读 references/repo-contract-and-validation.md。
对于本地开发,包含明确的 ChatGPT 设置步骤(不仅仅是代码/运行命令)。
http://localhost:<端口>/mcpngrok http <端口>)/mcp 路径注意:一些文档/截图仍使用旧的“连接器”术语。在提供分步说明时,优先使用当前产品措辞(“应用”),同时承认两种标签。
当用户要求部署或准备发布时,为 MCP 服务器(以及如果单独托管的小组件资源)生成托管指导。
/mcp 上保持低延迟的流式行为仅当用户打算进行公共目录列表时,才包含这些步骤。
apps-sdk/deploy/submission 获取提交流程,使用 apps-sdk/app-submission-guidelines 获取审查要求当应用具有长期存在的小组件状态、重复交互或组件发起的工具调用(例如游戏、看板、地图、仪表板、编辑器)时,请阅读 references/interactive-state-sync-patterns.md。
使用它来选择以下模式:
stateVersion、resetCount 等)structuredContent 与 _meta 分区window.openai 兼容性当使用此技能搭建代码时,除非用户另有要求,否则按此顺序生成输出:
$openai-docs 使用的文档页面/URLreferences/app-archetypes.md:用于将请求分类为少数几种受支持的应用形态references/apps-sdk-docs-workflow.md:用于文档查询、页面目标和代码生成检查清单references/interactive-state-sync-patterns.md:用于有状态或高度交互的小组件应用的可复用模式references/repo-contract-and-validation.md:用于最小可行仓库契约和轻量级验证阶梯references/search-fetch-standard.md:用于何时以及如何默认使用标准的 search 和 fetch 工具references/upstream-example-workflow.md:用于在官方示例、ext-apps 示例和本地备用脚手架之间进行选择references/window-openai-patterns.md:用于 ChatGPT 特定扩展、包装器 API 翻译和 React 助手模式scripts/scaffold_node_ext_apps.mjs:用于最小的 Node + @modelcontextprotocol/ext-apps 备用启动脚手架每周安装量
229
仓库
GitHub 星标数
15.3K
首次出现
2026年3月2日
安全审计
安装于
codex215
cursor204
gemini-cli203
opencode203
kimi-cli202
amp202
Scaffold ChatGPT Apps SDK implementations with a docs-first, example-first workflow, then generate code that follows current Apps SDK and MCP Apps bridge patterns.
Use this skill to produce:
window.openai compatibility/extensions second)@modelcontextprotocol/ext-apps starter scaffold for low-dependency fallbacksUse $openai-docs first whenever building or changing a ChatGPT Apps SDK app.
$openai-docs (preferred) or call the OpenAI docs MCP server directly.apps-sdk/build/mcp-serverapps-sdk/build/chatgpt-uiapps-sdk/build/examplesapps-sdk/plan/toolsapps-sdk/referenceapps-sdk/quickstart when scaffolding a new app or generating a first-pass implementation, and check the official examples repo/page before inventing a scaffold from scratch.apps-sdk/deployapps-sdk/deploy/submissionapps-sdk/app-submission-guidelinesIf $openai-docs is unavailable, use:
mcp__openaiDeveloperDocs__search_openai_docsmcp__openaiDeveloperDocs__fetch_openai_docRead references/apps-sdk-docs-workflow.md for suggested doc queries and a compact checklist. Read references/app-archetypes.md to classify the request into a small number of supported app shapes before choosing examples or scaffolds. Read references/repo-contract-and-validation.md when generating or reviewing a repo so the output stays inside a stable “working app” contract. Read references/search-fetch-standard.md when the app is connector-like, data-only, sync-oriented, or meant to work well with company knowledge or deep research. Read references/upstream-example-workflow.md when starting a greenfield app or when deciding whether to adapt an upstream example or use the local fallback scaffold. Read references/window-openai-patterns.md when the task needs ChatGPT-specific widget behavior or when translating repo examples that use wrapper-specific app.* helpers.
Use prompts that explicitly pair this skill with $openai-docs so the resulting scaffold is grounded in current docs.
Preferred prompt patterns:
Use $chatgpt-apps with $openai-docs to scaffold a ChatGPT app for <use case> with a <TS/Python> MCP server and <React/vanilla> widget.Use $chatgpt-apps with $openai-docs to adapt the closest official Apps SDK example into a ChatGPT app for <use case>.Use $chatgpt-apps and $openai-docs to refactor this Apps SDK demo into a production-ready structure with tool annotations, CSP, and URI versioning.Use $chatgpt-apps with $openai-docs to plan tools first, then generate the MCP server and widget code.When responding, ask for or infer these inputs before coding:
Before choosing examples, repo shape, or scaffolds, classify the request into one primary archetype and state it.
tool-onlyvanilla-widgetreact-widgetinteractive-decoupledsubmission-readyInfer the archetype unless a missing detail is truly blocking. Use the archetype to choose:
server/ + web/ layoutsearch and fetch should be the default read-only tool surfaceRead references/app-archetypes.md for the decision rubric.
For greenfield apps, prefer these starting points in order:
@modelcontextprotocol/ext-apps examples when the user needs a lower-level or more portable MCP Apps baseline.scripts/scaffold_node_ext_apps.mjs only when no close example fits, the user wants a tiny Node + vanilla starter, or network access/example retrieval is undesirable.Do not generate a large custom scaffold from scratch if a close upstream example already exists. Copy the smallest matching example, remove unrelated demo code, then patch it to the current docs and the user request.
Pick one primary archetype before planning tools or choosing a starting point.
submission-ready only when the user asks for public launch, directory submission, or review-ready deployment.Define the tool surface area from user intents.
readOnlyHint, destructiveHint, openWorldHint; add idempotentHint when true).search and fetch tools instead of inventing custom read-only equivalents.Read references/search-fetch-standard.md when search and fetch may be relevant.
Choose the simplest structure that fits the goal.
Prefer the decoupled pattern for non-trivial apps:
structuredContent._meta.ui.resourceUri and optional _meta["openai/outputTemplate"].search first").Default to upstream examples for greenfield work when they are close to the requested app.
@modelcontextprotocol/ext-apps examples when the request is closer to raw MCP Apps bridge/server wiring, or when version-matched package patterns matter more than ChatGPT-specific polish._meta.ui.*, CSP, URI versioning, and local run instructions.Read references/upstream-example-workflow.md for the selection and adaptation rubric.
Use scripts/scaffold_node_ext_apps.mjs only when the user wants a quick, greenfield Node starter and a vanilla HTML widget is acceptable, and no upstream example is a better starting point.
@modelcontextprotocol/ext-apps server plus a vanilla HTML widget that uses the MCP Apps bridge by default.ui/message bridge and only uses window.openai for optional host signals/extensions.Generate a server that:
text/html;profile=mcp-app) or the SDK constant (RESOURCE_MIME_TYPE) when using @modelcontextprotocol/ext-apps/serverstructuredContent (model + widget), content (model narration), and _meta (widget-only data) intentionallyopenai/toolInvocation/*) when helpful in ChatGPTKeep structuredContent concise. Move large or sensitive widget-only payloads to _meta.
Use the MCP Apps bridge first for portability, then add ChatGPT-specific window.openai APIs when they materially improve UX.
ui/notifications/tool-result (JSON-RPC over postMessage)structuredContenttools/call for component-initiated tool callsui/update-model-context only when UI state should change what the model seesUse window.openai for compatibility and extensions (file upload, modal, display mode, etc.), not as the only integration path for new apps.
app object (for example, @modelcontextprotocol/ext-apps/react) and expose helper names like app.sendMessage(), app.callServerTool(), app.openLink(), or host getter methods.window.openai.callTool(...), window.openai.sendFollowUpMessage(...), window.openai.openExternal(...), window.openai.requestDisplayMode(...), and direct globals like , , , , , , and .Set resource metadata deliberately on the widget resource/template:
_meta.ui.csp with exact connectDomains and resourceDomains_meta.ui.domain for app submission-ready deployments_meta.ui.prefersBorder (or OpenAI compatibility alias when needed)openai/widgetDescription to reduce redundant narrationAvoid frameDomains unless iframe embeds are core to the product.
Every generated repo should satisfy a small, stable contract before you consider it done.
/mcp endpoint.search and fetch tool shapes when relevant.Read references/repo-contract-and-validation.md for the detailed checklist and validation ladder.
Validate against the minimum working repo contract, not just “did files get created.”
/mcp health check when feasibleRead references/repo-contract-and-validation.md for the validation ladder.
For local development, include explicit ChatGPT setup steps (not just code/run commands).
http://localhost:<port>/mcpngrok http <port>)/mcp path when connecting from ChatGPTNote: Some docs/screenshots still use older "connector" terminology. Prefer current product wording ("app") while acknowledging both labels when giving step-by-step instructions.
When the user asks to deploy or prepare for launch, generate hosting guidance for the MCP server (and widget assets if hosted separately).
/mcpOnly include these steps when the user intends a public directory listing.
apps-sdk/deploy/submission for the submission flow and apps-sdk/app-submission-guidelines for review requirementsRead references/interactive-state-sync-patterns.md when the app has long-lived widget state, repeated interactions, or component-initiated tool calls (for example, games, boards, maps, dashboards, editors).
Use it to choose patterns for:
stateVersion, resetCount, etc.)structuredContent vs _meta partitioningwindow.openai compatibilityWhen using this skill to scaffold code, produce output in this order unless the user asks otherwise:
$openai-docsreferences/app-archetypes.md for classifying requests into a small number of supported app shapesreferences/apps-sdk-docs-workflow.md for doc queries, page targets, and code-generation checklistreferences/interactive-state-sync-patterns.md for reusable patterns for stateful or highly interactive widget appsreferences/repo-contract-and-validation.md for the minimum working repo contract and lightweight validation ladderreferences/search-fetch-standard.md for when and how to default to the standard search and fetch toolsreferences/upstream-example-workflow.md for choosing between official examples, ext-apps examples, and the local fallback scaffoldWeekly Installs
229
Repository
GitHub Stars
15.3K
First Seen
Mar 2, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex215
cursor204
gemini-cli203
opencode203
kimi-cli202
amp202
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
144,300 周安装
Claude智能体开发指南:创建自主AI助手,掌握agent-development核心技巧
892 周安装
iOS调试器代理 - 自动化Xcode模拟器构建、UI交互与日志捕获工具
882 周安装
Sigma Tutor:基于布鲁姆2-Sigma方法的AI个性化学习导师,诊断提问精通进阶
888 周安装
cmux 终端窗口管理器:macOS 终端分屏与工作区自动化控制工具
905 周安装
FastAPI官方技能:Python Web开发最佳实践与CLI工具使用指南
906 周安装
Streamdown:专为流式渲染优化的 React Markdown 渲染器,内置安全与交互控件
904 周安装
window.openai.themewindow.openai.localewindow.openai.displayModewindow.openai.toolInputwindow.openai.toolOutputwindow.openai.toolResponseMetadatawindow.openai.widgetStatewindow.openai or MCP Apps bridge primitives and call out that the wrapper is not the normative API surface.references/window-openai-patterns.md for the wrapper-to-canonical mapping and for React helper extraction patterns.references/window-openai-patterns.md for ChatGPT-specific extensions, wrapper API translation, and React helper patternsscripts/scaffold_node_ext_apps.mjs for a minimal Node + @modelcontextprotocol/ext-apps fallback starter scaffold