skybridge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Creating Apps For LLMs

为LLM创建应用

Those are conversational experiences that extend AI assistants through tools and custom UI widgets. They're built as MCP servers invoked during conversations.
⚠️ The app is consumed by two users at once: the human and the AI Assistant LLM. They collaborate through the widget—the human interacts with it, the LLM sees its state. Internalize this before writing code: the widget is your shared surface.
SPEC.md keeps track of the app's requirements and design decisions. Keep it up to date as you work on the app.
No SPEC.md? Stop. → Read discover.md first. Nothing else until SPEC.md exists.
这些是通过工具和自定义UI组件扩展AI助手的对话式体验。它们以MCP服务器的形式构建,在对话过程中被调用。
⚠️ 该应用同时供两类用户使用:人类用户AI助手LLM。他们通过组件协作——人类与组件交互,LLM查看其状态。在编写代码前请牢记这一点:组件是你们的共享交互界面。
SPEC.md用于跟踪应用的需求和设计决策。在开发应用过程中请保持其内容更新。
没有SPEC.md?立即停止。 → 先阅读discover.md。在SPEC.md创建完成前,不要进行其他任何操作。

Setup

环境搭建

  1. Copy templatecopy-template.md: when starting a new project with ready SPEC.md
  2. Run locallyrun-locally.md: when ready to test, need dev server or ChatGPT/Claude connection
  1. 复制模板copy-template.md:当使用已准备好的SPEC.md启动新项目时
  2. 本地运行run-locally.md:当准备好进行测试、需要开发服务器或连接ChatGPT/Claude时

Architecture

架构设计

Design or evolve UX flows and API shape → architecture.md
设计或优化UX流程与API形态 → architecture.md

Implementation

开发实现

  • Fetch and render datafetch-and-render-data.md: when implementing server handlers and widget data fetching
  • State and contextstate-and-context.md: when persisting widget UI state and updating LLM context
  • Prompt LLMprompt-llm.md: when widget needs to trigger LLM response
  • UI guidelinesui-guidelines.md: display modes, layout constraints, theme, device, and locale
  • External linksopen-external-links.md: when redirecting to external URLs or setting "open in app" target
  • OAuthoauth.md: when tools need user authentication to access user-specific data
  • CSPcsp.md: when declaring allowed domains for fetch, assets, redirects, or iframes
  • 获取并渲染数据fetch-and-render-data.md:当实现服务器处理器和组件数据获取功能时
  • 状态与上下文state-and-context.md:当持久化组件UI状态并更新LLM上下文时
  • Prompt LLMprompt-llm.md:当组件需要触发LLM响应时
  • UI指南ui-guidelines.md:显示模式、布局约束、主题、设备和区域设置
  • 外部链接open-external-links.md:当重定向到外部URL或设置“在应用内打开”目标时
  • OAuthoauth.md:当工具需要用户认证以访问用户特定数据时
  • CSPcsp.md:当声明允许的获取、资源、重定向或iframe域名时

Deploy

部署上线

  • Ship to productiondeploy.md: when ready to deploy via Alpic
  • Publish to ChatGPT/Claude Directoriespublish.md: when ready to submit for review
  • 部署到生产环境deploy.md:当准备好通过Alpic进行部署时
  • 发布到ChatGPT/Claude目录publish.md:当准备好提交审核时