cs.SEMar 29, 2026

EffiSkill: Agent Skill Based Automated Code Efficiency Optimization

Authors: Zimu Wang, Yuling Shi, Mengfan Li, Zijun Liu, Jie M. Zhang, Chengcheng Wan, Xiaodong Gu

Organizations: Shanghai Jiao Tong University China · University of California, Berkeley USA · Columbia University USA · King’s College London United Kingdom · 

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.

Figures & tables

Explore similar work

CardsList
  1. PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization

    Jul 22, 2026Ryan Deng, Yuanzhe Liu, Bastian Lipka +4AI Coding AgentsCode Optimization

  2. EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback

    Apr 6, 2026Samira Hajizadeh, Suman JanaInference-Time OptimizationCode Optimization

  3. LLM Program Optimization via Retrieval Augmented Search

    Jan 31, 2025Sagnik Anupam, Alexander Shypula, Osbert BastaniLarge Language Model-Guided OptimizationIn-Context Learning