﻿---
title: "约定写进 AGENTS.md，运行时放进 config.toml"
summary: "测试命令、架构、禁止事项是指令；模型、沙箱、MCP、子代理是配置。混在一起会两边都难维护。"
category: config
level: starter
surfaces: [cli, app, ide]
tags: ["config.toml", "AGENTS.md", "职责"]
canonical: /tips/split-config-and-instructions/
---

# 约定写进 AGENTS.md，运行时放进 config.toml

测试命令、架构、禁止事项是指令；模型、沙箱、MCP、子代理是配置。混在一起会两边都难维护。

快速判断：

- 「做完前必须跑这个命令」→ `AGENTS.md`
- 「工作区范围的文件系统权限」→ `config.toml`
- 「发版走这七步」→ Skill
- 「这次不要改 API」→ 当前提示

`config.toml` 是操作控制面：模型、推理、沙箱、批准、MCP、子代理、feature flags。它不替代 `AGENTS.md`。

## 来源

- [AgentsCamp · config.toml](https://agentscamp.com/guides/configuration/codex-config-toml)
