跳到正文
Skillpedia
通用编程34k · #8422

performance-goal

它能做什么

这个技能引导智能体以可衡量、以目标为导向的方式让你的代码变快。适合希望证明每项改动确实有效的开发者。

适用场景

  • ✓当你想减少启动时间、延迟或其他可衡量的速度指标的时候。
  • ✓当你需要每项优化都通过可重复的基准测试或测试来检查的时候。
  • ✓当你希望把性能目标的进展保存为记录的时候。

技能链接

https://github.com/Yeachan-Heo/oh-my-codex/blob/main/plugins/oh-my-codex/skills/performance-goal/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Yeachan-Heo/oh-my-codex/blob/main/plugins/oh-my-codex/skills/performance-goal/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把我们 CLI 的启动时间减少 20%,并用基准测试证明每一项改动的效果。”

每周 5 个新技能,1 分钟读完。

工作原理

在开始任何工作之前,它会设置一个评估命令和通过或失败的规则。然后它会记录带有证据的检查点,只有在获得通过结果并经过审核后,才会把目标标记为完成。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Performance Goal Workflow

Use this skill when a user asks OMX to optimize performance and wants a goal-oriented loop rather than a one-off review.

Contract

  • OMX owns durable workflow state under .omx/goals/performance/<slug>/.
  • Codex goal mode owns only the active-thread focus/accounting primitive.
  • Shell commands do not mutate hidden Codex goal state. They write artifacts and emit model-facing handoff text.
  • No optimization work may start until an evaluator command and pass/fail contract exist.
  • Do not call update_goal({status: "complete"}) until the evaluator has a passing checkpoint and a completion audit proves the objective is done; then call get_goal again and pass that fresh snapshot to omx performance-goal complete --codex-goal-json.

CLI

Create the workflow and evaluator contract:

omx performance-goal create \
  --objective "Reduce CLI startup latency by 20%" \
  --evaluator-command "npm run perf:startup" \
  --evaluator-contract "PASS when p95 latency improves by 20% and regression tests pass" \
  --slug startup-latency

Emit the Codex goal handoff:

omx performance-goal start --slug startup-latency

Record evaluator evidence:

omx performance-goal checkpoint --slug startup-latency --status pass --evidence "benchmark + tests passed"
omx performance-goal checkpoint --slug startup-latency --status fail --evidence "benchmark regressed"
omx performance-goal checkpoint --slug startup-latency --status blocked --evidence "missing fixture"

Complete only after a passing checkpoint:

omx performance-goal complete --slug startup-latency --evidence "final evaluator evidence" --codex-goal-json <get_goal-json-or-path>

Agent Loop

  1. Run omx performance-goal create if no workflow exists.
  2. Run omx performance-goal start and follow the handoff:
    • call get_goal;
    • call create_goal only when no active goal exists and the objective is explicit;
    • work only against the evaluator contract;
    • after evaluator pass and completion audit, call update_goal({status: "complete"}), call get_goal again, and pass that snapshot to omx performance-goal complete --codex-goal-json;
    • after omx performance-goal complete succeeds, run /goal clear in the Codex UI before starting another goal in this same thread/session; OMX prints this terminal cleanup step but does not invoke hidden clear routes;
  3. Optimize in small reversible patches.
  4. Run the evaluator and related regression tests.
  5. Record each pass/fail/blocker with checkpoint.
  6. Complete only when the pass artifact exists and no required work remains.

Completion Gate

A performance goal is incomplete unless .omx/goals/performance/<slug>/state.json contains a lastValidation.status of pass and omx performance-goal complete receives a matching complete Codex get_goal snapshot via --codex-goal-json. Passing ordinary tests alone is not sufficient unless they are the declared evaluator contract.

Lifecycle: create_goal starts the Codex thread goal, update_goal({status: "complete"}) marks terminal success after the evaluator and audit pass, and /goal clear removes the completed thread goal when another same-thread goal is needed. OMX shell commands and hooks reconcile snapshots and print the cleanup instruction; they must not mutate hidden Codex goal state.

常见问题

没有基准测试也能开始优化吗?

不能。在开始任何优化工作之前,必须先有评估命令和通过或失败的规则。

进度保存在哪里?

它的文件保存在项目内的一个性能目标文件夹中。

这是一次性的审阅吗?

不是。它是以目标为导向的循环,会持续进行,直到评估器确认结果。

详情

作者的原始描述

Run an evaluator-gated performance optimization workflow over Codex goal mode with durable OMX artifacts and safe goal handoffs.

repo: Yeachan-Heo/oh-my-codex

热度

GitHub 星标
34k
排名
#8422
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能