跳到正文
cccskills
免费在 GitHub 公开中文介绍

speed-up-ci

通过实测找出拉取请求的 CI 慢在哪些任务和步骤,逐项尝试提速,并比较前后结果;只有收益超过测量噪声且检查仍能发现相同问题时才保留改动。

原文查看原文说明

CI is slow, time to green, how long do checks take, p50/p90, make CI faster, speed up a job or spec, hillclimb CI. Use to measure PR CI time, find where a job's seconds go, and land speedups one measured change at a time without weakening any check.

different-ai/openwork星标 24,317(GitHub 24,317 + cccskills 0)
集成工具GitHubMySQL

实测评分 未实测

查看安装方法

适用场景

  • 测量 CI 完成时间
  • 定位缓慢的任务或测试
  • 比较改动前后的 CI 耗时
  • 保留检查并缩短 CI 时间

中文介绍

功能

此技能通过实测分析 CI 耗时,而不是凭感觉判断。它统计从拉取请求推送到必需检查通过,以及到所有 GitHub Actions 检查结束所需的时间,并以中位数和较高分位数记录基准。随后查看各任务、步骤的耗时和测试记录,定位时间花在哪里。每次只尝试一个改进假设,再在相近条件下比较结果。

适用场景

CI 运行缓慢但原因不清楚时,可以用它查找耗时较长的任务或测试。团队也可以根据测量数据排查服务启动、重复构建或反复准备环境等改进机会。整个过程以缩短 CI 时间为目标,同时保留能够发现缺陷及合并前必须执行的检查。

使用示例

  • “统计最近的拉取请求从推送到 CI 检查通过用了多久。”
  • “查一下这个 CI 任务中哪些步骤最耗时。”
  • “尝试一项改进,并比较修改前后的 CI 耗时。”

注意事项

此技能使用 GitHub Actions 的运行信息及仓库中的 CI 计时脚本。比较时需要使用同类运行器上的基准运行。不得削弱或省略检查;修改后仍须能发现相同的问题。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
A良好资料禁止削弱检查,也不复用失败结果。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足需要使用 GitHub Actions 数据和仓库内的测量脚本。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md5.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Skill: Speed up CI

CI speed is a measured number, not a feeling. Measure it the same way every time, find where the seconds actually go, change one thing, measure again, keep it only if the number moved and every check still guards what it did.

1. Measure time to green

node .github/scripts/ci-time-to-green.mjs --hours 24            # all PRs
node .github/scripts/ci-time-to-green.mjs --hours 6 --branch-prefix perf/ci-x --json
  • required: push → last merge-gating check green (openwork-tests-required, warden-clear).
  • full: push → last GitHub Actions check green. "Evidence preview" is ignored (a link, not a test).
  • Failed or unfinished commits are excluded from the percentiles and counted separately.

Record the baseline (p50/p90/p99 and n) before changing anything. Compare p50/p90 with at least ~20 commits; one PR's run is a data point, not a trend.

2. Find where the seconds go

Never guess from YAML. Read the timings GitHub and the test kit already record.

# Every job and step of a run, with durations
gh run view <run-id> --json jobs --jq '.jobs[] | "\(.name)", (.steps[] | "  \(.name)")'
gh api repos/different-ai/openwork/actions/jobs/<job-id> \
  --jq '.steps[] | "\(((.completed_at|fromdate)-(.started_at|fromdate)))s \(.name)"'
# Full log (strip colours)
gh api --allow-escape-sequences repos/different-ai/openwork/actions/jobs/<job-id>/logs | sed 's/\x1b\[[0-9;]*m//g'

For e2e specs, download the run's pr-proof-* artifacts and read test-runs/*/test-run.json: every trace entry has a stage, channel, verb and ms. Sum ms by (stage, channel, verb): world/seed/den|desktop|appWeb is time spent starting services; body/* is the test. Compare createdAt/closedAt with the first and last trace entry to see setup and teardown the trace does not cover.

Things that look slow but are not the cause until measured: runner pickup (usually ~3s), the test's own assertions. Things that usually are: starting services per test, rebuilding the same commit in several jobs, waiting on something no assertion uses, repeated setup in every matrix job.

3. Choose the change: strongest rung first

Work down this list (the classic performance mantras) and stop at the first rung that reaches the target:

  1. Don't do it. Remove waits and work whose result nothing checks (e.g. waiting for a reviewer snapshot to save before reporting a verdict).
  2. Don't do it again. Reuse a result whose inputs are byte-identical: build once per commit and share it; skip a suite whose input hash already passed. Failures are never reused.
  3. Do it less. Start one service per job and isolate tests inside it (one organization per test) instead of one service per test.
  4. Do it later. Move work that need not block a push into the merge queue.
  5. Do it when nobody is waiting. Pre-warm images and worlds on dev.
  6. Do it concurrently. Shard long serial steps.
  7. Do it cheaper. Faster flags, in-memory databases, fewer statements.

