This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

AI代理和博览会概览

使用 Claude Code、Codex 和 Cursor 等 AI 编码代理构建和发布 Expo 与 React Native 应用。


Claude Code、Codex、Cursor 及其他 AI 编码代理可以帮助你构建、升级、调试和部署你的 Expo 和 React Native 项目。当你使用 create-expo-app 创建新项目时,该新项目已经配置好了 AI 代理所需的配置文件。这个设置也会提交到你的项目中,因此团队中的每个人都从相同的 SDK 版本和项目说明开始,他们的代理也会读取相同的项目上下文。

🌐 Claude Code, Codex, Cursor, and other AI coding agents can help you build, upgrade, debug, and deploy your Expo and React Native projects. When you use create-expo-app to create a new project, that new project is already set up with the configuration files required by an AI agent. This setup is also committed to your project, so everyone on your team starts from the same SDK version and project instructions, and their agents read the same project context.

Expo如何支持人工智能代理

🌐 How Expo supports AI agents

三部分共同作用,为 AI 代理提供一致的、Expo 特定的上下文:

🌐 Three pieces work together to give an AI agent consistent, Expo-specific context:

  • Expo 技能: 一个为代理添加特定于 Expo 的指令和斜杠命令的插件。代理会应用已知良好的 Expo 模式(SDK 升级、EAS 工作流、使用 Jetpack Compose 和 SwiftUI 的原生 UI、API 路由),而不是从训练数据中猜测。技能每台机器安装一次。
  • Expo MCP 服务器: 一个远程模型上下文协议(MCP)服务器,为代理提供对最新 Expo 文档、EAS 构建历史、EAS 更新通道和 TestFlight 元数据的实时访问。代理可以通过它安装与 SDK 匹配的软件包、读取构建日志以及截取模拟器的屏幕截图。
  • 项目上下文文件: create-expo-app 在项目根目录下编写 AGENTS.mdCLAUDE.md.claude/settings.json。当你打开项目时,这是代理首先读取的内容。它们会引导代理查看与你的项目目标版本的 Expo SDK 相关的文档。

设置 Expo 技能和 Expo MCP 服务器

🌐 Set up Expo Skills and Expo MCP Server

Expo 技能和 Expo MCP 服务器适用于每个受支持的代理。按照以下指南设置每一个:

🌐 Expo Skills and the Expo MCP Server work with every supported agent. Set up each one by following the guides below:

Expo 技能

安装教授代理已知良好 Expo 模式的插件,并浏览可用技能的完整列表。

Expo MCP 服务器

连接远程 Expo MCP 服务器以让代理实时访问 Expo 文档和 EAS。

选择一个代理

🌐 Pick an agent

每个代理指南都涵盖了该代理的安装、设置和示例提示:

🌐 Each per-agent guide covers install, setup, and example prompts for that agent:

克劳德代码

使用 Expo 设置 Anthropic 的终端代理,包括项目背景和示例提示。

法典

使用 Expo 设置 OpenAI 的终端代理,包括项目上下文和示例提示。

光标

使用 Expo 设置以 AI 为先的代码编辑器,包括项目上下文和示例提示。

代理的项目上下文文件

🌐 Project context files for agents

每个代理都会在不同的地方寻找项目上下文。create-expo-app CLI 并不强制使用一种约定,而是在使用 CLI 创建新的 Expo 项目时,会将以下配置文件添加到项目根目录:

🌐 Each agent looks for project context in a different place. Instead of forcing one convention, create-expo-app CLI adds the following configuration files to a project's root when you create a new Expo project using the CLI:

文件读取者目的
AGENTS.mdCodex 和 Cursor 直接读取。Claude Code 通过 CLAUDE.md 读取。指导代理使用与你项目的 SDK 相匹配的 Expo 文档。这是项目级指令的权威来源。
CLAUDE.mdClaude Code 启动时读取。包含 @AGENTS.md,它将 AGENTS.md 导入到 Claude Code 的上下文中。
.claude/settings.jsonClaude Code 启动时读取。预先启用 Claude Code 插件市场中的官方 Expo 插件。

每个文件针对不同的代理约定,因此同一个项目可以在 Claude Code、Codex 或 Cursor 上运行,而无需为每个代理进行配置。

🌐 Each file targets a different agent convention, so the same project works with Claude Code, Codex, or Cursor without per-agent configuration.

验证设置

🌐 Verify the setup

要确认代理可以读取你的项目,请在你的 Expo 项目中为 AI 代理打开一个会话并运行此提示:

🌐 To confirm an agent can read your project, open a session for your AI agent within your Expo project and run this prompt:

Example prompt
Open package.json and tell me which Expo SDK version this project targets.

如果代理回复的是来自 package.json 的 SDK 版本,则说明代理正在正确读取你的项目。

🌐 If the agent replies with the SDK version from package.json, the agent is reading your project correctly.

代理工具包

🌐 Agent toolkits

选择一个代理 中提到的代理会阅读你的代码和文档等内容。为了让代理在运行时也能对你的 Expo 项目进行操作,可以将其与第三方工具包配对。然后,代理工具包可以通过流程、读取日志、检查 React 组件树以及分析性能。

🌐 The agents mentioned in Pick an agent read your code and documentation, among other things. To let an agent also act on your Expo project while it runs, pair it with a third-party toolkit. An agent toolkit can then tap through flows, read logs, inspect the React component tree, and profile performance.

来自 Software Mansion 的一个主动工具包,通过 MCP 连接来控制、调试和分析你在 Android 模拟器或 iOS 模拟器上的应用。