SkVM: Reinventing Agent Skills with a Compiler Mindset
> Paper: *SkVM: Revisiting Language VM for Skills across Heterogenous LLMs and Harnesses* > Authors: Le Chen, Erhu Feng, Yubin Xia, Haibo Chen (SJTU IPADS) > arXiv: 2604.03088v3 [cs.SE] | GitHub: https://github.com/SJTU-IPADS/SkVM
1. The Problem: Skills Are Portable, but Not Runnable
The authors analyzed 118,000 agent skills and found a core contradiction: skills are designed as reusable composable units, but current systems treat them as raw text. The same skill behaves completely differently across models and harnesses — a fragility the paper calls the skill portability crisis.
Three typical mismatch types:
| Mismatch | Symptom | Example | |---|---|---| | P1: Model Mismatch | Skill assumes a model capability that doesn't exist | Complex JSON generation on a small model | | P2: Harness Mismatch | Skill assumes harness tools/formats | Batch tool dispatch that isn't available | | P3: Environment Mismatch | Skill assumes installed dependencies | Missing Python packages, relative paths |
Existing approaches fall short: raw context injection works only on one model; Anthropic's Skill-Creator optimizes for Claude only ("like compiling with the Intel compiler and hoping it runs on AMD"); fine-tuning is heavyweight, irreversible, and not composable.
Core insight: "Skills as Code, LLMs as Heterogeneous Processors" — like C code compiled to x86/ARM/RISC-V, skills should be "compiled" for each (model, harness) pair.
2. Architecture: Compiler + Runtime
SkVM is a two-stage system:
- AOT Compiler (install-time): capability-based compilation, environment binding, concurrency extraction
- Runtime + JIT (execution-time): variant selection, JIT optimizer (code solidification, adaptive recompilation), resource-aware scheduler
- Variant Selection: each target (model, harness) gets a pre-compiled, specialized skill variant.
- Code Solidification: frequently instantiated parameterized script templates are compiled into executable functions, bypassing LLM inference — reducing latency by 19–50x.
- Adaptive Recompilation: runtime monitoring detects systematic capability gaps missed at AOT time and triggers recompilation, so skills can self-improve.
- Highest score on every model-harness combination; average gain +15.3%
- Weakest models benefit most: +25% for Qwen3-30B + BareAgent over Skill-Creator
- Regression rate: 15% → 4.5%
- Cross-harness gap (OpenCode vs OpenClaw): 13 points → 5 points
- Token consumption reduced ~40%
- Concurrency: 3.2x speedup; code solidification: 19–50x latency reduction
- Compilation overhead: M models × H harnesses means M×H variants (though one-time per install)
- Profile maintenance: new model releases require re-profiling
- JIT complexity: not all skill code is solidifiable; over-solidification loses flexibility
- Determinism: LLMs are non-deterministic "processors," breaking the classical compiler reproducibility assumption
3. Primitive Capabilities: A Skill Instruction Set
SkVM defines 26 primitive capabilities with three proficiency levels (L1/L2/L3), covering code generation (shell/python/js/sql), reasoning (arithmetic/logic/planning), tool use (execution/files/network), and control flow (sequence/branching/loops/parallelism).
Each (model, harness) pair receives a capability profile. Key insight: weak models are not uniformly weak — their logical reasoning may be sufficient, but they have gaps in "non-logical" areas (complex JSON, environment management). Compilation fills exactly those gaps.
4. The Three AOT Compilation Stages
1. Capability-Based Compilation: decompose skill requirements into primitives, identify gaps, and compensate via *degrade* (rewrite to avoid L3 features), *substitute* (swap in supported capabilities), or *offload* (delegate steps to pre-generated scripts/tools).
2. Environment Binding: dependency analysis, environment probing, auto-generated setup scripts, and path materialization (e.g., resolving ./config.yaml to an actual absolute path).
3. Concurrency Extraction: LLM-assisted DAG construction exposes hidden parallelism. Three levels: DLP (data-level), ILP (batch tool calls in one turn), TLP (sub-agent spawning). 76% of skills contain procedural structure, but much parallelism is masked by sequential prose.
5. Runtime and JIT Optimization
6. Experimental Results
Setup: 8 models in 3 tiers (Claude-opus-4.6, DeepSeek-v3.2, Gemini-3-flash, Qwen3.5 variants, Qwen3-30B, Devstral-small), 3 harnesses (BareAgent, OpenCode, OpenClaw), SkillsBench + PinchBench, 118 tasks.
7. Analysis
"Skill as Code" is a paradigm shift: skill (source) → compiler → optimized variant → execution. This enables portability, compiler-style optimizations, and layered abstraction. Weaker models benefit most because their logical reasoning suffices — SkVM offloads the non-logical chores to pre-generated scripts. The post notes echoes with GraSP: the bottleneck of the skill ecosystem isn't availability, but whether skills run well. SkVM ships OpenClaw integration commands and treats OpenClaw as one of its test harnesses.
8. Limitations
9. Takeaway
SkVM applies compiler thinking to the agent skill portability crisis — skills as source code, LLMs as heterogeneous processors — via AOT compilation and JIT optimization. With +25% gains for weak models, 40% token savings, and 19–50x latency reductions, it marks the skill ecosystem's transition from hand-written prompts to engineered compilation.