Rung 7 alone rarely gets far: folding the Den API test schema DDL and an in-memory MySQL saved 18s on a 134s step. Rungs 1-3 remove minutes.

4. The loop

  • One hypothesis per change, naming a mechanism ("den-web runs next dev and recompiles per test"), never "try caching".
  • Measure before and after on CI, against a control on the same runner type at about the same time (another PR on current dev, or the same job on dev). Laptop wall times are not evidence: other work on the machine moved the same suite between 94s and 147s.
  • Keep a change only when the number moves past noise and every gate stays green. Otherwise revert it completely and record why.
  • Log every attempt, kept or not, in a decision.tsv outside the repo: id, hypothesis, change, before, after, delta, tests, verdict, note.
  • Independent hypotheses can run in parallel, each in its own worktree and PR. Give each lane the baseline, the measured facts and these rules.

Guardrails

  • Never weaken a check for speed. No skipped specs, no soft-failing steps, no looser assertions. A moved check must still run before merge (e.g. in the merge queue) and fail for the same defects.
  • Never make the shared clone shallow. git fetch --depth=1 in any worktree writes .git/shallow for every worktree and the main checkout; rebases then replay the whole history. CI scripts that fetch with depth 1 are for CI only. If it happens: confirm the parents of the shallow commit exist (git cat-file -e), move .git/shallow aside, run git fsck --connectivity-only.
  • Work in a worktree from fresh origin/dev; do not touch someone else's checkout, branch or running containers. Start your own MySQL on a free port with a unique name, and remove it afterwards.
  • Den API tests assume UTC: run them locally with TZ=UTC, or the hourly sign-in tests fail for reasons unrelated to your change.
  • Check open PRs for the same files before starting (gh pr list), and re-measure after rebasing onto a dev that changed the job you measured.
  • A red dev invalidates every comparison: fix or wait for it first (diagnose-a-red-run).

Evidence in the PR

Name the job and step, the control run and your run, and the seconds: "Run Den API security tests: 134s → 116s (run A vs run B, same runner)." State Release note: none. Follow open-a-pr.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

add-a-feature

免费有简介

管理 OpenWork 功能开关,从编码前以关闭状态登记,到按组织和部署环境逐步发布、全局停用,并在发布完成后移除临时开关。还包括添加代码检查和规划停用时对进行中任务、已存数据及历史记录的处理。

  • 编码前登记新功能
  • 先向指定组织逐步发布
  • 区分云端与自托管版本
different-ai/openwork2.4万2026年10月30日 更新

browser-automation

免费有简介

连接 OpenCode 浏览器工具与本地运行的 OpenWork Electron 应用,可查看界面、输入并发送任务、检查回复。通过 CDP 辅助探索和调试。

  • 连接本地 Electron 应用
  • 调试时查看界面状态
  • 通过输入框发送任务
different-ai/openwork2.4万2026年10月30日 更新

confidentiality-review

免费有简介

检查变更新增行中可识别客户、潜在客户、合作方或外部个人的信息。报告位置和最小修正建议,不复述身份内容;若信息已公开则升级处理。

  • 检查客户或合作方识别信息
  • 审查文档和测试数据中的身份信息
  • 不复述内容地报告泄露位置
different-ai/openwork2.4万2026年10月30日 更新

connect-openwork-mcp

免费有简介

引导 Claude Code、Codex 等 AI 客户端连接 OpenWork MCP Gateway,以使用组织技能、插件和外部连接;完成浏览器认证后检查能力搜索与执行工具是否可用。

  • 让 AI 客户端连接组织资源
  • 完成 MCP 认证并查看可用工具
  • 切换组织或处理认证错误
different-ai/openwork2.4万2026年10月30日 更新

contributor-screen

免费有简介

在运行外部协作者的拉取请求代码前,检查混淆代码、隐藏通信、可疑依赖和构建脚本,并给出文件位置及维护者的核查事项。

  • 运行外部改动前先检查
  • 查找混淆代码或不明通信
  • 审查依赖和安装脚本
different-ai/openwork2.4万2026年10月30日 更新

create-plugin

免费有简介

为 OpenWork 创建 OpenCode 插件,生成自定义工具、事件钩子和配置文件条目。可添加工具逻辑,或在工具执行前后运行处理代码。

  • 为 OpenWork 添加自定义工具
  • 创建保存和列出笔记的工具
  • 在工具执行前后运行代码
different-ai/openwork2.4万2026年10月30日 更新

查看 different-ai 的全部技能

报告此技能的问题