> For the complete documentation index, see [llms.txt](https://docs.neuron-ai.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neuron-ai.dev/neuron-v3-zh/gai-lan/agentic-development.md).

# AI 辅助开发

在使用 Claude Code、Opencode、Cursor 或其他类似工具等 AI 编码助手时，你可以引用 Neuron AI 文档，为 AI 提供关于我们组件的深度上下文。这会带来更准确的代码建议、更好地理解组件 API，并在生成 Neuron 代码时减少幻觉。

## Agent 技能

该 [Agent 技能规范](https://agentskills.io/) 是一个为 AI 编码助手提供结构化文档的标准。它通过一个组织良好的 Markdown 文件目录，帮助 AI 工具理解你项目的 API、约定和最佳实践。

Neuron 发布了一个 Agent 技能，为 AI 工具提供关于我们组件的全面信息，包括它们的 API、使用模式、接口等。

### 访问技能

Agent 技能位于 Neuron AI 的 vendor 目录中，路径如下：

```bash
vendor/neuron-core/neuron-ai/skills/
        └── neuron-agent-builder/
            └── SKILL.md
        └── neuron-debugger/
            └── SKILL.md
        └── neuron-evaluation-engineer/
            └── SKILL.md
        └── neuron-rag-specialist/
            └── SKILL.md
        └── neuron-structured-output/
            └── SKILL.md
        └── neuron-tool-creator/
            └── SKILL.md
        └── neuron-test-engineer/
            └── SKILL.md
        └── neuron-tool-creator/
            └── SKILL.md
        └── neuron-workflow-architect/
            └── SKILL.md

```

### 如何安装技能

你如何引用该技能取决于你使用的是哪种 AI 工具。

#### **Claude**

如果你使用 [Claude Code](https://claude.ai/code)，你可以使用 [skills CLI](https://skills.sh/):

```bash
npx skills add ./vendor/neuron-core/neuron-ai/skills
```

安装后，该技能将自动在 Claude Code 中可用。该技能以符号链接的形式安装，因此当你通过 composer 更新 Neuron 时，它会自动保持最新。

#### Cursor <a href="#cursor" id="cursor"></a>

在 [Cursor](https://cursor.sh/)，你可以通过以下方式将技能目录添加到项目的文档源： **Cursor Settings > Features > Docs**。将其指向 `vendor/neuron-core/neuron-ai/skills` .

#### 其他 AI 工具 <a href="#other-ai-tools" id="other-ai-tools"></a>

大多数支持 Agent Skills 规范的 AI 编码助手都可以使用该技能。请查看你的工具文档，了解如何添加自定义技能或文档源。

## MCP 服务器

这份文档也可以作为 Model Context Protocol（MCP）服务器提供，并支持搜索。这使 AI 助手能够直接访问 Neuron AI 文档内容。MCP 服务器地址如下： <https://docs.neuron-ai.dev/~gitbook/mcp>

### Claude Code

```
claude mcp add --transport http neuron-ai-doc https://docs.neuron-ai.dev/~gitbook/mcp
```

### VS Code

```json
"mcp": {
    "servers": {
        "neuron-ai-doc": {
            "type": "http",
            "url": "https://docs.neuron-ai.dev/~gitbook/mcp"
        }
    }
}
```

### Cursor

```json
{
  "mcpServers": {
    "neuron-ai-doc": {
        "url": "https://docs.neuron-ai.dev/~gitbook/mcp"
    }
  }
}
```

### Windsurf

```json
{
  "mcpServers": {
    "neuron-ai-doc": {
      "serverUrl": "https://docs.neuron-ai.dev/~gitbook/mcp"
    }
  }
}
```

### OpenCode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "neuron-ai-doc": {
      "type": "remote",
      "url": "https://docs.neuron-ai.dev/~gitbook/mcp",
      "enabled": true
    }
  }
}
```
