codspeed-optimize
This skill acts as an autonomous performance engineer, using CodSpeed benchmarks and flamegraph analysis to iteratively optimize code. It measures baseline performance, identifies bottlenecks through flame graphs, applies targeted changes, and validates improvements across simulation and walltime modes. The skill handles the full optimization loop—from establishing baselines to comparing runs and reporting gains—stopping only when significant improvements plateau or the user decides to halt.
codspeed-optimize autonomously improves code performance by iterating through CodSpeed benchmarks and flamegraph analysis.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-27
codspeed-optimize autonomously improves code performance by iterating through CodSpeed benchmarks and flamegraph analysis. This skill acts as an autonomous performance engineer, using CodSpeed benchmarks and flamegraph analysis to iteratively optimize code. It measures baseline performance, identifies bottlenecks through flame graphs, applies targeted changes, and validates improvements across simulation and walltime modes. The skill handles the full optimization loop—from establishing baselines to comparing runs and reporting gains—stopping only when significant improvements plateau or the user decides to halt.
Use it when
- Yes.
- codspeed-optimize reduces CPU usage, memory allocations, and latency in existing code by autonomously optimizing for faster execution.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
CodSpeedHQ/codspeed/codspeed-optimize · repository language: Rust
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How does codspeed-optimize make my code faster using benchmarks?
codspeed-optimize acts as an autonomous performance engineer, using CodSpeed benchmarks and flamegraph analysis to iteratively optimize your code. It measures baseline performance, identifies bottlenecks through flame graphs, applies targeted changes, and validates improvements across simulation and walltime modes. The skill handles the full optimization loop—from establishing baselines to comparing runs and reporting gains—stopping only when significant improvements plateau or the user decides to halt.
Can codspeed-optimize find performance bottlenecks in my code?
Yes. codspeed-optimize identifies and eliminates performance bottlenecks through iterative measurement and targeted changes. It analyzes where time is spent in your code using flamegraph analysis, pinpoints hot spots causing slowdowns, and then applies focused optimizations to remove those constraints. Each change is validated with benchmarks to confirm the improvement.
What does codspeed-optimize do to reduce CPU usage and latency?
codspeed-optimize reduces CPU usage, memory allocations, and latency in existing code by autonomously optimizing for faster execution. It uses CodSpeed benchmarks to measure the impact of each optimization, applies iterative changes targeting the identified bottlenecks, and validates that CPU cycles, memory pressure, and response times all improve before moving to the next optimization pass.
How does codspeed-optimize analyze where time is spent in code?
codspeed-optimize analyzes where time is spent in code through flamegraph analysis, which visualizes the call stack and shows which functions consume the most CPU time. It then validates improvements with walltime benchmarks to confirm that the optimizations actually reduce execution time in real-world conditions, not just in simulation.
Can codspeed-optimize compare performance before and after changes?
Yes. codspeed-optimize compares performance before and after optimization changes by establishing a baseline measurement, applying targeted optimizations, and then re-measuring to quantify the gains. This iterative comparison cycle continues until significant improvements plateau or you decide to stop the optimization process.
What is autonomous code optimization in codspeed-optimize?
codspeed-optimize's autonomous optimization means it runs the full performance engineering workflow without manual intervention: measure baseline, analyze flamegraphs, identify bottlenecks, apply fixes, validate with benchmarks, and repeat. You set the goal, and codspeed-optimize iteratively improves throughput and memory usage until improvements diminish or you halt the process.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Optimize
You are an autonomous performance engineer. Your job is to iteratively optimize code using CodSpeed benchmarks and flamegraph analysis. You work in a loop: measure, analyze, change, re-measure, compare — and you keep going until there's nothing left to gain or the user tells you to stop.
All measurements must go through CodSpeed. Always use the CodSpeed CLI (codspeed run, codspeed exec) to run benchmarks — never run benchmarks directly (e.g., cargo bench, pytest-benchmark, go test -bench) outside of CodSpeed. The CodSpeed CLI and MCP tools are your single source of truth for
(truncated - see the full file via the links below)
File tree — 1 file
skills/codspeed-optimize/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Autonomously optimize code for faster execution using CodSpeed benchmarks and flamegraph analysis”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill guides you through configuring benchmarks and integrating CodSpeed into your project. It covers language-specific harnesses (divan, criterion, pytest-benchmark, vitest, go test, Google Benchmark) and a universal exec mode for any language, helping you identify performance-critical code and establish repeatable performance tracking.
memory-benchmark measures heap allocations and process memory for SQL workloads under different journal modes. It includes dhat-based allocation tracking, stack-usage analysis via the stack-report binary, and six built-in workload profiles (insert-heavy, read-heavy, mixed, scan-heavy, series-blob, update-churn) for regression detection and performance tuning.
This skill provides systematic performance analysis for the RTK CLI tool, measuring startup time against a <10ms target, memory usage under 5MB, and token savings between 60–90%. It includes baseline capture, regression detection with flamegraph profiling, and common optimization techniques like LazyLock initialization and zero-copy string processing.
Prompt Improver refines code-related prompts by evaluating task clarity, investigation depth, verification steps, and scope control. It applies transformation rules to strengthen prompts for implementation, debugging, refactoring, code review, and testing tasks. The skill ensures prompts follow investigation-first principles and include appropriate verification checks before execution.
This guide explores Swift's native concurrency model, contrasting it with legacy Grand Central Dispatch approaches. You'll examine the cooperative thread pool, async/await state machines, structured concurrency hierarchies, and the Actor model's data safety guarantees. The material covers Swift 6 strict concurrency requirements, migration tactics, and synchronization primitives for building robust applications.
Rustunnel lets you create public tunnels for local services across HTTP, TCP, UDP, and peer-to-peer protocols. Use it to test webhooks, share development environments, access databases remotely, or run load-balanced pools—all controlled through MCP tools that integrate with Claude Code and other AI agents.