optimize

Optimizes Python functions for speed using evolutionary algorithms and validates with tests.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/nmintzer-oswego/claude-code-evolve --skill optimize-nmintzer-oswego
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/nmintzer-oswego/claude-code-evolve/tree/main/codeevolve/skills/optimize
Command: npx skills add https://github.com/nmintzer-oswego/claude-code-evolve --skill optimize-nmintzer-oswego

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Evolve a Python function to be faster using CodeEvolve. Use when you want to optimize, speed up, or improve the performance of a Python function.

Core Features & Use Cases

  • Evolve a target Python function to run faster through automated optimization iterations with configurable iterations and an optional function name, using a provided function file and test file to guide the evolution.
  • Validate correctness and performance through a preflight and harness build, then execute an end-to-end evolution pipeline that yields a best-performing variant and a diff against the original function.
  • Real-world scenarios include speeding up a computational bottleneck in data processing, plugins, or libraries while preserving expected behavior.

Quick Start

Provide a Python function file and a pytest test file, then run the optimization process to evolve a faster implementation.

Frequently Asked Questions about optimize

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

FAQPage Schema
How do I speed up a Python function while preserving its expected behavior?

To speed up a Python function while preserving behavior, you can use an automated evolution pipeline that iteratively optimizes the target function and validates it against pytest tests to ensure correctness.

What do I need to optimize a Python function using automated benchmarking?

Optimizing a Python function requires a Python file containing the target function and a separate pytest-compatible test file to guide the evolution and validate that performance improvements maintain correctness.

How does automated code evolution work for Python performance optimization?

Automated code evolution works by running a target Python function through preflight checks, building a performance harness, and executing configurable iterations to yield a faster variant and a diff against the original.

Can I target a specific Python function for optimization if my file has multiple functions?

Yes, you can target a specific Python function for optimization by providing an optional function name parameter, allowing the evolution process to isolate and improve only the specified computational bottleneck.

What results do I get after running a Python function optimization pipeline?

After running the optimization pipeline, you receive the best-performing evolved variant of the target Python function, a diff comparing it to the original implementation, and detailed run outputs stored in a dedicated directory.