跳到正文
Skillpedia
通用编程81k · #1707

performance-analysis

它能做什么

这项技能帮助开发者测量并改进代码的速度和内存占用。适合应用感觉很慢,或希望有证据表明某项改动确实让代码变快的人。

适用场景

  • ✓当应用的某个部分感觉很慢或占用过多内存时。
  • ✓当你想确认某项改动确实让代码变快时。
  • ✓当你准备发布版本,想要基准测试结果进行比较时。

技能链接

https://github.com/ruvnet/ruflo/blob/main/v3/@claude-flow/codex/.agents/skills/performance-analysis/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“我的应用在加载仪表盘时很慢。你能测量时间都花在了哪里吗?”

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

工作原理

智能体在任何改动之前先记录基线,运行基准测试和性能分析命令,并报告结果及其波动范围,而不只是最好的一次运行结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Performance Analysis Skill

Purpose

Measure before optimizing and preserve reproducible benchmark evidence.

Commands

Run Benchmark Suite

npx @claude-flow/cli performance benchmark --suite all

Profile Code

npx @claude-flow/cli performance profile --target ./src

Best Practices

  1. Capture a baseline before changing code
  2. Use identical inputs and environments
  3. Report variance, not only the fastest result
  4. Re-run correctness tests after optimization
常见问题

它会为了提速而改动我的代码吗?

它先从测量开始。技能会要求先有基线,并在任何优化之后重新运行正确性测试。

它需要特别的设置吗?

它通过 claude-flow 命令行工具运行,使用 npx 启动。

我应该用于早期原型吗?

不应该。技能说明,对于早期原型、文档和仅涉及配置的改动,应跳过它。

详情

作者的原始描述

Performance profiling, benchmarking, and optimization. Use when: slow operations, regressions, memory pressure, release validation. Skip when: early prototyping, documentation, configuration-only changes.

repo: ruvnet/ruflo

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能