把常用流程沉淀成 Skills
当某个 Codex thread、review rules、test commands、release checklist、design conventions
当某个 Codex thread、review rules、test commands、release checklist、design conventions、writing examples 或 repo-specific scripts 反复有用时,不要每次都重贴 prompt。把它做成一个 skill,让 Codex 后续线程可以直接调用。
官方页面:https://developers.openai.com/codex/use-cases/reusable-codex-skills
适合什么任务
| 场景 | Codex 应该做什么 |
|---|---|
| 有一个已经跑通的 workflow 想复用 | 用 $skill-creator 把上下文、规则和命令沉淀成 skill |
| 团队不想每个 thread 粘贴长 prompt | 写成 $skill-name,让未来任务按 description 自动触发 |
| workflow 依赖 repo 命令、runbook、review rubric 或 good output | 把这些材料变成 SKILL.md、references、scripts 或 assets |
使用的能力
| 能力 | 用法 | 链接 |
|---|---|---|
$skill-creator | 收集 workflow 信息,scaffold skill,保持主说明简短,并验证结果 | https://github.com/openai/skills/tree/main/skills/.system/skill-creator |
相关官方说明:
- Agent skills:https://developers.openai.com/codex/skills
- Codex plugins:https://developers.openai.com/codex/plugins
起始提示词
请使用 $skill-creator 创建一个 Codex skill,用来 [修复 GitHub PR 上失败的 Buildkite checks / 把 PR notes 转成 inline review comments / 根据已合并 PR 写 release notes]。
创建 skill 时使用这些来源:
- Working example:[写 "use this thread",链接一个 merged PR,或粘贴一份好的 Codex answer]
- Source:[粘贴 Slack thread、PR review link、runbook URL、docs URL 或 ticket]
- Repo:[repo path;如果这个 skill 依赖某个 repo]
- 要复用的 scripts 或 commands:[test command]、[preview command]、[log-fetch script]、[release command]
- Good output:[粘贴你希望未来 threads 对齐的 Slack update、changelog entry、review comment、ticket 或 final answer]这个 prompt 要给 $skill-creator 一个 working example 和 good output。skill 不是抽象愿望,而是把跑通过的工作方式固定下来。
使用步骤
-
添加上下文 留在你想保留的 Codex thread 里,粘贴 Slack thread 或 docs link,并加入 Codex 应记住的 rule、command 或 example。
-
运行 starter prompt prompt 命名你要的 skill,并把 thread、doc、PR、command 或 output 交给
$skill-creator。 -
让 Codex 创建并验证 skill 结果应该定义
$skill-name,说明何时触发,并把 reusable instructions 放在正确位置。 -
使用 skill,再从 thread 更新它 在下一个 PR、alert、review、release note 或 design task 里调用
$skill-name。如果它用错 test command、漏掉 review rule、跳过 runbook step 或写出你不会发送的 draft,让 Codex 把修正加入 skill。
~/.codex/skills 里的 skills 可在任意 repo 使用;当前 repo 内的 skills 可以提交给 teammates 共用。
提供 Source Material
| 你已有的材料 | 应该给 Codex 什么 |
|---|---|
| 想保留的 Codex thread workflow | 留在该 thread,说 use this thread,让 Codex 用 conversation、commands、edits、feedback 作为起点 |
| docs 或 runbook | 粘贴 release checklist、链接 incident-response runbook、attach API PDF,或指向 repo 内 markdown guide |
| team conversation | 粘贴 Slack thread、PR review link、support conversation,说明 alert、frontend rules 或 customer problem |
| 要复用的 scripts 或 commands | test command、preview command、release script、log-fetch script、local helper command |
| good result | merged PR、final changelog entry、accepted launch note、resolved ticket、before/after screenshot、final Codex answer |
如果 source 在 Slack、Linear、GitHub、Notion 或 Sentry,可以用 Codex plugin 连接,也可以在 starter prompt 中 mention,或把相关片段粘贴进 thread。
Codex 会创建什么
多数 skills 从 SKILL.md 开始。$skill-creator 可以在 workflow 需要时添加 longer references、scripts 或 assets。
一个好的 skill 应该:
- description 说清触发场景。
- main instructions 简短。
- 复杂细节放 references。
- 可执行命令放 scripts 或明确步骤。
- 有验证方式。
可以创建的 Skills
$buildkite-fix-ci:下载 failed job logs,诊断错误,提出最小代码修复。$fix-merge-conflicts:checkout GitHub PR,基于 base branch 更新,解决 conflicts,返回 exact push command。$frontend-skill:记录 UI taste、existing components、screenshot QA loop、asset choices、browser polish pass。$pr-review-comments:把 review notes 转成 concise inline comments,带正确语气和 GitHub links。$web-game-prototyper:定义 first playable loop,选择 assets,调整 game feel,截图并在 browser 中 polish。