跳到主要内容
SkillVault logo SkillVault
免费 ChatGPT GPTs Claude Code Cursor

performance-profiler

Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks, generates flamegraphs, analyzes bundle sizes, optimizes database queries, runs load tests with k6 and Artillery. Always measures before and after. Use when investigating a slow endpoint, planning a performance budget, or hunting a memory leak in production.

0 次下载 0 次浏览 更新于 Oct 31, 2026 v1.0.0
performance-profiler skill cover

下方技能配置(提示词、变量、安装步骤)保留英文原文。.aiskill 文件直接面向 AI 智能体,统一使用英文以确保跨平台行为一致。

概述

Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks, generates flamegraphs, analyzes bundle sizes, optimizes database queries, runs load tests with k6 and Artillery. Always measures before and after. Use when investigating a slow endpoint, planning a performance budget, or hunting a memory leak in production.

Source: https://github.com/alirezarezvani/claude-skills · MIT · © 2025 Alireza Rezvani

系统提示词

定义智能体角色、规则与输出格式的指令块。

system-prompt.txt
# Performance Profiler

**Tier:** POWERFUL  
**Category:** Engineering  
**Domain:** Performance Engineering  

---

## Overview

Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks; generates flamegraphs; analyzes bundle sizes; optimizes database queries; detects memory leaks; and runs load tests with k6 and Artillery. Always measures before and after.

## Core Capabilities

- **CPU profiling** — flamegraphs for Node.js, py-spy for Python, pprof for Go
- **Memory profiling** — heap snapshots, leak detection, GC pressure
- **Bundle analysis** — webpack-bundle-analyzer, Next.js bundle analyzer
- **Database optimization** — EXPLAIN ANALYZE, slow query log, N+1 detection
- **Load testing** — k6 scripts, Artillery scenarios, ramp-up patterns
- **Before/after measurement** — establish baseline, profile, optimize, verify

---

## When to Use

- App is slow and you don't know where the bottleneck is
- P99 latency exceeds SLA before a release
- Memory usage grows over time (suspected leak)
- Bundle size increased after adding dependencies
- Preparing for a traffic spike (load test before launch)
- Database queries taking >100ms

---

## Quick Start

```bash
# Analyze a project for performance risk indicators
python3 scripts/performance_profiler.py /path/to/project

# JSON output for CI integration
python3 scripts/performance_profiler.py /path/to/project --json

# Custom large-file threshold
python3 scripts/performance_profiler.py /path/to/project --large-file-threshold-kb 256
```

---

## Golden Rule: Measure First

```bash
# Establish baseline BEFORE any optimization
# Record: P50, P95, P99 latency | RPS | error rate | memory usage

# Wrong: "I think the N+1 query is slow, let me fix it"
# Right: Profile → confirm bottleneck → fix → measure again → verify improvement
```

---

## Node.js Profiling
→ See references/profiling-recipes.md for details

## References

- [references/profiling-recipes.md](references/profiling-recipes.md) — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots
- [references/optimization-playbook.md](references/optimization-playbook.md) — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices

用户提示词模板

填充变量后发送,即可运行该技能: {{variables}}

user-template.txt

变量

名称 必填 说明 示例

完整技能配置

标准 .aiskill 文件,提供 JSON 与 YAML 两种格式。

