Skip to content
FunCoding

Search

Search docs, Skills and MCP

perf-profiler

基于可复现基线和 profiler 证据分析性能问题。用于用户要求定位慢接口、慢任务、慢查询、内存或网络瓶颈,制定优化方案,或验证优化收益时;区分实测结论与静态推断,不虚构耗时和提升比例,生产环境操作需明确授权。

AI 与智能体879skills/perf-profiler/SKILL.md

Install

Send this to Claude Code, Codex or Cursor. The agent checks the Skill for safety first and installs it only after you confirm.

读取 https://funcoding.ai/skills/laolaoshiren/claude-code-skills-zh/perf-profiler/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

性能分析助手

工作流程

1. 明确目标与边界

先确认或从项目中核实:

  • 目标指标,如延迟、吞吐量、CPU、内存、查询次数或包体积。
  • 可复现的场景、数据规模、运行环境、版本和关键配置。
  • 用户允许分析和修改的范围,以及是否可以运行负载或 profiler。

没有明确目标时,先用现有监控、benchmark 或用户现象缩小范围,不把“代码看起来慢”当成瓶颈结论。

2. 建立基线

优先复用项目已有的启动、benchmark、trace 和 profiling 配置。在相同环境、数据和负载下记录:

  • 预热方式、并发度、重复次数和统计口径。
  • 代码版本、依赖版本及影响结果的配置。
  • 原始测量值和波动范围;条件允许时保留机器可读结果。

无法运行项目时,只能进行静态分析,并把发现标为“待验证候选”。

3. 收集证据

按技术栈选择 profiler、trace、火焰图、查询计划、网络时序或内存快照,定位时间或资源实际消耗的位置。常见维度包括:

  • 代码:算法复杂度、重复计算、分配热点、同步阻塞和并发争用。
  • 数据库:N+1 查询、扫描量、索引使用、锁等待和连接池状态。
  • 网络:请求瀑布、有效载荷、压缩、缓存命中和外部服务延迟。

复杂度分析和代码审查只能证明风险,不能单独证明运行时影响。

4. 提出最小改动

  • 将建议绑定到具体证据、文件或调用链。
  • 说明正确性、内存、吞吐量、维护成本和兼容性方面的权衡。
  • 优先处理证据最强、影响最大的热点;不同时改动多个无法独立归因的因素。
  • 为代码、配置和数据结构变更准备验证与回滚方式。

5. 同条件复测

修改后使用与基线一致的环境、数据、负载、预热和统计口径复测,并运行受影响功能的正确性测试。报告原始结果、波动、差异和尚未控制的变量。

只有真实完成同条件测量后,才能写耗时、百分比或“已改善”等确定性结论。

证据等级

  • 已测量:有可复现基线、profiling 证据和实际结果。
  • 静态推断:由复杂度、调用关系或配置推导出的候选问题,尚未实测。
  • 待验证:缺少环境、数据或权限,当前无法判断影响。

安全与授权边界

  • 默认只在本地或用户明确指定的测试环境进行只读分析。
  • 生产环境 profiling、压测、EXPLAIN ANALYZE 及索引、缓存、连接池、CDN 或外部服务配置变更必须获得明确授权。
  • 不在报告中暴露生产数据、凭据或含敏感信息的 profiling 产物。
  • 不为得到漂亮数字而删除正确性检查、降低数据规模或改变统计口径。
  • Windows 与 Linux 优先使用项目已有工具;平台特定命令需说明适用范围或提供等价方法。

输出

## 性能分析结果

- 目标指标与场景:
- 环境、版本与数据规模:
- 基线与测量方法:

## 发现

| 证据等级 | 位置 | 证据 | 影响与限制 |
|----------|------|------|------------|

## 改动与权衡

## 同条件复测

- 正确性验证:
- 性能结果:
- 未控制变量与待验证项:
- 回滚方式:

Similar Skills

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI & agents

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI & agents

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI & agents

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI & agents

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI & agents

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI & agents