chatgpt-apps – skill Thiết kế & UI cho agent AI
Xây dựng, scaffold, refactor và xử lý sự cố ứng dụng ChatGPT Apps SDK kết hợp máy chủ MCP và giao diện widget. Dùng khi Codex cần thiết kế tool, đăng ký tài nguyên UI, kết nối cầu nối MCP Apps hoặc API tương thích ChatGPT, áp dụng metadata, CSP hoặc cấu hình domain của Apps SDK, hoặc tạo cấu trúc dự án đúng theo tài liệu
Cài skill chatgpt-apps bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/chatgpt-apps-f0606.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /chatgpt-apps – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/chatgpt-apps-f0606.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $chatgpt-apps – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/chatgpt-apps-f0606.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /chatgpt-apps – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/chatgpt-apps-f0606.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /chatgpt-apps – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
ChatGPT Apps
Overview
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:
- A primary app-archetype classification and repo-shape decision
- A tool plan (names, schemas, annotations, outputs)
- An upstream starting-point recommendation (official example, ext-apps example, or local fallback scaffold)
- An MCP server scaffold (resource registration, tool handlers, metadata)
- A widget scaffold (MCP Apps bridge first,
window.openaicompatibility/extensions second) - A reusable Node +
@modelcontextprotocol/ext-appsstarter scaffold for low-dependency fallbacks - A validation report against the minimum working repo contract
- Local dev and connector setup steps
- A short stakeholder summary of what the app does (when requested)
Mandatory Docs-First Workflow
Use $openai-docs first whenever building or changing a ChatGPT Apps SDK app.
1. Invoke $openai-docs (preferred) or call the OpenAI docs MCP server directly.
2. Fetch current Apps SDK docs before writing code, especially (baseline pages):
apps-sdk/build/mcp-serverapps-sdk/build/chatgpt-uiapps-sdk/build/examplesapps-sdk/plan/toolsapps-sdk/reference
3. Fetch apps-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.
4. Fetch deployment/submission docs when the task includes local ChatGPT testing, hosting, or public launch:
apps-sdk/deployapps-sdk/deploy/submissionapps-sdk/app-submission-guidelines
5. Cite the docs URLs you used when explaining design choices or generated scaffolds.
6. Prefer current docs guidance over older repo patterns when they differ, and call out compatibility aliases explicitly.
7. If doc search times out or returns poor matches, fetch the canonical Apps SDK pages directly by URL and continue; do not let search failure block scaffolding.
If $openai-docs is unavailable, use:
mcp__openaiDeveloperDocs__search_openai_docsmcp__openaiDeveloperDocs__fetch_openai_doc
Read 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.
Prompt Guidance
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:
- Use case and primary user flows
- Read-only vs mutating tools
- Demo vs production target
- Private/internal use vs public directory submission
- Backend language and UI stack
- Auth requirements
- External API domains for CSP allowlists
- Hosting target and local dev approach
- Org ownership/verification readiness (for submission tasks)
Classify The App Before Choosing Code
Before choosing examples, repo shape, or scaffolds, classify the request into one primary archetype and state it.
tool-onlyvanilla-widgetreact-widgetinteractive-decoupledsubmission-ready
Infer the archetype unless a missing detail is truly blocking. Use the archetype to choose:
- whether a UI is needed at all
- whether to preserve a split
server/+web/layout - whether to prefer official OpenAI examples, ext-apps examples, or the local fallback scaffold
- which validation checks matter most
- whether
searchandfetchshould be the default read-only tool surface
Read references/app-archetypes.md for the decision rubric.
Default Starting-Point Order
For greenfield apps, prefer these starting points in order:
1. Official OpenAI examples when a close example already matches the requested stack or interaction pattern.
2. Version-matched @modelcontextprotocol/ext-apps examples when the user needs a lower-level or more portable MCP Apps baseline.
3. 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.
Build Workflow
0. Classify The App Archetype
Pick one primary archetype before planning tools or choosing a starting point.
- Prefer a single primary archetype instead of mixing several.
- If the request is broad, infer the smallest archetype that can still satisfy it.
- Escalate to
submission-readyonly when the user asks for public launch, directory submission, or review-ready deployment. - Call out the chosen archetype in your response so the user can correct it early if needed.
1. Plan Tools Before Code
Define the tool surface area from user intents.
- Use one job per tool.
- Write tool descriptions that start with "Use this when..." behavior cues.
- Make inputs explicit and machine-friendly (enums, required fields, bounds).
- Decide whether each tool is data-only, render-only, or both.
- Set annotations accurately (
readOnlyHint,destructiveHint,openWorldHint; addidempotentHintwhen true). - If the app is connector-like, data-only, sync-oriented, or intended for company knowledge or deep research, default to the standard
searchandfetchtools instead of inventing custom read-only equivalents. - For educational/demo apps, prefer one concept per tool so the model can pick the right example cleanly.
- Group demo tools by learning objective: data into the widget, widget actions back into the conversation or tools, host/layout environment signals, and lifecycle/streaming behavior.
Read references/search-fetch-standard.md when search and fetch may be relevant.
2. Choose an App Architecture
Choose the simplest structure that fits the goal.
- Use a minimal demo pattern for quick prototypes, workshops, or proofs of concept.
- Use a decoupled data/render pattern for production UX so the widget does not re-render on every tool call.
Prefer the decoupled pattern for non-trivial apps:
- Data tools return reusable
structuredContent. - Render tools attach
_meta.ui.resourceUriand optional_meta["openai/outputTemplate"]. - Render tool descriptions state prerequisites (for example, "Call
searchfirst").
2a. Start From An Upstream Example When One Fits
Default to upstream examples for greenfield work when they are close to the requested app.
- Check the official OpenAI examples first for ChatGPT-facing apps, polished UI patterns, React components, file upload flows, modal flows, or apps that resemble the docs examples.
- Use
@modelcontextprotocol/ext-appsexamples when the request is closer to raw MCP Apps bridge/server wiring, or when version-matched package patterns matter more than ChatGPT-specific polish. - Pick the smallest matching example and copy only the relevant files; do not transplant an entire showcase app unchanged.
- After copying, reconcile the example with the current docs you fetched: tool names/descriptions, annotations,
_meta.ui.*, CSP, URI versioning, and local run instructions. - State which example you chose and why in one sentence.
Read references/upstream-example-workflow.md for the selection and adaptation rubric.
2b. Use the Starter Script When a Low-Dependency Fallback Helps
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.
- Run it only after fetching cur
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- baoyu-comic – Công cụ tạo truyện tranh kiến thức, hỗ trợ nhiều phong cách nghệ thuật và giọng điệu…
- canvas-design – Tạo tác phẩm hình ảnh đẹp dưới dạng tài liệu .png và .pdf dựa trên triết lý thiết kế…
- image-generator – Tạo hoặc chỉnh sửa ảnh từ văn bản và file cục bộ, URL ảnh hoặc data URL qua image API…
- adversarial-ux-test – Nhập vai người dùng thù địch để tìm và phân loại các điểm đau UX.
- brand-guidelines – Áp dụng màu thương hiệu và kiểu chữ chính thức của Anthropic cho mọi loại sản phẩm có…
- baoyu-compress-image – Nén ảnh sang WebP (mặc định) hoặc PNG với tự động chọn công cụ. Dùng khi người dùng yêu…
- ai-presenter-video – Tạo video người thuyết trình AI đã xác minh từ kịch bản + ảnh.
- canvas-design – Tạo tác phẩm hình ảnh đẹp dưới dạng tài liệu .png và .pdf theo triết lý thiết kế. Nên…