perf-profiler
Profile and optimize application performance. Use when diagnosing slow code, measuring CPU/memory usage, generating flame graphs, benchmarking functions, load testing APIs, finding memory leaks, or optimizing database queries.
Why use this skill?
Master your code performance with the OpenClaw perf-profiler. Analyze CPU, track memory, run benchmarks, and generate flame graphs to optimize your applications effectively.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/gitgoodordietrying/perf-profilerWhat This Skill Does
The perf-profiler skill serves as a comprehensive suite for measuring, diagnosing, and optimizing application performance. It empowers OpenClaw to analyze CPU spikes, detect memory leaks, and generate performance reports. By providing tools for both high-level benchmarking (like load testing and timing) and low-level diagnostic output (like heap snapshots and CPU profiles), the agent can act as a senior performance engineer. Whether you are dealing with a slow Node.js backend, a memory-hungry Go service, or inefficient Python scripts, this skill provides the necessary interface to visualize execution paths and reduce latency.
Installation
To integrate this skill into your environment, use the command-line interface provided by ClawHub:
clawhub install openclaw/skills/skills/gitgoodordietrying/perf-profiler
Ensure that you have the necessary runtime dependencies (such as Node.js, Go, or shell tools like hyperfine) installed on your system if you intend to use specific profiling sub-commands.
Use Cases
This skill is indispensable in several scenarios:
- Latency Troubleshooting: If your API endpoints are exceeding their SLAs, use
perf-profilerto identify which specific functions or database queries are creating bottlenecks. - Memory Leak Hunting: For long-running services that crash after days of operation, you can utilize the heap snapshot comparison features to see which objects are failing to be garbage collected.
- Performance Regression Testing: Before deploying a major code refactor, run
hyperfinebenchmarks to ensure the new version is at least as fast as the original. - Architecture Visualization: Generate flame graphs to visualize the call stack, helping developers understand which parts of their application are doing the 'heavy lifting' and prioritizing where to apply optimization efforts.
Example Prompts
- "Perform a load test on my API endpoint /v1/data and compare the average response time against the baseline from last week."
- "My Node.js application is consuming increasing amounts of RAM over time. Generate a heap snapshot, identify potential memory leaks, and suggest a code fix."
- "Analyze this Python script and identify the slowest function call; then, generate a flame graph so I can visualize the hotspots."
Tips & Limitations
- Production Caution: Always be careful when running CPU profiling in production environments, as the overhead can sometimes skew results or temporarily slow down the target process. When possible, perform intensive profiling in a staging environment that mirrors your production configuration.
- Warmup Periods: When benchmarking, always include a warmup phase. JVM and V8 engines optimize code during runtime; initial runs are almost always slower than subsequent ones.
- Tooling: While
perf-profilersimplifies the process, ensure your environment variables and paths are correctly set forhyperfineand other CLI tools to function correctly.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-gitgoodordietrying-perf-profiler": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
shell-scripting
Write robust, portable shell scripts. Use when parsing arguments, handling errors properly, writing POSIX-compatible scripts, managing temp files, running commands in parallel, managing background processes, or adding --help to scripts.
api-dev
Scaffold, test, document, and debug REST and GraphQL APIs. Use when the user needs to create API endpoints, write integration tests, generate OpenAPI specs, test with curl, mock APIs, or troubleshoot HTTP issues.
skill-writer
Write high-quality agent skills (SKILL.md files) for ClawdHub/MoltHub. Use when creating a new skill from scratch, structuring skill content, writing effective frontmatter and descriptions, choosing section patterns, or following best practices for agent-consumable technical documentation.
log-analyzer
Parse, search, and analyze application logs across formats. Use when debugging from log files, setting up structured logging, analyzing error patterns, correlating events across services, parsing stack traces, or monitoring log output in real time.
data-validation
Validate data with schemas across languages and formats. Use when defining JSON Schema, using Zod (TypeScript) or Pydantic (Python), validating API request/response shapes, checking CSV/JSON data integrity, or setting up data contracts between services.