affaan-m/ECC

benchmark

使用此技能测量性能基线,检测PR前后的回归,并比较堆栈替代方案。

58Collecting
See how to use itView GitHub source
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/benchmark"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn benchmark's source instructions into a guide you can follow

According to the pinned SKILL.md from affaan-m/ECC: 使用此技能测量性能基线,检测PR前后的回归,并比较堆栈替代方案。

npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/benchmark"
Check the pinned source

Best fit

  • 使用此技能测量性能基线,检测PR前后的回归,并比较堆栈替代方案。

Bring this context

  • A concrete task that matches the documented purpose of benchmark.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned benchmark instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read benchmark through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

使用场景

在 PR 前后测量性能影响 为项目建立性能基线 用户反馈"感觉变慢"时 发布前确保达到性能目标 对比不同技术栈的性能表现

SKILL.md · 使用场景
在 PR 前后测量性能影响为项目建立性能基线用户反馈"感觉变慢"时
03

模式 1:页面性能

Review the “模式 1:页面性能” section in the pinned source before continuing.

SKILL.md · 模式 1:页面性能
Review and apply the “模式 1:页面性能” source section.
04

模式 2:API 性能

Review the “模式 2:API 性能” section in the pinned source before continuing.

SKILL.md · 模式 2:API 性能
Review and apply the “模式 2:API 性能” source section.
05

模式 3:构建性能

Review the “模式 3:构建性能” section in the pinned source before continuing.

SKILL.md · 模式 3:构建性能
Review and apply the “模式 3:构建性能” source section.

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use benchmark to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned benchmark source to [task]. Pay particular attention to these source sections: “使用场景”, “工作原理”, “模式 1:页面性能”, “模式 2:API 性能”, “模式 3:构建性能”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current benchmark result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “使用场景” has been checked.

The source section “工作原理” has been checked.

The source section “模式 1:页面性能” has been checked.

The source section “模式 2:API 性能” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

FAQ

What does benchmark do?

使用此技能测量性能基线,检测PR前后的回归,并比较堆栈替代方案。

How do I start using benchmark?

The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/benchmark". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
234,327
Repository forks
35,711
Quality
58/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

58/100
Documentation15/30
Specificity11/25
Maintenance20/20
Trust signals12/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 1 min

基准测试 — 性能基线及回归检测

使用场景

  • 在 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 完成发布前完整检查清单
Source repo
affaan-m/ECC
Skill path
docs/zh-CN/skills/benchmark/SKILL.md
Commit SHA
4e973d3eaf92
Repository license
MIT
Data collected