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.
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.
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.