Table of Contents
Fetching ...

SkVM: Compiling Skills for Efficient Execution Everywhere

Le Chen, Erhu Feng, Yubin Xia, Haibo Chen

Abstract

LLM agents increasingly adopt skills as a reusable unit of composition. While skills are shared across diverse agent platforms, current systems treat them as raw context, causing the same skill to behave inconsistently for different agents. This fragility undermines skill portability and execution efficiency. To address this challenge, we analyze 118,000 skills and draw inspiration from traditional compiler design. We treat skills as code and LLMs as heterogeneous processors. To make portability actionable, we decompose a skill's requirements into a set of primitive capabilities, and measure how well each model-harness pair supports them. Based on these capability profiles, we propose SkVM, a compilation and runtime system designed for portable and efficient skill execution. At compile time, SkVM performs capability-based compilation, environment binding, and concurrency extraction. At runtime, SkVM applies JIT code solidification and adaptive recompilation for performance optimization. We evaluate SkVM across eight LLMs of varying scales and three agent harnesses, covering SkillsBench and representative skill tasks. Results demonstrate that SkVM significantly improves task completion rates across different models and environments while reducing token consumption by up to 40%. In terms of performance, SkVM achieves up to 3.2x speedup with enhanced parallelism, and 19-50x latency reduction through code solidification.

SkVM: Compiling Skills for Efficient Execution Everywhere

Abstract

LLM agents increasingly adopt skills as a reusable unit of composition. While skills are shared across diverse agent platforms, current systems treat them as raw context, causing the same skill to behave inconsistently for different agents. This fragility undermines skill portability and execution efficiency. To address this challenge, we analyze 118,000 skills and draw inspiration from traditional compiler design. We treat skills as code and LLMs as heterogeneous processors. To make portability actionable, we decompose a skill's requirements into a set of primitive capabilities, and measure how well each model-harness pair supports them. Based on these capability profiles, we propose SkVM, a compilation and runtime system designed for portable and efficient skill execution. At compile time, SkVM performs capability-based compilation, environment binding, and concurrency extraction. At runtime, SkVM applies JIT code solidification and adaptive recompilation for performance optimization. We evaluate SkVM across eight LLMs of varying scales and three agent harnesses, covering SkillsBench and representative skill tasks. Results demonstrate that SkVM significantly improves task completion rates across different models and environments while reducing token consumption by up to 40%. In terms of performance, SkVM achieves up to 3.2x speedup with enhanced parallelism, and 19-50x latency reduction through code solidification.

Paper Structure

This paper contains 32 sections, 16 figures, 1 table.

Figures (16)

  • Figure 1: Evolution of programming abstractions. Skills are the current frontier: natural language programs of hundreds of lines that lack a compiler and runtime for cross-target portability.
  • Figure 2: Skill performance across models and harnesses. Columns are tasks, rows are models, and each subplot corresponds to one harness. Cell colors indicate score deltas relative to the no-skill baseline, and cell labels show absolute task scores. Both model identity and harness choice significantly affect outcomes.
  • Figure 3: Skill download distribution on clawhub.ai and skills.sh. Both platforms show a long-tailed distribution.
  • Figure 4: Removing a required dependency hurts both correctness and efficiency.
  • Figure 5: SkVM architecture. The AOT compiler produces optimized skill variants at install time through three passes. The runtime manages variant selection, JIT optimization, and resource-aware scheduling during execution.
  • ...and 11 more figures