> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/ai-coding-assistant/supported-coding-agents.md).

# 受支持的编码代理

Convai Unity SDK 会为每个受支持的编码代理——Codex、Claude Code、Cursor、Gemini 和 VS Code Copilot——在项目文件中安装一个受管理的指令块。请使用此参考来查找每个代理的确切文件路径和安装行为。

### 按代理分类的受管理指令文件

| 代理              | 受管理文件                                | 位置                  |
| --------------- | ------------------------------------ | ------------------- |
| Codex           | `AGENTS.md`                          | 项目根目录               |
| Claude Code     | `CLAUDE.md`                          | 项目根目录               |
| 游标              | `.cursor/rules/convai-unity-sdk.mdc` | `.cursor/rules/` 目录 |
| Gemini          | `GEMINI.md`                          | 项目根目录               |
| VS Code Copilot | `.github/copilot-instructions.md`    | `.github/` 目录       |

SDK 会将每个路径解析为相对于 Unity 项目根目录，而不是包文件夹。

### SDK 如何安装受管理块

所有五个代理的安装逻辑都相同。当你触发安装或更新时，SDK 会读取目标文件（如果存在），移除任何已由 `<!-- BEGIN CONVAI UNITY SDK -->` 和 `<!-- END CONVAI UNITY SDK -->`分隔的现有块，并在文件末尾追加一个新的块。如果文件不存在，SDK 会创建它，并包含任何缺失的父目录，例如 `.cursor/rules/` 或 `.github/`。标记分隔符之外的内容会被保留，写入会匹配文件现有的行尾（`\r\n` 或 `\n`).

{% hint style="info" %}
安装、更新或移除受管理块是手动操作——不会自动运行。请从 **AI Coding** 部分触发它，该部分位于 Convai 编辑器窗口中，可从 **Convai > Convai Editor**.
{% endhint %}

已安装的块会指示代理读取 `Packages/com.convai.convai-sdk-for-unity/AIAssistantSkills/convai-unity-sdk/SKILL.md` 及其链接引用，用于 Convai 特定工作流，并使用 Unity MCP 工具执行通用的场景、GameObject、资源、脚本、控制台和 Play Mode 操作，同时将 [Convai 自己的工具](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/ai-coding-assistant/mcp-tools-reference.md) 保留用于 SDK 特定的配置和诊断。

### 代理特定说明

| 代理              | 注意                                                                            |
| --------------- | ----------------------------------------------------------------------------- |
| Codex           | 首次安装时会在项目根目录创建。无需额外目录。                                                        |
| Claude Code     | 首次安装时会在项目根目录创建。无需额外目录。                                                        |
| 游标              | SDK 会创建 `.cursor/rules/` 目录（如果不存在）。位于受管理块上方的任何现有 Cursor 规则 frontmatter 都会被保留。 |
| Gemini          | 首次安装时会在项目根目录创建。无需额外目录。                                                        |
| VS Code Copilot | SDK 会创建 `.github/` 目录（如果不存在）。                                                 |

### 下一步

{% content-ref url="/pages/d8c18409ae9c4e08b59f112c685f31eedd8cba20" %}
[AI 编码助手](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/ai-coding-assistant.md)
{% endcontent-ref %}

{% content-ref url="/pages/fef78cf340cc23d3c5966ea9c7099beadba8f247" %}
[AI 编码助手快速上手](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/ai-coding-assistant/quick-start.md)
{% endcontent-ref %}

{% content-ref url="/pages/2556d68ab00a9475a0e5c6ca8c0541b3d69dc561" %}
[MCP 工具参考](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/ai-coding-assistant/mcp-tools-reference.md)
{% endcontent-ref %}

{% content-ref url="/pages/19bff3d08fa0ba480410597a8a790b68a4f73b14" %}
[排查 AI 编码助手设置](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/ai-coding-assistant/troubleshooting.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/ai-coding-assistant/supported-coding-agents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
