Agentic AI
New Framework Uses AI Agent Skills to Automatically Speed Up Code
EffiSkill, a two-stage system that learns and applies recurring optimization patterns, outperforms existing methods at making correct programs run faster.
Speeding up software without breaking its correctness remains a tricky task for AI systems. Researchers have presented EffiSkill, a novel framework that teaches itself patterns of how to transform slow code into fast code, then applies those learned skills to optimize new programs.
How it works#
The system operates in two stages. First, it distills a library of Operator Skills — structured knowledge cards that capture recurring transformations. Each skill documents what a code change is meant to do, when it applies, how to execute it, what results to expect, and potential risks involved. The model learns these skills by studying pairs of slow and fast programs in a specific programming language.
Next, the framework tackles a new program by diagnosing what optimizations might help, retrieving the most relevant skills, and composing alternative transformation plans. Rather than stopping at a single suggestion, it generates up to eight candidate implementations. Only after the candidates are created does the system check them: public test cases filter and rank the options, while held-out private tests measure whether the optimizations actually preserve correctness and deliver the promised speedup.
Results across languages#
The team tested EffiSkill on 623 optimization tasks per language, comparing it against other approaches using two different underlying AI models. They evaluated it separately for both Python and C++ code.
EffiSkill achieved the best performance on both single-best output and when selecting the top result from eight candidates. The improvements over the strongest competing methods ranged from roughly 5 to 12 percentage points, depending on the language and configuration.
Why it matters#
This work suggests that the full pipeline of learning, diagnosing, and iteratively refining multiple candidates—constrained by a reasonable computational budget—enables more robust code optimization across diverse programming tasks.

