Best use case
performance-profiler is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Performance Profiler
Teams using performance-profiler should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/cs-performance-profiler/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How performance-profiler Compares
| Feature / Agent | performance-profiler | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Performance Profiler
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 --- ## 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 ## Before/After Measurement Template ```markdown ## Performance Optimization: [What You Fixed] **Date:** 2026-03-01 **Engineer:** @username **Ticket:** PROJ-123 ### Problem [1-2 sentences: what was slow, how was it observed] ### Root Cause [What the profiler revealed] ### Baseline (Before) | Metric | Value | |--------|-------| | P50 latency | 480ms | | P95 latency | 1,240ms | | P99 latency | 3,100ms | | RPS @ 50 VUs | 42 | | Error rate | 0.8% | | DB queries/req | 23 (N+1) | Profiler evidence: [link to flamegraph or screenshot] ### Fix Applied [What changed — code diff or description] ### After | Metric | Before | After | Delta | |--------|--------|-------|-------| | P50 latency | 480ms | 48ms | -90% | | P95 latency | 1,240ms | 120ms | -90% | | P99 latency | 3,100ms | 280ms | -91% | | RPS @ 50 VUs | 42 | 380 | +804% | | Error rate | 0.8% | 0% | -100% | | DB queries/req | 23 | 1 | -96% | ### Verification Load test run: [link to k6 output] ``` --- ## Optimization Checklist ### Quick wins (check these first) ``` Database □ Missing indexes on WHERE/ORDER BY columns □ N+1 queries (check query count per request) □ Loading all columns when only 2-3 needed (SELECT *) □ No LIMIT on unbounded queries □ Missing connection pool (creating new connection per request) Node.js □ Sync I/O (fs.readFileSync) in hot path □ JSON.parse/stringify of large objects in hot loop □ Missing caching for expensive computations □ No compression (gzip/brotli) on responses □ Dependencies loaded in request handler (move to module level) Bundle □ Moment.js → dayjs/date-fns □ Lodash (full) → lodash/function imports □ Static imports of heavy components → dynamic imports □ Images not optimized / not using next/image □ No code splitting on routes API □ No pagination on list endpoints □ No response caching (Cache-Control headers) □ Serial awaits that could be parallel (Promise.all) □ Fetching related data in a loop instead of JOIN ``` --- ## Common Pitfalls - **Optimizing without measuring** — you'll optimize the wrong thing - **Testing in development** — profile against production-like data volumes - **Ignoring P99** — P50 can look fine while P99 is catastrophic - **Premature optimization** — fix correctness first, then performance - **Not re-measuring** — always verify the fix actually improved things - **Load testing production** — use staging with production-size data --- ## Best Practices 1. **Baseline first, always** — record metrics before touching anything 2. **One change at a time** — isolate the variable to confirm causation 3. **Profile with realistic data** — 10 rows in dev, millions in prod — different bottlenecks 4. **Set performance budgets** — `p(95) < 200ms` in CI thresholds with k6 5. **Monitor continuously** — add Datadog/Prometheus metrics for key paths 6. **Cache invalidation strategy** — cache aggressively, invalidate precisely 7. **Document the win** — before/after in the PR description motivates the team
Related Skills
swiftui-performance-audit
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is insufficient.
python-performance-optimization
Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.
native-app-performance
Native macOS/iOS app performance profiling via xctrace/Time Profiler and CLI-only analysis of Instruments traces. Use when asked to profile, attach, record, or analyze Instruments .trace files, find hotspots, or optimize native app performance without opening Instruments UI.
youtube-watcher
Fetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract information from it.
youtube-transcript
Fetch and summarize YouTube video transcripts. Use when asked to summarize, transcribe, or extract content from YouTube videos. Handles transcript fetching via residential IP proxy to bypass YouTube's cloud IP blocks.
youtube-auto-captions - YouTube 自动字幕
## 描述
youtube
YouTube Data API integration with managed OAuth. Search videos, manage playlists, access channel data, and interact with comments. Use this skill when users want to interact with YouTube. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
yahoo-finance
Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.
xurl
A Twitter research and content intelligence skill focused on attracting WordPress and Shopify clients. Use to analyze Twitter profiles, threads, and conversations for: (1) Identifying what small agency founders and eCommerce brands are discussing; (2) Understanding pain points around WordPress performance, Shopify CRO, and development bottlenecks; (3) Extracting high-performing content angles; (4) Turning insights into authority-building posts; (5) Converting Twitter intelligence into business leverage for clear content angles, strong positioning, and qualified inbound leads.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
xiaohongshu-mcp
Automate Xiaohongshu (RedNote) content operations using a Python client for the xiaohongshu-mcp server. Use for: (1) Publishing image, text, and video content, (2) Searching for notes and trends, (3) Analyzing post details and comments, (4) Managing user profiles and content feeds. Triggers: xiaohongshu automation, rednote content, publish to xiaohongshu, xiaohongshu search, social media management.
twitter-openclaw
Interact with Twitter/X — read tweets, search, post, like, retweet, and manage your timeline.