Skip to content

Automations 自动化

Automations(自动化) 是 Codex App 提供的功能,让你按计划(cadence)在后台自动运行 Codex 任务

官方 best practices:

Once a workflow is stable, you can schedule Codex to run it in the background for you. In the Codex app, automations let you choose the project, prompt, cadence, and execution environment for a recurring task.

19.2 Skills 定义方法,Automations 定义时间

Section titled “19.2 Skills 定义方法,Automations 定义时间”

官方有一句关键判断标准:

Skills define the method, automations define the schedule. If a workflow still needs a lot of steering, turn it into a skill first. Once it’s predictable, automation becomes a force multiplier.

核心原则:

  • Skill = 定义“怎么做”
  • Automation = 定义“什么时候做”
  • 流程还不稳定 → 先做成 Skill
  • 流程稳定可预测 → 再做成 Automation

在 Codex App 的 Automations 标签页创建,需要配置:

配置项 说明
Project 在哪个项目运行
Prompt 执行的 prompt(可以调用 Skill)
Cadence 调度频率(定时)
Execution environment 执行环境:专用 git worktree 或本地环境

官方推荐:

  • 汇总最近 commits
  • 扫描潜在 bug
  • 生成 release notes
  • 检查 CI 失败
  • 生成站会摘要
  • 定期跑某类分析报告

📌 官方强调:不要过早自动化。

正确顺序:

  1. 先手动跑通
  2. 把方法沉淀成 Skill
  3. 确认输出稳定
  4. 再放到 automation 里定时执行

如果一个任务还需要你频繁盯着、反复纠正,就不适合直接自动化。

官方还推荐一个高级用法:用 automation 做反思与维护,不只是执行

  • review 最近的 sessions
  • 总结反复出现的摩擦点
  • 持续改进 prompt、指令、工作流

例如:每周自动跑一次“回顾本周的 session,总结哪里效率低,提出改进建议”。

Automation 可以选择在专用 git worktree 运行,避免干扰你当前的工作区。详见第 20 章。