目录

SkVM

Compile and run LLM agent skills across heterogeneous models and harnesses

English | 中文

Website · GitHub · Paper

npm license release last commit

SkVM is a compilation and runtime system that makes LLM agent skills portable across heterogeneous models and harnesses. It has four major parts:

  • Profiling — measure a model+harness against pre-defined primitive capabilities
  • AOT-Compilation — compile a skill with multiple passes in AOT compiler
  • JIT-Optimization — improve runtime speed (JIT-boost) and skill content (JIT-optimize)
  • Benchmark — evaluate original, compiled, and optimized skills across tasks, conditions, and models

SkVM architecture

Reference: SkVM: Revisiting Language VM for Skills across Heterogenous LLMs and Harnesseshttps://arxiv.org/abs/2604.03088

Demo

SkVM Optimization: Skill Quality Comparison

SkVM Accelerates Agent Execution

Install

# curl one-liner (macOS / Linux)
curl -fsSL https://skillvm.ai/install.sh | sh

# or via npm (any platform with Node ≥ 18; postinstall fetches the matching binary)
npm i -g @ipads-skvm/skvm

# self-check
skvm --help

The installer drops a standalone binary at ~/.local/share/skvm/bin/skvm (symlinked into ~/.local/bin/skvm) and bundles a private, isolated headless agent runtime used internally by skvm jit-optimize — it is fully self-contained and does not touch any agent or CLI you may have installed globally.

Agent-facing skills ship inside the install. Copy them into your agent harness’s skills directory to teach it how to drive skvm:

# OpenClaw
cp -r ~/.local/share/skvm/skills/skvm-jit ~/.openclaw/workspace/skills/
cp -r ~/.local/share/skvm/skills/skvm-general ~/.openclaw/workspace/skills/

# Hermes Agent
cp -r ~/.local/share/skvm/skills/skvm-jit ~/.hermes/skills/
cp -r ~/.local/share/skvm/skills/skvm-general ~/.hermes/skills/
  • skvm-jit — post-task JIT optimization skill for submitting conversation logs to skvm jit-optimize
  • skvm-general — drives profile / aot-compile / bench / proposals on behalf of a user

Quick Start

If you are running SkVM from the source tree instead of an installed binary, use bun run skvm in the examples below.

Set your API key:

export OPENROUTER_API_KEY=sk-or-...

If you use another provider, see docs/providers.md.

1. Profile a model’s primitive capabilities

Writes a target capability profile to ~/.skvm/profiles/.

If your target model + adapter pair is already covered by the pre-built profiles shipped in skvm-data/profiles/, you can copy the cached result into your local profile cache and skip skvm profile entirely:

mkdir -p ~/.skvm/profiles
cp -R skvm-data/profiles/. ~/.skvm/profiles/

Currently bundled pre-built profiles:

  • Example bundled targets include qwen/qwen3.5-35b-a3b, deepseek/deepseek-v3.2, anthropic/claude-opus-4.6, and others.
skvm profile \
  --model=qwen/qwen3.5-35b-a3b \
  --adapter=bare-agent

With the default --concurrency=1, this example typically takes about 20 minutes for one full run. If you want it to finish faster, increase --concurrency to profile more primitives in parallel.

2. Compile a skill against that profile

The compiler rewrites the skill to match the target’s capabilities. A cached profile for the same --model + --adapter pair must exist (run skvm profile first, or use skvm pipeline which profiles automatically).

skvm aot-compile \
  --skill=path/to/skill-dir \
  --model=qwen/qwen3.5-35b-a3b \
  --adapter=bare-agent \
  --pass=1 \
  --compiler-model=anthropic/claude-sonnet-4.6

Compiled variants are written under ~/.skvm/proposals/aot-compile/<adapter>/<safeModel>/<skillName>/<passTag>/ by default.

3. Autotune the skill with synthetic tasks

The optimizer LLM derives tasks from the skill itself, then loops edit → rerun → score.

By default, synthetic mode generates 2 training tasks and 1 held-out test task.

skvm jit-optimize \
  --skill=path/to/skill-dir \
  --task-source=synthetic \
  --task-concurrency=3 \
  --target-adapter=bare-agent \
  --optimizer-model=anthropic/claude-sonnet-4.6 \
  --rounds=1 \
  --target-model=qwen/qwen3.5-35b-a3b

Results are written under ~/.skvm/proposals/jit-optimize/<adapter>/<safeTargetModel>/<skillName>/<timestamp>/ by default.

4. Optimize from an existing conversation log

No rerun, just diagnose and edit. Good for post-mortems and for the skvm-jit post-task optimization hook.

skvm jit-optimize \
  --skill=path/to/skill-dir \
  --task-source=log \
  --target-adapter=bare-agent \
  --logs=path/to/session.jsonl \
  --optimizer-model=anthropic/claude-sonnet-4.6 \
  --target-model=qwen/qwen3.5-35b-a3b

Review, accept, or reject the proposal

skvm proposals list        # CLI listing
skvm proposals show <id>   # CLI detail view
skvm proposals accept <id> # CLI accept
skvm proposals serve       # Web review UI

Configuration

SkVM keeps all runtime artifacts — cached profiles, proposal trees, bench and compile logs — under a single cache root:

~/.skvm/
├── profiles/   # Cached target capability profiles
├── log/        # Profile, compile, bench, and runtime logs
└── proposals/  # AOT-compile, jit-boost, jit-optimize outputs

The cache is user-global and shared across every directory you invoke skvm from, so profiles cached in one project are reused everywhere. Override the location via:

  • --skvm-cache=<path> flag (one-off)
  • SKVM_CACHE env var (persistent), e.g. export SKVM_CACHE=/mnt/fast/skvm

Individual subdirectories can also be pointed elsewhere with SKVM_PROFILES_DIR, SKVM_LOGS_DIR, and SKVM_PROPOSALS_DIR.

Dataset: skvm-data

The benchmark skills, tasks, and pre-built profiles live in a separate Git submodule (SJTU-IPADS/SkVM-data). Clone it if you plan to run skvm bench and want to use the bundled skills/tasks directly:

git submodule update --init   # or: git clone --recurse-submodules

This populates the skvm-data/ directory:

skvm-data/
├── skills/     # 108 skill directories (each contains a SKILL.md)
├── tasks/      # 216 task directories (each contains a task.json)
└── profiles/   # Pre-built target capability profiles
    ├── bare-agent/
    └── openclaw/

skvm bench resolves skills and tasks from skvm-data/ by default. Override the location via:

  • --skvm-data-dir=<path> flag (one-off)
  • SKVM_DATA_DIR env var (persistent)

Commands that take an explicit --skill=<path> or --task=<path> do not need the submodule — they work with any directory on disk.

skvm-data/profiles/ already includes pre-built profiles for some model + adapter combinations. If the pair you need is already there, copy skvm-data/profiles/ into your profile cache directory (default: ~/.skvm/profiles/, or SKVM_PROFILES_DIR if set) and you can skip running skvm profile for that target. See the profile list in the profiling section above for the currently bundled combinations.

mkdir -p ~/.skvm/profiles
cp -R skvm-data/profiles/. ~/.skvm/profiles/

Learn more

Citation

If you use SkVM in your research, please cite:

@article{chen2026skvm,
  title={SkVM: Revisiting Language VM for Skills across Heterogenous LLMs and Harnesses},
  author={Chen, Le and Feng, Erhu and Xia, Yubin and Chen, Haibo},
  journal={arXiv preprint arXiv:2604.03088},
  year={2026}
}
关于

The "Language" VM for Agent Skills

1.2 MB
邀请码