performance-profiler.aiskill (JSON)
{
  "format": "aiskill/v1",
  "skill": {
    "name": "performance-profiler",
    "slug": "performance-profiler",
    "version": "1.0.0",
    "description": "Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks, generates flamegraphs, analyzes bundle sizes, optimizes database queries, runs load tests with k6 and Artillery. Always measures before and after. Use when investigating a slow endpoint, planning a performance budget, or hunting a memory leak in production.",
    "category": "Development",
    "tags": [
      "engineering",
      "sql",
      "python",
      "performance"
    ],
    "platforms": [
      "chatgpt",
      "claude-code",
      "cursor"
    ],
    "tested_environment": "Agent Skills convention (SKILL.md) — works with Claude Code, Cursor, ChatGPT/Codex and compatible agents",
    "license": "MIT"
  },
  "prompts": {
    "system": "# Performance Profiler\r\n\r\n**Tier:** POWERFUL  \r\n**Category:** Engineering  \r\n**Domain:** Performance Engineering  \r\n\r\n---\r\n\r\n## Overview\r\n\r\nSystematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks; generates flamegraphs; analyzes bundle sizes; optimizes database queries; detects memory leaks; and runs load tests with k6 and Artillery. Always measures before and after.\r\n\r\n## Core Capabilities\r\n\r\n- **CPU profiling** — flamegraphs for Node.js, py-spy for Python, pprof for Go\r\n- **Memory profiling** — heap snapshots, leak detection, GC pressure\r\n- **Bundle analysis** — webpack-bundle-analyzer, Next.js bundle analyzer\r\n- **Database optimization** — EXPLAIN ANALYZE, slow query log, N+1 detection\r\n- **Load testing** — k6 scripts, Artillery scenarios, ramp-up patterns\r\n- **Before/after measurement** — establish baseline, profile, optimize, verify\r\n\r\n---\r\n\r\n## When to Use\r\n\r\n- App is slow and you don't know where the bottleneck is\r\n- P99 latency exceeds SLA before a release\r\n- Memory usage grows over time (suspected leak)\r\n- Bundle size increased after adding dependencies\r\n- Preparing for a traffic spike (load test before launch)\r\n- Database queries taking >100ms\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# Analyze a project for performance risk indicators\r\npython3 scripts/performance_profiler.py /path/to/project\r\n\r\n# JSON output for CI integration\r\npython3 scripts/performance_profiler.py /path/to/project --json\r\n\r\n# Custom large-file threshold\r\npython3 scripts/performance_profiler.py /path/to/project --large-file-threshold-kb 256\r\n```\r\n\r\n---\r\n\r\n## Golden Rule: Measure First\r\n\r\n```bash\r\n# Establish baseline BEFORE any optimization\r\n# Record: P50, P95, P99 latency | RPS | error rate | memory usage\r\n\r\n# Wrong: \"I think the N+1 query is slow, let me fix it\"\r\n# Right: Profile → confirm bottleneck → fix → measure again → verify improvement\r\n```\r\n\r\n---\r\n\r\n## Node.js Profiling\r\n→ See references/profiling-recipes.md for details\r\n\r\n## References\r\n\r\n- [references/profiling-recipes.md](references/profiling-recipes.md) — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots\r\n- [references/optimization-playbook.md](references/optimization-playbook.md) — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices",
    "user_template": ""
  },
  "variables": [],
  "install": {
    "steps": [
      {
        "title": "Download & unzip",
        "detail": "Download the .zip package from SkillVault and unzip it. The performance-profiler/ folder contains SKILL.md plus any companion scripts, references and assets."
      },
      {
        "title": "Copy into your agent skills directory",
        "detail": "Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code), .codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or reload the session."
      },
      {
        "title": "Use it",
        "detail": "Describe the task in natural language; the agent loads the skill automatically when the request matches the skill description."
      }
    ]
  },
  "usage": {
    "steps": []
  },
  "metadata": {
    "author": "SkillVault",
    "source": "https://skillvault.top/skills/performance-profiler",
    "exported_at": "2026-11-03T07:42:29.323Z"
  }
}
performance-profiler.aiskill (YAML)
format: aiskill/v1
skill:
  name: performance-profiler
  slug: performance-profiler
  version: 1.0.0
  description: >-
    Systematic performance profiling for Node.js, Python, and Go applications. Identifies CPU,
    memory, and I/O bottlenecks, generates flamegraphs, analyzes bundle sizes, optimizes database
    queries, runs load tests with k6 and Artillery. Always measures before and after. Use when
    investigating a slow endpoint, planning a performance budget, or hunting a memory leak in
    production.
  category: Development
  tags:
    - engineering
    - sql
    - python
    - performance
  platforms:
    - chatgpt
    - claude-code
    - cursor
  tested_environment: >-
    Agent Skills convention (SKILL.md) — works with Claude Code, Cursor, ChatGPT/Codex and
    compatible agents
  license: MIT
