/web:chatgpt-app-sdkfrom web
Guides building ChatGPT apps with the OpenAI Apps SDK, MCP, and component-based UI patterns. Covers display modes, state management, server patterns, and critical setup requirements like CORS and widget routing.
Ships in web. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build ChatGPT apps using the OpenAI Apps SDK, Model Context Protocol (MCP), and component-based UI patterns.
| Topic | Guide |
|---|---|
| Display modes, visual design, accessibility | ui-guidelines.md |
| MCP architecture, tools, and server patterns | mcp-server.md |
| React patterns and window.openai API | ui-components.md |
| React hooks (useOpenAiGlobal, useWidgetState) | react-integration.md |
| Three-tier state architecture and best practice | state-management.md |
| Issue | Prevention |
|---|---|
| CORS blocking | Enable https://chatgpt.com origin on endpoints |
| Widget 404s | Use ui://widget/ prefix format for widget resources |
| Plain text display | Set MIME type to text/html+skybridge for widgets |
| Tool not suggested | Use action-oriented descriptions in tool definitions |
| Missing widget data | Pass initial data via _meta.initialData field |
| CSP script blocking | Reference external scripts from allowed CDN origins |
Every other page in this skill defers to this rule.
structuredContent, content, _meta, and widget state all reach the user's
browser. _meta is widget-visible transport, not a private channel: the model
does not read it, but the user can. Authorise and project on the server first,
then send only the projection the current view renders.
Keep server-side: credentials, records the signed-in user may not see, internal fields the view does not render, raw diagnostics, stack traces, and technical logs. Return safe error content with an opaque correlation ID for support cases.
Send only the page or slice the view renders. To show more, return an opaque cursor or page argument and fetch the next page with another tool call.
Is this a multi-step workflow or deep exploration?
├── Yes → Fullscreen
└── No → Is this a parallel activity (game, live session)?
├── Yes → Picture-in-Picture (PiP)
└── No → Inline
├── Single item with quick action → Inline Card
└── 3-8 similar items → Inline Carousel
Is this data from your API/database?
├── Yes → MCP Server (Business Data)
│ Return in structuredContent from tool calls
└── No → Is it user preference/cross-session data?
├── Yes → Backend Storage (via OAuth)
└── No → Widget State (UI-scoped, model-visible)
Use window.openai.widgetState / useWidgetState
Treat widget state as model-visible context, not private client storage: ChatGPT carries it into the conversation, where it costs tokens on later turns and the user can read it. Keep only identifiers and view preferences, such as selected ID, current page, current step, and sort order. Never keep answers, records, file contents, or credentials there; store those on the server and re-fetch them with a tool call.
A widget runs only while ChatGPT renders it. It cannot run in the background, wake up later, or act after the user leaves the conversation. Put scheduled work, waiting, and outbound notifications on the MCP server or another system you control, and let the next tool call report the result.
Is this action:
- Atomic and standalone?
- Invokable by the model via natural language?
- Returning structured data?
├── Yes → Create public tool (model-accessible)
└── No → Is it only for widget interactions?
├── Yes → Use private tool ("openai/visibility": "private")
└── No → Handle within existing tool logic
Does the model need this data to:
- Understand results?
- Generate follow-ups?
- Reason about next steps?
├── Yes → structuredContent (concise, model-readable)
└── No → _meta (the authorised projection the widget renders)
Display-only data (precomputed series, layout hints) belongs in _meta; the
model does not reason about it. Apply the payload boundary rule to both halves.
Does this require:
- User input beyond text?
- Structured data visualization?
- Interactive selection/filtering?
├── Yes → Custom UI component
└── No → Return plain text/markdown in content
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/browser-testingWHEN authoring or repairing real-browser journeys or automated screenshot comparisons with the project's selected runner; NOT DOM-only tests, interactive visual judgement or verification-recipe maintenance; provides native-runner fixtures, assertions and visual-comparison guidance./cssUSE WHEN writing, fixing or reviewing plain CSS or Sass for a web page, even a one-line change, including a rule that loses to another, a third-party stylesheet you cannot edit, units, spacing between components, shorthands, skip links, hidden and focus styles, or deleting styles that look unused; NOT WHEN the project uses Tailwind (tailwind.config.js, utility classes, CVA variants, Tailwind theme tokens); produces CSS that wins the cascade without ID selectors or reactive !important, scales with the reader's text size, keeps spacing in the parent and deletes styles only on evidence./frontend-testingUSE WHEN testing non-React UI (vanilla JavaScript or TypeScript DOM code, a web component, or a Vue, Svelte or Angular component) with DOM Testing Library in Vitest or Jest with jsdom: writing, fixing or reviewing a test, or a request to add an end-to-end journey or a layout check to that suite; NOT WHEN the code or project uses React or React Testing Library (use web:react-testing), for XState actors (web:xstate), or for Playwright, Cypress or screenshot-comparison work in a real browser; covers queries, accessible names, userEvent, async results, network stubs and assertions that pass for the wrong reason, and declines what jsdom cannot prove while offering the part that fits./reactUSE WHEN changing the logic, data, props, state, Effects or rendered text of a React component, hook or page, even a one-line change; NOT WHEN the request is styling only (class names, Tailwind, CSS, dark mode, spacing, shadows) or tests only, or when it models submit, in-flight, loading, retry or failure states, even for a named React form (xstate covers that, including its React wiring); applies React 19 composition, state, Effect, structure, API and performance rules with only the project's installed libraries./react-testingUSE WHEN writing, fixing or reviewing a React Testing Library test for a component, hook or context provider, even one small test, or when asked for an end-to-end journey inside a Vitest or React Testing Library suite; NOT WHEN changing the component itself (react), testing XState actors or @xstate/react (xstate), or writing a Playwright or Cypress test; covers renderHook, providers, async results, forms and false-pass anti-patterns, and declines end-to-end journeys with the testable slices./refactoringWHEN you need a plan to refactor, restructure, or clean up working code and the test result is known, either green or a recorded failing set; NOT for new feature delivery or any behavior change; reversible-baseline safety with prioritized improvements.npx claudepluginhub mintuz/skills --plugin webOther plugins' skills for the same job