affaan-m/ECC/docs/zh-CN/skills/benchmark/SKILL.md
benchmark
Use it for engineering tasks; the detail page covers purpose, installation, and practical steps.
- Source repository stars
- 234,327
- Declared platforms
- 0
- Static risk flags
- 0
- Last source update
- 2026-07-27
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
使用此技能测量性能基线,检测PR前后的回归,并比较堆栈替代方案。
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/benchmark"Inspect the Agent Skill "benchmark" from https://github.com/affaan-m/ECC/blob/4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38/docs/zh-CN/skills/benchmark/SKILL.md at commit 4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
使用场景
在 PR 前后测量性能影响 为项目建立性能基线 用户反馈"感觉变慢"时 发布前确保达到性能目标 对比不同技术栈的性能表现
在 PR 前后测量性能影响为项目建立性能基线用户反馈"感觉变慢"时 - 02
工作原理
/benchmark baseline 保存当前指标
/benchmark baseline 保存当前指标 - 03
模式 1:页面性能
Review the “模式 1:页面性能” section in the pinned source before continuing.
Review and apply the “模式 1:页面性能” source section.
Permission review
Static risk signals and limitations
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 58/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 234,327 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | catalog record | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- affaan-m/ECC
- Skill path
- docs/zh-CN/skills/benchmark/SKILL.md
- Commit
- 4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38
- License
- MIT
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
基准测试 — 性能基线及回归检测
使用场景
- 在 PR 前后测量性能影响
- 为项目建立性能基线
- 用户反馈"感觉变慢"时
- 发布前确保达到性能目标
- 对比不同技术栈的性能表现
工作原理
模式 1:页面性能
通过浏览器 MCP 测量真实浏览器指标:
1. 导航至每个目标 URL
2. 测量核心网页指标:
- LCP(最大内容绘制)— 目标 < 2.5 秒
- CLS(累积布局偏移)— 目标 < 0.1
- INP(与下一次绘制的交互)— 目标 < 200 毫秒
- FCP(首次内容绘制)— 目标 < 1.8 秒
- TTFB(首字节时间)— 目标 < 800 毫秒
3. 测量资源大小:
- 页面总重量(目标 < 1MB)
- JS 包大小(目标 < 200KB gzip 压缩后)
- CSS 大小
- 图片重量
- 第三方脚本重量
4. 统计网络请求数量
5. 检查阻塞渲染的资源
模式 2:API 性能
对 API 端点进行基准测试:
1. 每个端点请求 100 次
2. 测量:p50、p95、p99 延迟
3. 追踪:响应大小、状态码
4. 负载测试:10 个并发请求
5. 与 SLA 目标进行对比
模式 3:构建性能
测量开发反馈循环效率:
1. 冷构建时间
2. 热重载时间 (HMR)
3. 测试套件执行时间
4. TypeScript 检查时间
5. 代码检查时间
6. Docker 构建时间
模式 4:前后对比
在变更前后运行以测量影响:
/benchmark baseline # 保存当前指标
# ... 进行更改 ...
/benchmark compare # 与基线进行比较
输出结果:
| Metric | Before | After | Delta | Verdict |
|--------|--------|-------|-------|---------|
| LCP | 1.2s | 1.4s | +200ms | WARNING: WARN |
| Bundle | 180KB | 175KB | -5KB | ✓ BETTER |
| Build | 12s | 14s | +2s | WARNING: WARN |
输出
将基线数据以 JSON 格式存储在 .ecc/benchmarks/ 中。通过 Git 追踪,便于团队共享基线。
集成
- CI:在每个 PR 上运行
/benchmark compare - 配合
/canary-watch进行部署后监控 - 配合
/browser-qa完成发布前完整检查清单
Alternatives
Compare before choosing
affaan-m/ECC
benchmark
Use this skill to measure performance baselines, detect regressions before/after PRs, and compare stack alternatives.
affaan-m/ECC
benchmark
Use it for engineering tasks; the detail page covers purpose, installation, and practical steps.
coreyhaines31/marketingskills
ab-testing
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
event4u-app/agent-config
design-intelligence
Grounded design brief from the adopted corpus — style, WCAG-checked color tokens, typography, layout pattern, anti-patterns. Use on ui-design-brief or any which-style/palette/font/chart decision.