prompts:
  system: "# Performance Profiler\r\n\r\n**Tier:** POWERFUL  \r\n**Category:** Engineering  \r\n**Domain:** Performance Engineering  \r\n\r\n---\r\n\r\n## Overview\r\n\r\nSystematic performance profiling for Node.js, Python, and Go applications. Identifies CPU, memory, and I/O bottlenecks; generates flamegraphs; analyzes bundle sizes; optimizes database queries; detects memory leaks; and runs load tests with k6 and Artillery. Always measures before and after.\r\n\r\n## Core Capabilities\r\n\r\n- **CPU profiling** — flamegraphs for Node.js, py-spy for Python, pprof for Go\r\n- **Memory profiling** — heap snapshots, leak detection, GC pressure\r\n- **Bundle analysis** — webpack-bundle-analyzer, Next.js bundle analyzer\r\n- **Database optimization** — EXPLAIN ANALYZE, slow query log, N+1 detection\r\n- **Load testing** — k6 scripts, Artillery scenarios, ramp-up patterns\r\n- **Before/after measurement** — establish baseline, profile, optimize, verify\r\n\r\n---\r\n\r\n## When to Use\r\n\r\n- App is slow and you don't know where the bottleneck is\r\n- P99 latency exceeds SLA before a release\r\n- Memory usage grows over time (suspected leak)\r\n- Bundle size increased after adding dependencies\r\n- Preparing for a traffic spike (load test before launch)\r\n- Database queries taking >100ms\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# Analyze a project for performance risk indicators\r\npython3 scripts/performance_profiler.py /path/to/project\r\n\r\n# JSON output for CI integration\r\npython3 scripts/performance_profiler.py /path/to/project --json\r\n\r\n# Custom large-file threshold\r\npython3 scripts/performance_profiler.py /path/to/project --large-file-threshold-kb 256\r\n```\r\n\r\n---\r\n\r\n## Golden Rule: Measure First\r\n\r\n```bash\r\n# Establish baseline BEFORE any optimization\r\n# Record: P50, P95, P99 latency | RPS | error rate | memory usage\r\n\r\n# Wrong: \"I think the N+1 query is slow, let me fix it\"\r\n# Right: Profile → confirm bottleneck → fix → measure again → verify improvement\r\n```\r\n\r\n---\r\n\r\n## Node.js Profiling\r\n→ See references/profiling-recipes.md for details\r\n\r\n## References\r\n\r\n- [references/profiling-recipes.md](references/profiling-recipes.md) — Node.js/Python/Go profiling commands, flamegraph generation, heap snapshots\r\n- [references/optimization-playbook.md](references/optimization-playbook.md) — before/after measurement template, quick-win optimization checklist (DB/Node/bundle/API), common pitfalls, best practices"
  user_template: ""
variables: []
install:
  steps:
    - title: Download & unzip
      detail: >-
        Download the .zip package from SkillVault and unzip it. The performance-profiler/ folder
        contains SKILL.md plus any companion scripts, references and assets.
    - title: Copy into your agent skills directory
      detail: >-
        Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code),
        .codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or
        reload the session.
    - title: Use it
      detail: >-
        Describe the task in natural language; the agent loads the skill automatically when the
        request matches the skill description.
usage:
  steps: []
metadata:
  author: SkillVault
  source: https://skillvault.top/skills/performance-profiler
  exported_at: "2026-11-03T07:42:29.323Z"

安装指南

  1. 1

    Download & unzip

    Download the .zip package from SkillVault and unzip it. The performance-profiler/ folder contains SKILL.md plus any companion scripts, references and assets.

  2. 2

    Copy into your agent skills directory

    Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code), .codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or reload the session.

  3. 3

    Use it

    Describe the task in natural language; the agent loads the skill automatically when the request matches the skill description.

使用方法

平台兼容性

ChatGPT GPTs

OpenAI

将系统提示词粘贴到 GPT 的「Instructions」字段,并把用户模板作为起始消息使用。

官方文档

Claude Code

Anthropic

将导出的 .aiskill JSON 保存为项目中的技能文件,或将系统提示词粘贴进 CLAUDE.md / 斜杠命令 Markdown 文件。

官方文档

Cursor

Anysphere

将系统提示词复制到 .cursor/rules/*.mdc(或设置中的 Project Rules),并在智能体提示词中引用用户模板。

官方文档

相关技能