Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

perf-ops

FreeRuns bundled scriptsNot checked

Performance profiling and optimization orchestrator - diagnoses symptoms, dispatches skill-preloaded profiling agents, manages before/after comparisons…

0xDarkMatterby 0xDarkMatter★ 86 GitHub stars

About this skill

Performance Operations

Orchestrator for cross-language performance profiling and optimization. Classifies symptoms inline, dispatches profiling to general-purpose agents preloaded with the relevant language -ops skill (background), and manages optimization with confirmation.

Architecture

User describes performance issue or requests profiling
    |
    +---> T1: Diagnose (inline, fast)
    |       +---> Classify symptom (decision tree)
    |       +---> Detect language/runtime from project
    |       +---> Check installed profiling tools
    |       +---> Determine production vs development
    |       +---> Gather system baseline (CPU/mem/disk)
    |       +---> Present: diagnosis + recommended profiling approach
    |
    +---> T2: Profile (dispatch general-purpose + skill preload, background)
    |       +---> Select skill preload from routing table
    |       +---> Build perf-focused dispatch prompt
    |       +---> Agent runs profiler, collects data, interprets results
    |       |       +---> Fallback: tool commands inlined (no skill preload)
    |       +---> Returns: findings + bottleneck identification + suggestions
    |       |
    |       +---> [Optional parallel dispatch]:
    |             +---> CPU profiling agent  ---+
    |             +---> Memory profiling agent --+--> Consolidate findings
    |             +---> Baseline benchmark ------+
    |
    +---> T3: Optimize (dispatch general-purpose + skill preload, foreground + confirm)
            +---> Agent proposes specific code changes
            +---> Preflight: what changes, expected impact, risks
            +---> User confirms
            +---> Apply changes
            +---> Re-benchmark for before/after delta

Safety Tiers

T1: Diagnose - Run Inline

No agent needed. Execute directly via Bash for instant results.

Operation Command / Method
Detect Python profilers which py-spy && which memray && which scalene
Detect Go profilers which go && go tool pprof -h 2>/dev/null
Detect Rust profilers which cargo-flamegraph && which samply
Detect Node profilers which clinic && which 0x
Detect benchmarking tools which hyperfine && which k6 && which vegeta
System CPU baseline top -bn1 -o %CPU | head -20 (Linux) or wmic cpu get loadpercentage (Win)
System memory baseline free -h (Linux) or wmic OS get FreePhysicalMemory (Win)
Disk I/O check iostat -x 1 3 (Linux)
Identify language Check for package.json, go.mod, Cargo.toml, pyproject.toml, requirements.txt
Production vs dev Ask user or detect from environment (NODE_ENV, FLASK_ENV, etc.)
Read existing profiles Parse .prof, .svg, .bin files in project

Production safety rule: In production environments, only recommend sampling profilers (py-spy, pprof HTTP endpoint, perf). Never suggest attaching debuggers, tracing profilers, or tools that require process restart.

T2: Profile - Dispatch to Profiling Agent

Gather context from T1 diagnosis, then dispatch a general-purpose agent preloaded with the relevant language -ops skill plus the perf-ops references below.

Language Routing:

Detected Language Dispatch Preload Key Profiling Tools
Python (.py, pyproject.toml, requirements.txt) general-purpose relevant skills/python-*/SKILL.md + perf-ops references py-spy, memray, scalene, tracemalloc
Go (go.mod, .go files) general-purpose skills/go-ops/SKILL.md + perf-ops references pprof (CPU/heap/goroutine/mutex), benchstat
Rust (Cargo.toml, .rs files) general-purpose skills/rust-ops/SKILL.md + perf-ops references cargo-flamegraph, samply, DHAT, criterion
TypeScript/JavaScript (backend, package.json + server) general-purpose skills/javascript-ops/SKILL.md + perf-ops references clinic flame/doctor/bubbleprof, 0x
TypeScript/JavaScript (frontend, bundle issues) general-purpose skills/typescript-ops/SKILL.md + perf-ops references webpack-bundle-analyzer, Lighthouse, source-map-explorer
Page speed / Core Web Vitals (LCP, INP, CLS, PageSpeed, CrUX) route, don't dispatch skills/web-perf-ops/SKILL.md field-vs-lab method, triage-vitals.py, Lighthouse CI budgets
SQL / PostgreSQL general-purpose skills/postgres-ops/SKILL.md + perf-ops references EXPLAIN ANALYZE, pg_stat_statements, pgbench
SQL / SQLite, Cloudflare D1, libSQL/Turso (*.db, *.sqlite, wrangler.toml with a d1_databases binding) general-purpose skills/sqlite-ops/SKILL.md + perf-ops references EXPLAIN QUERY PLAN, sqlite-ops/scripts/eqp-triage.py, sqlite3 .timer/.stats, wrangler d1 insights, sql_duration_ms + rows_read
General / unknown / CLI benchmarking general-purpose perf-ops references hyperfine, perf, strace

Dispatch template (T2):

You are handling a performance profili
Full SKILL.md on GitHub

Install perf-ops in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

Read
Edit
Write
Bash
Glob
Grep
Agent
TaskCreate
TaskUpdate

Bundled files

assets/.gitkeepreferences/benchmark-vetting.mdreferences/ci-integration.mdreferences/cpu-memory-profiling.mdreferences/diagnosis-quickref.mdreferences/load-testing.mdreferences/optimization-patterns.mdscripts/.gitkeep

FAQ

What does the perf-ops skill do?

Performance profiling and optimization orchestrator - diagnoses symptoms, dispatches skill-preloaded profiling agents, manages before/after comparisons. Triggers on: performance, profiling, flamegraph, pprof, py-spy, clinic.js, memray, heaptrack, bundle size, webpack analyzer, load testing, k6, artillery, vegeta, locust, benchmark, hyperfine, criterion, slow query, EXPLAIN ANALYZE, N+1, caching, optimization, latency, throughput, p99, memory leak, CPU spike, bottleneck.

How do I install the perf-ops skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the perf-ops skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare perf-ops with