All skills
openai avatar

/chatgpt-apps

@cb9153a official
by openaiopenai/skills28k stars
1,891

Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.

Use this Skill: https://skilld.dev/gh/openai/skills/chatgpt-apps

This session only. Nothing lands on disk.

referencesupstream-example-workflow.md

≈861 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Upstream Example Workflow

Load this reference when starting a greenfield ChatGPT app or when deciding whether to adapt an upstream example or use the local fallback scaffold.

Default Order

Prefer these starting points in order:

  1. Official OpenAI Apps SDK examples
  2. Version-matched @modelcontextprotocol/ext-apps examples
  3. Local scripts/scaffold_node_ext_apps.mjs fallback

This keeps the skill aligned with current docs and maintained example code while still preserving a low-dependency fallback when examples are not a good fit.

Choose The Right Source

1. Official OpenAI examples

Prefer these when:

  • The app is clearly ChatGPT-facing
  • The user wants a polished UI or React component
  • The task involves file upload, modal flows, display-mode changes, or other ChatGPT extensions
  • The docs/examples page already shows a similar interaction pattern

Typical sources:

  • https://developers.openai.com/apps-sdk/build/examples/
  • https://github.com/openai/openai-apps-sdk-examples
  • https://developers.openai.com/apps-sdk/quickstart/ for the smallest vanilla baseline

2. @modelcontextprotocol/ext-apps examples

Prefer these when:

  • The user needs a lower-level MCP Apps baseline
  • Portability across MCP Apps-compatible hosts matters more than ChatGPT-specific polish
  • You want version-matched examples close to the installed @modelcontextprotocol/ext-apps package shape

This follows the same basic idea as the upstream create-mcp-app skill: use maintained examples as the starting point, then adapt them.

Typical examples from upstream flows:

  • examples/demo-vanilla-html
  • examples/demo-react-simple
  • examples/demo-connectors-api

3. Local fallback scaffold

Use scripts/scaffold_node_ext_apps.mjs when:

  • No close upstream example exists
  • The user wants a tiny Node + vanilla HTML starter
  • Network/example retrieval is undesirable
  • You need a throwaway starter to patch quickly during a live coding task

Do not prefer the local scaffold just because it is available. It is the fallback, not the default.

Adaptation Rules

  • Copy the smallest matching example, not the entire showcase app.
  • Remove unrelated demo tools, assets, and routes immediately.
  • Keep the upstream file structure when it is already clean and docs-aligned.
  • Reconcile the copied example with the current docs before finishing:
    • tool names and descriptions
    • annotations (readOnlyHint, destructiveHint, openWorldHint, idempotentHint when true)
    • _meta.ui.resourceUri and optional _meta["openai/outputTemplate"]
    • resource _meta.ui.csp, _meta.ui.domain, and openai/widgetDescription
    • URI versioning for template changes
    • local run/test instructions
  • State which example you chose and why.
  • If you rely on upstream code, note the source repo and branch/tag/commit when practical; avoid silently depending on a floating example shape for long-lived work.

Minimal Selection Heuristic

  • If the user asks for React + polished UI, start with official OpenAI examples.
  • If the user asks for vanilla HTML + tiny demo, start with the quickstart example; use the local fallback scaffold only if the quickstart is still too opinionated or unavailable.
  • If the user asks for portable MCP Apps wiring, start with @modelcontextprotocol/ext-apps examples.
  • If the user already has an app, adapt their code directly instead of importing a new example.

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a robust framework for scaffolding ChatGPT Apps SDK applications, including MCP servers and widget UIs. It includes a built-in scaffolding script and detailed guidance on security best practices like Content Security Policy (CSP) and domain validation.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    4/11 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at cb9153a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Activeupdated 7 months ago

README badge

README badge for openai/skills/chatgpt-apps

Scaffolds ChatGPT Apps SDK implementations with MCP server and widget UI, using a docs-first workflow that references current Apps SDK guidance before generating code. Targets tool planning, MCP server registration, widget scaffolding with the MCP Apps bridge, and validation against the Apps SDK contract. Integrates with the openai-docs skill to keep generated code aligned with official examples and patterns.

Generated from the current SKILL.md.

Does this skill work with Python MCP servers or only Node.js?
The skill supports both. It defaults to Node.js examples and includes a Node fallback scaffold, but explicitly asks about backend language during planning and can scaffold Python MCP servers when requested.
What's the relationship between this skill and the openai-docs skill?
This skill requires a docs-first workflow and must be paired with openai-docs (or the OpenAI docs MCP server directly) before generating code. Always fetch current Apps SDK docs before writing scaffolds.
Does this help with apps already built, or only greenfield projects?
It handles both. The skill can scaffold new apps, refactor existing ones against current docs, validate repos against the minimum working contract, and plan tool surfaces or architecture changes.
What happens if I want to use React for the widget?
The skill can scaffold React widgets. It prefers official OpenAI examples first when they match your stack, or adapts ext-apps React examples, and falls back to vanilla HTML only when no closer match exists.
Can this skill help with submission to the ChatGPT directory?
Yes. The skill includes an `submission-ready` archetype and can generate production-ready scaffolds with tool annotations, CSP, URI versioning, and guides for deployment and submission workflows.

Generated from the current SKILL.md. These answers refresh after source changes.