> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 可扩展性概览

> 使用规则、技能和 MCP 服务器自定义并扩展 Devin CLI

Devin CLI 设计为高度可定制。你可以通过项目或主目录中的配置文件，定义 Agent 的行为方式、它可访问的工具，以及它如何响应事件。

<CardGroup cols={2}>
  <Card title="规则与 AGENTS.md" icon="scroll" href="/zh/cli/extensibility/rules">
    提供始终生效的上下文和指示，在每次会话中引导 Agent 的行为。
  </Card>

  <Card title="技能" icon="wand-magic-sparkles" href="/zh/cli/extensibility/skills/overview">
    创建可复用的提示和工作流程，Agent 可以将其作为斜杠命令调用，或自主使用。
  </Card>

  <Card title="插件" icon="box" href="/zh/cli/extensibility/plugins/overview">
    在各个项目间安装和共享技能包。
  </Card>

  <Card title="自定义子 Agent" icon="users" href="/zh/cli/subagents#custom-subagents">
    定义专门的子 Agent Profile，并为其配置各自的系统提示、工具和模型。
  </Card>

  <Card title="MCP 服务器" icon="server" href="/zh/cli/extensibility/mcp/overview">
    连接外部工具服务器，让 Agent 能够访问 API、数据库等资源。
  </Card>

  <Card title="钩子" icon="rotate" href="/zh/cli/extensibility/hooks/overview">
    在 Agent 生命周期的关键节点运行 shell 命令或 LLM 提示，以强制执行策略并自动化工作流程。
  </Card>
</CardGroup>

***

<div id="how-it-all-fits-together">
  ## 它们如何协同配合
</div>

这些功能在不同层面发挥作用：

* **规则** 决定 Agent 的行为风格和约束条件——始终保持生效。
* **技能** 为 Agent 提供可按需调用的新能力。
* **自定义子 Agent** 定义专门的工作者配置，Agent 可以将任务交给它们处理。
* **MCP 服务器** 为 Agent 提供可调用的全新工具。
* **钩子** 会在生命周期事件中运行 shell 命令或 LLM 提示 (例如在工具运行前) ，以强制执行策略或触发工作流程。

你可以在同一个项目中组合使用这些功能。例如，你可以有一个包含编码规范的 `AGENTS.md` 文件、一个用于代码审查的 `review` 技能、一个用于 issue 跟踪器的 MCP 服务器，以及用于阻止破坏性命令的 钩子。

***

<div id="where-configuration-lives">
  ## 配置存放位置
</div>

所有项目级扩展配置都存放在你项目根目录下的 `.devin/` 目录中：

```
my-project/
├── .devin/
│   ├── config.json          # 项目配置（MCP、权限）
│   ├── config.local.json    # 个人覆盖配置（已加入 gitignore）
│   ├── hooks.v1.json        # 生命周期钩子（兼容 Claude Code）
│   ├── skills/
│   │   └── review/
│   │       └── SKILL.md     # 自定义 skill
│   └── agents/
│       └── reviewer/
│           └── AGENT.md     # 自定义子 Agent 的 Profile
├── AGENTS.md                # 项目规则
└── src/
```

用户级配置存放在 `~/.config/devin/` 中，适用于所有项目。在 Windows 上，此路径则为 `%APPDATA%\devin\`。

<Tip>
  文件名中包含 `.local.` 的文件会自动被 Git 排除，因此你可以使用个人覆盖设置，而不会影响你的团队。
</Tip>

***

<div id="importing-from-other-tools">
  ## 从其他工具导入
</div>

Devin CLI 可以读取你可能已在使用的其他 AI 编程工具中的配置：

| Source                                       | 导入内容                                                                                           |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `AGENTS.md` / `AGENT.md` / `CLAUDE.md`       | 规则 (始终生效的上下文)                                                                                  |
| `.cursor/rules/*.md` / `.cursor/rules/*.mdc` | 规则                                                                                             |
| `.windsurf/rules/*.md`                       | 规则                                                                                             |
| `.claude/` directory                         | 命令、[自定义子 Agent](/zh/cli/subagents#custom-subagents)、[钩子](/zh/cli/extensibility/hooks/overview) |

这意味着你无需重写现有配置即可开始使用 Devin CLI。导入默认启用，并且可在配置文件中控制：

```json theme={null}
{
  "read_config_from": {
    "cursor": true,
    "windsurf": true,
    "claude": true
  }
}
```

将任意提供程序设为 `false`，即可禁用从该提供程序导入。
