performance-optimizer

Profile and optimize slow Python, Node.js, and database workloads.

Updated Nov 22, 2025
One-click install
npx skills add https://github.com/Khamel83/oneshot --skill performance-optimizer-khamel83
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimizer
Source: https://github.com/Khamel83/oneshot/tree/main/archive/v9/skills/performance-optimizer
Command: npx skills add https://github.com/Khamel83/oneshot --skill performance-optimizer-khamel83

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Profiles and optimizes slow code, queries, or systems using evidence-based profiling before applying changes.

Core Features & Use Cases

  • Baseline measurement of performance metrics (CPU, memory, I/O) and identification of slow operations.
  • Cross-platform profiling support for Python (cProfile, py-spy), Node.js, and databases with explain analyze.
  • Incremental optimization with one change at a time, re-measuring and validating improvements.
  • Thorough documentation of what was slow, what changed, and the new baseline.

Quick Start

Run the performance-optimizer on a slow script to generate a baseline and recommended changes.

Frequently Asked Questions about performance-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile and optimize slow Python code?

Profile and optimize slow Python code by establishing a baseline and using cProfile or py-spy to identify bottlenecks. You can then apply incremental changes, re-measuring performance to validate improvements.

What's the best way to find database query bottlenecks?

Find database query bottlenecks by running explain analyze on your slow queries. This establishes a performance baseline for I/O operations and identifies the exact steps causing delays for incremental optimization.

Can I use this to profile slow Node.js services and APIs?

Yes, you can profile slow Node.js services and APIs using the built-in Node.js profiler. It measures CPU and memory metrics across your service workloads to locate performance bottlenecks before applying changes.

How do I measure the baseline performance of a slow script?

Measure the baseline performance of a slow script by recording initial CPU, memory, and I/O metrics. This baseline measurement identifies the slowest operations and provides a benchmark to validate future incremental improvements.

Why should I optimize code incrementally one change at a time?

Optimize code incrementally one change at a time to isolate the impact of each modification. This evidence-based approach ensures you can accurately re-measure and validate which specific changes improve performance.

Does performance profiling work for batch jobs and APIs?

Performance profiling works effectively across batch jobs, APIs, and services. It applies cross-platform profiling to Python, Node.js, and database workloads to identify bottlenecks and implement documented improvements.