performance-profiler – skill Lập trình cho agent AI
Phân tích hiệu năng có hệ thống cho ứng dụng Node.js, Python và Go. Xác định nút thắt CPU, bộ nhớ và I/O, tạo flamegraph, phân tích kích thước bundle, tối ưu truy vấn cơ sở dữ liệu, chạy load test với k6 và Artillery. Luôn đo trước và sau. Dùng khi điều tra endpoint chậm, lập kế hoạch pe
Cài skill performance-profiler bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/performance-profiler-9dc86.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /performance-profiler – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/performance-profiler-9dc86.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $performance-profiler – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/performance-profiler-9dc86.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /performance-profiler – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/performance-profiler-9dc86.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /performance-profiler – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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
# 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
# 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
Skill liên quan
- siyuan – Truy vấn và chỉnh sửa cơ sở tri thức SiYuan qua API.
- diagnosing-bugs – Vòng chẩn đoán cho lỗi khó và suy giảm hiệu năng. Dùng khi người dùng nói…
- differential-review – Review code tập trung bảo mật cho PR, commit và diff.
- disciplinary-pip-tracker – Sổ theo dõi các vụ kỷ luật và cải thiện hiệu suất: loại vụ việc, đánh giá hoặc vấn đề…
- discord-bot-architect – Skill chuyên xây dựng bot Discord sẵn sàng production. Bao gồm Discord.js (JavaScript)…
- dispatch – Giao việc cho OpenAI Codex CLI và Google Antigravity CLI từ Claude Code, với các phiên…
- distributed-debugging-debug-trace – Bạn là chuyên gia debug, chuyên thiết lập môi trường debug toàn diện, distributed…
- ditto – Dùng khi người dùng yêu cầu khai thác hoặc cập nhật hồ sơ năng lực cá nhân riêng tư, có…