# 扩展与定制

> 用 AGENTS.md、规则、子智能体、Skills、MCP 和 Hooks 定制 Codex 的行为。

- 网址：https://funcoding.ai/agents/codex/build/
- 核实日期：2026-10-07（命令、配置和价格以官方文档为准）
- 官方来源：[Codex 官方文档：Custom instructions with AGENTS.md](https://learn.chatgpt.com/docs/agent-configuration/agents-md)

---
- [AGENTS.md：自定义指令](https://funcoding.ai/agents/codex/build/agents-md/)：全局和项目指令的发现顺序、覆盖和大小限制
- [规则（Rules）](https://funcoding.ai/agents/codex/build/rules/)：控制哪些命令可以在沙箱外运行
- [子智能体](https://funcoding.ai/agents/codex/build/subagents/)：并行运行专门的智能体，定义自定义智能体
- [Skills](https://funcoding.ai/agents/codex/build/skills/)：把可复用的工作流打包成 SKILL.md
- [MCP 服务器](https://funcoding.ai/agents/codex/build/mcp/)：接入外部工具和上下文
- [Hooks](https://funcoding.ai/agents/codex/build/hooks/)：在智能体循环的固定点运行脚本

- [Skill 发现与运行](https://funcoding.ai/agents/codex/build/skill-discovery/)：目录、上下文预算和显式调用
- [插件](https://funcoding.ai/agents/codex/build/plugins/)：安装、打包、市场与发布范围

- [MCP 工具策略](https://funcoding.ai/agents/codex/build/mcp-policy/)：超时、工具列表与审批
- [MCP OAuth](https://funcoding.ai/agents/codex/build/mcp-oauth/)：client、callback 和注册方式
- [Record & Replay](https://funcoding.ai/agents/codex/build/record-replay/)：用演示生成 Skill
