EffiSkill: Agent Skill Based Automated Code Efficiency Optimization

๐Ÿ“… 2026-03-29
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
Existing code optimization approaches are often limited to instance-specific rewriting and lack generalization capabilities. This work proposes EffiSkill, a novel framework that formulates code efficiency optimization as reusable agent skills. By automatically mining generic operators and meta-skills from a large corpus of slow/fast program pairs, EffiSkill constructs a portable optimization toolkit capable of diagnosing new programs, retrieving and composing relevant skills, and generating optimized code candidatesโ€”all without requiring execution feedback. The approach enables execution-agnostic automated optimization and facilitates cross-task knowledge transfer. Evaluated on the EffiBench-X benchmark, EffiSkill achieves a 3.69โ€“12.52 percentage point improvement in optimization success rate over the strongest baseline, demonstrating the effectiveness of its skill-reuse mechanism.
๐Ÿ“ Abstract
Code efficiency is a fundamental aspect of software quality, yet how to harness large language models (LLMs) to optimize programs remains challenging. Prior approaches have sought for one-shot rewriting, retrieved exemplars, or prompt-based search, but they do not explicitly distill reusable optimization knowledge, which limits generalization beyond individual instances. In this paper, we present EffiSkill, a framework for code-efficiency optimization that builds a portable optimization toolbox for LLM-based agents. The key idea is to model recurring slow-to-fast transformations as reusable agent skills that capture both concrete transformation mechanisms and higher-level optimization strategies. EffiSkill adopts a two-stage design: Stage I mines Operator and Meta Skills from large-scale slow/fast program pairs to build a skill library; Stage II applies this library to unseen programs through execution-free diagnosis, skill retrieval, plan composition, and candidate generation, without runtime feedback. Results on EffiBench-X show that EffiSkill achieves higher optimization success rates, improving over the strongest baseline by 3.69 to 12.52 percentage points across model and language settings. These findings suggest that mechanism-level skill reuse provides a useful foundation for execution-free code optimization, and that the resulting skill library can serve as a reusable resource for broader agent workflows.
Problem

Research questions and friction points this paper is trying to address.

code efficiency
large language models
optimization knowledge
reusable skills
program optimization
Innovation

Methods, ideas, or system contributions that make the work stand out.

agent skill
code efficiency optimization
reusable transformation
execution-free diagnosis
skill library
๐Ÿ”Ž Similar Papers
No similar papers found.