betaFeedback

WorksComputer Science

How Much Skill Orchestration Can LLM Agents Compile Away? Execution-Grounded Specialization for Token-Efficient Skill Use

Abstract

Reusable skills guide large language model (LLM) agents through recurring requests, but each invocation still requires the model to interpret the skill and reconstruct its orchestration. Can agents automatically compile this orchestration into an executable fast path without human intervention? We first study zero-shot skill specialization, which compiles without execution evidence, and find that despite the skill's procedural guidance, incorrect assumptions about runtime bindings can make generated plans brittle and recovery costly. This motivates SkillCache, a one-trace skill specialization method that compiles a completed invocation into a parameterized capsule of programs and natural-language steps, replays it before reuse, and drives it with a plan executor that returns control to the model only when needed, keeping the source skill for recovery. With the Claude Code harness, warm execution of the same request reduces tokens on 87 SkillsBench tasks by 81% with Claude Sonnet 4.6 and by 74% with Claude Opus 4.8 at comparable reward, and capsules stay effective under controlled request changes. Capsules also transfer across models, raising three open-weight models' mean reward by 12-25 percentage points while reducing their tokens by 72-81%, suggesting that execution-grounded compilation is a promising approach to efficient repeated skill use and cross-model transfer.

Introduction

Many large language model (LLM) agent workloads contain recurring requests of the same type, such as the same analysis over new datasets [58, 26, 13]. Agent Skills package instructions and supporting files as reusable procedures for such requests [55 Anthropic, n.d.b]. Well-written skills can improve overall task accuracy and sometimes reduce exploration and tokens [26, 61], yet the agent still needs to plan and reason over the matched skill on every invocation. In particular, irrelevant skill context and repeated reasoning add runtime overhead (Xu et al., 2026).

Recent source-level compilers transform skill specifications into structured or executable forms (Ouyang et al., 2026b; Xu et al., 2026; Dantanarayana et al., 2026), but operate mainly on skill packages instead of specializing orchestration for a concrete request. Other methods evolve or optimize skills. Some use execution trajectories and task-level rewards (Mi et al., 2026; Xia et al., 2026; Yang et al., 2026a), held-out rollout evaluation [53], or official verifier feedback [40] to learn, select, or repair updates, yet such signals may be unavailable in deployment. Human-authored skills also outperform the automatic alternatives evaluated by Zhong et al. [61]. Thus, we study a complementary setting that preserves the human-authored skill as the source of truth and stores execution-derived specialization separately.

Building on systems that separate planning from tool execution (Xu et al., 2023; Kim et al., 2024; Erdogan et al., 2025), we first study zero-shot skill specialization, where an agent compiles the skill and request into a reusable capsule of programs and natural-language steps before execution. The goal is to pay the compilation cost once and reuse the resulting capsule instead of repeatedly interpreting the skill. On 87 SkillsBench tasks [26], however, compiling and executing once uses more tokens than direct skill use on 58 of the 84 tasks without a timeout, and 1.24× as many per task in geometric mean. On the 32 tasks with a compiled-program failure, execution alone uses 0.92× the direct tokens, against 0.71× over all tasks. Including compilation raises the ratio on these 32 tasks to 1.34×.

These failures motivate using execution evidence alongside the skill source during specialization. Prior work derives reusable procedures or executable artifacts from observed behavior (Chen et al., 2026c; Ni et al., 2026; Chen et al., 2026b; Li, 2026; El Yadouni & Li, 2026), sometimes by aggregating multiple trajectories or using an external evaluator to confirm success. In our setting, the supplied skill already provides the general procedure. We introduce SkillCache, a one-trace skill specialization method that uses a single completed trajectory to recover the runtime bindings and execution structure. An evaluator-blind compiler agent automatically compiles the unchanged skill and trace into a parameterized capsule of programs and natural-language steps. At reuse, SkillCache drives the capsule with a plan executor that runs consecutive programs and returns control to the model only for its input, its judgment, or a failed program, so the model no longer orchestrates each call. The source skill remains available for recovery. We call the initial execution cold and subsequent capsule-augmented executions warm, and Figure 1 shows both on an example request. Our contributions are as follows:

Figure 1. The same request, run cold and warm (SkillsBench llm-prefix-cache-replay, Claude Opus 4.8). In the warm run, the model fills in the paths from the request, and the executor runs the compiled programs.

  • We first show that specializing a skill from the request and skill alone does not reliably reduce tokens, because the compiler may guess runtime bindings incorrectly and failed programs are expensive to recover.

  • We thus present SkillCache, a one-trace skill specialization method that turns one completed execution into a capsule of programs and natural-language steps and replays it before reuse for qualification.

  • Building on the capsule’s structure, we also present an executor-driven design, which runs the programs and passes values between them, returning control to the model only when needed.

  • We evaluate SkillCache on 87 SkillsBench tasks. Averaged over three runs, warm execution reduces tokens by 81% with Claude Sonnet 4.6 and by 74% with Claude Opus 4.8 at comparable reward, repaying the dollar cost of compilation after 1.1 and 1.5 reuses in aggregate. Capsules also transfer to three open-weight models, raising their mean reward by 12–25 percentage points. We further show that capsules stay effective under controlled request changes and that the executor-driven design and replay both contribute to the savings.

Background

Agent Skills and Their Orchestration Cost

LLM agents combine reasoning with environment actions and external tools [54, 41, 38]. Agent harnesses such as Claude Code (Anthropic, n.d.a), Codex [34], and OpenClaw (OpenClaw, n.d.) manage context, tools, and multi-turn execution. Agent Skills extend an agent with reusable procedures, each a directory with a SKILL.md file of instructions and optional scripts and reference files [55 Anthropic, n.d.b]. The model first reads each skill’s name and description, decides whether the skill applies, and opens its instructions and files when it needs them. It then interprets the skill and orchestrates its procedure through tool calls in the harness.

Each model call takes the instructions and the execution history so far as input, so input tokens accumulate across calls. Provider prompt caching makes repeated prefixes cheaper [31], but their cost still grows with every call. Each call also generates new output tokens and adds latency. In the cold executions of our main study (§ 7), a request takes a median of 14 calls with both Sonnet 4.6 and Opus 4.8.

Many of these calls do mechanical work, such as composing a command or copying a value from one output into the next. Only judgment needs a model, yet every recurring request has the model redo the mechanical work. Together, these observations suggest compiling the mechanical work of a skill invocation into programs that later requests reuse, and involving the model only where judgment is needed.

Tracing JIT Compilation

Tracing just-in-time (JIT) compilers reuse compiled code for frequently executed paths within a program run [17]. While interpreting a program, they record a path, called a trace, and only then generate code specialized to the types observed along it. This specialization assumes that later executions follow the same path with compatible types, and guards check these assumptions at runtime. If a guard fails, execution leaves the compiled trace and can return to the interpreter through deoptimization. The compiler must preserve the program’s meaning across specialization and deoptimization [16]. In § 4, we detail how SkillCache brings the idea of tracing JIT compilation to skill orchestration in LLM agents.

Can Skills Be Specialized without Execution Evidence?

Zero-Shot Skill Specialization

A skill-guided invocation comprises a request qq, supplied skill packages SS, and an initial workspace W0W_0. Given execution evidence hh, a compiler CθcC_{\theta_c} produces a capsule zhz_h, and an executor EθeE_{\theta_e} uses it to interact with tools:

zh∼Cθc(q,S,h),z_h \sim C_{\theta_c}(q, S, h),
(yh,Wh,τh)∼Eθe(q,S,W0,zh).(1)(y_h, W_h, \tau_h) \sim E_{\theta_e}(q, S, W_0, z_h). \tag*{(1)}

Here θc\theta_c and θe\theta_e denote the compiler and executor configurations, yhy_h is the response, and τh=((a1,o1),…,(aT,oT))\tau_h = ((a_1, o_1), \ldots, (a_T, o_T)) is the observable trajectory. Let mhm_h and khk_h denote the provider-reported tokens of this execution and of its compilation, and m0m_0 those of direct skill execution.

Zero-shot specialization compiles without observing task execution:

hzero=∅,zzero∼Cθc(q,S,∅).(2)h_{\mathrm{zero}} = \varnothing,\qquad z_{\mathrm{zero}} \sim C_{\theta_c}(q, S, \varnothing). \tag*{(2)}

The compiler must decide which branches and bindings can be fixed ahead of time, and incorrect assumptions can cause failures and recovery. This raises the question of whether a skill and request alone support reliable specialization.

Since the compile call precedes zero-shot execution, the primary comparison includes compilation and execution, kzero+mzerok_{\mathrm{zero}} + m_{\mathrm{zero}}. If the capsule is persisted, its tokens over NN compatible invocations are kzero+Nmzerok_{\mathrm{zero}} + Nm_{\mathrm{zero}}, compared with Nm0Nm_0 for direct skill execution, assuming fixed per-invocation costs. Persisting the capsule saves tokens overall when N(m0−mzero)>kzeroN(m_0 - m_{\mathrm{zero}}) > k_{\mathrm{zero}}.

Evaluating Zero-Shot Specialization

We run 87 SkillsBench tasks ([26]) with Sonnet 4.6 using the Claude Code harness (Anthropic, n.d.a). The direct and zero-shot conditions use the same skills, model, and environment, and the zero-shot compiler sees only the request and skills (Appendix § 12.§ 2). We leave out the three tasks where an execution timed out, count the tasks on which zero-shot uses fewer or more tokens than direct execution, and apply a two-sided sign test.

Results. Table 1 shows that, counting execution alone, zero-shot uses 0.71× the direct tokens per task. However, the compile call outweighs this saving. Once it is included, zero-shot uses 1.24× the direct tokens per task, and 58 of 84 tasks use more. Total tokens decrease by 5%, but one task holds 18% of the direct tokens, and without it they increase by 11% (Appendix § 12.§ 2). Reward rises on 10 tasks and decreases on 12 (p=0.83p = 0.83). A post-hoc reading of each trajectory separates two failure modes. On 10 tasks, a program returned a wrong answer without an error, and 9

TasksnnCompile + executionExecution only
RatioFewer/moreRatioFewer/more
All841.24×26/58*0.71×54/30
No failure521.19×17/350.60×37/15*
Failure321.34×9/230.92×17/15

Table 1. Zero-shot against direct execution on 84 tasks (Sonnet 4.6). Ratio is the geometric mean of zero-shot over direct tokens, and Fewer/more counts tasks. A star marks p<0.005p < 0.005 in a sign test. Failure marks observable program failures.

of these scored 0. On 32 others, a compiled program failed observably and the model recovered through direct skill use. Execution alone then uses 0.92× the direct tokens per task, and 1.34× with the compile call.

Even when reuse amortizes the compile call, zero-shot savings remain uneven across tasks (§ 7.7). This motivates one-trace skill specialization, which uses the branch and interfaces observed in a completed trajectory τobs\tau_{\mathrm{obs}} to specialize the unchanged source skill:

zzero∼Cθc(q,S,∅),ztrace∼Cθc(q,S,τobs).(3)z_{\mathrm{zero}} \sim C_{\theta_c}(q, S, \varnothing),\qquad z_{\mathrm{trace}} \sim C_{\theta_c}(q, S, \tau_{\mathrm{obs}}). \tag*{(3)}

SkillCache Design Overview

SkillCache performs branch-level specialization of a supplied skill using one completed invocation. It works in three phases. (1) Observe: It records the cold invocation’s observable trace τobs\tau_{\mathrm{obs}}, which holds the tool calls with their arguments, results, and errors, and the agent’s messages. The trace identifies the branch the skill took and carries its runtime arguments, intermediate observations, and recovery actions. (2) Compile: An isolated compiler turns τobs\tau_{\mathrm{obs}} into a capsule, fusing adjacent deterministic tool calls into programs, keeping judgments as natural-language steps, and lifting request-dependent values into bindings (Figure 2). The host admits a capsule only after its programs pass a replay in the task’s sandbox, and otherwise falls back to a written procedure (§ 5). (3) Execute: In a later, warm execution, a plan executor runs the programs and handles natural-language steps and failed programs to the model (§ 6). Each phase runs in a fresh sandbox, and no phase sees the benchmark’s tests or verifier (Appendix § 12.§ 3).

Compiling an execution into a capsule

Figure 2. Compiling an execution into a capsule. (a) An observed execution. (b) The compiler fuses each run of tool calls into a program and keeps the judgment as a natural-language step. (c) The host admits the capsule only after three gates.

These phases follow a tracing JIT compiler (Gal et al., [17]). The cold execution is the recorded path, and the capsule is the compiled trace, kept for later requests of the same kind as a trace cache keeps compiled traces ([17]). SkillCache’s compiler is an LLM agent that can write failing programs, which is why the host replays each candidate before admitting it. A program can still fail later when the request, the model’s decisions, or the environment differ. Like a failed guard, a failed program leaves the compiled path through deoptimization, but only for that step, and the rest of the plan stays compiled.

Compiling a Capsule

The Capsule Representation

The compiler emits a parameterized capsule

z=(μ,B,P,π,V),(4)z = (\mu, B, P, \pi, V), \tag*{(4)}

where μ\mu describes when the capsule applies, BB holds the bindings (the named values that programs read or write), PP contains programs, π\pi interleaves program calls with natural-language steps, and VV is an optional verification of the postconditions that the request and source skill state. VV runs after π\pi and, like π\pi, mixes program calls with natural-language steps.

Each binding describes how to obtain its live value, from the request or workspace, a natural-language step, or a program’s output. Each program declares the bindings it reads and those it sets for later programs, so values pass from one program to the next without the model. Programs are language-agnostic. Each has source files, a command, and a syntax or build check, reads its inputs from a JSON file, and prints one JSON result or exits nonzero with a diagnostic.

Alongside zz, the compiler returns examples EE, the values the bindings had in the observed execution. They serve only to qualify the capsule (§ 5.3). The host removes them when it mounts the capsule, so a warm execution never receives EE.

Trace-Guided Compilation

The compiler reads (q,S,τobs)(q, S, \tau_{\mathrm{obs}}) in a fresh sandbox that holds none of the task’s files. The compiler prompt and the program interface are fixed across tasks, and the prompt (Appendix § 13) specifies four specialization rules. Path pruning: The compiler removes failed exploration, keeps the skill’s requirements, and adds no behavior that neither the skill nor the trace shows. Binding lifting: Values that a program needs and that depend on the request or workspace become bindings, each with an instruction for obtaining its live value, while other values stay as the execution used them. Region fusion: Deterministic operations become programs, and adjacent ones share one program. Where the execution ran code, such as a skill’s script, the program reuses that code and changes only the bindings. A step that needs semantic judgment or a new observation stays a natural-language step. Grounded postconditions: VV checks only the observable postconditions that the request and source skill state, together with any inspection by which the execution checked and corrected its own result. The prompt forbids comparing a result with the answer the observed execution produced, and the compiler never sees the evaluator.

Capsule Qualification

To reduce program failures at reuse, where recovery is costly (§ 3), the host qualifies each candidate before admitting it to the cache, through three gates that do not call the model.

Gate 1: Structure and dataflow. The host parses the capsule and checks its dataflow. Steps call exactly the programs in PP, and the programs’ inputs and outputs are exactly the bindings in BB. Each output comes from only one program, which runs before any program that reads it.

Gate 2: Program checks. The host creates a fresh sandbox from the task image and runs the check the compiler wrote for each program, such as python3 -m py_compile. This gate catches programs that do not parse or build in the task’s environment.

Gate 3: End-to-end replay. In a fresh task sandbox, the host replays the plan with the same plan executor used at reuse. The examples EE supply every binding that no program outputs. Programs execute on task inputs and pass their outputs through the bindings. If a program fails, replay records its diagnostics, substitutes its observed outputs from EE, and continues to collect failures from later programs in the same replay.

The compiler receives the collected failures and its previous answer, then returns a repaired capsule. The host allows up to three attempts at the hybrid form, a capsule with programs. If no candidate qualifies, the host compiles the same trace into a written procedure, the textual form, with a prompt that follows the same rules. If that also fails, later executions run with the source skill alone. Appendix B gives the prompts for both forms.

Executing a Capsule

The Plan Executor

If the model called each program itself, it would still read the whole plan from the start and orchestrate every call. A capsule, however, explicitly interleaves program steps with natural-language steps and declares each program’s input and output bindings. This structure lets consecutive programs run back to back without invoking the model. We thus introduce an executor-driven design, in which a plan executor, skillcache-run, advances through the program steps and returns control to the model when the plan needs its input or judgment. The executor runs each program through the runtime, skillcache-tool. Both skillcache-run and skillcache-tool are command-line programs that the host places in the agent’s sandbox, and the model invokes them with its ordinary shell tool, so the agent harness runs unchanged. In the alternative agent-driven backend, the prompt holds the whole plan and the model calls skillcache-tool for each program itself (Figure 3).

Figure 3. Who drives the plan. (a) Agent-driven: the model calls every program itself. (b) Executor-driven: the executor runs programs back to back and returns to the model only when the plan needs it. Bars illustrate the plan context each call reads beyond the shared context.

Protocol. The prompt shows the capsule’s name and description, and the model decides whether it applies. On a miss, the model serves the request with the skills and its normal tools, as in a cold execution. On a hit, the model first performs any steps before the first program, such as locating an input, and then starts the executor once with skillcache-run run and the bindings that the programs read before the first hand-over. A textual capsule has no programs, so the model follows its steps directly. The executor runs program steps in order and returns to the model with one of three reports (Figure 4), each listing the programs completed since the previous report with their results. needs_bindings asks at once for every binding that the programs up to the next hand-over read but were not given. your_steps hands over the next natural-language steps, including any step whose program failed (§ 6.2), and asks for the bindings that the next programs read. complete reports that no program is left,

Figure 4. The plan executor as a state machine. Each run or continue is a short process that runs programs until the model is needed, reports, and exits. The plan state file carries the plan between calls. Circled numbers follow the Example paragraph.

locating an input, and then starts the executor once with skillcache-run run and the bindings that the programs read before the first hand-over. A textual capsule has no programs, so the model follows its steps directly. The executor runs program steps in order and returns to the model with one of three reports (Figure 4), each listing the programs completed since the previous report with their results. needs_bindings asks at once for every binding that the programs up to the next hand-over read but were not given. your_steps hands over the next natural-language steps, including any step whose program failed (§ 6.2), and asks for the bindings that the next programs read. complete reports that no program is left, with the remaining natural-language steps for the model. The model answers the first two with skillcache-run continue and the bindings asked for.

Plan state. Each run or continue is a short process that prints its report and exits. A plan state file records the next step to run (position), the step a continue resumes at (awaiting), every binding known so far (bindings), the steps whose program failed with their diagnostics (failed), and the programs completed since the last report with their results (completed), as Figure 4 lists. The executor saves it before each program runs, so when the agent’s command limit ends a call in the middle of a plan, a later continue reruns the interrupted program.

Fewer and smaller calls. The executor passes each program’s outputs to the programs that read them and asks at once for the other bindings that the programs up to the next hand-over read. Thus, the programs run back to back without returning to the model for an input. When several natural-language steps come in a row, the executor hands them over in one report, and the model performs them all before a single continue with the bindings asked for. Each call also reads less of the plan, since later steps reach the model only when the executor hands them over.

Example. Consider the capsule at the top of Figure 3 and follow it through Figure 4. The model first performs n1n_1. Suppose it then starts the plan with run but leaves out xx, which the prompt lists (①). Program p1p_1 reads xx, so the executor reports needs_bindings and asks for it (②). The model gives xx with continue (③). The executor runs p1p_1 and passes its output o1o_1 to p2p_2, and p2p_2 fails twice (§ 6.2). The executor reports your_steps with p2p_2, marked program_failed, together with n2n_2 and n3n_3, and asks in the same report for yy and zz (④). The model performs the three steps and answers with one continue that gives yy and zz, all that p3p_3 and VV read, and p3p_3 and VV run (⑤). No program is left, so the executor reports complete (⑥), and the model replies to the request.

Deoptimization

A compiled program can fail on a later request, for example when a service is down or an input differs from the observed one. A program fails when it exits nonzero twice, runs out of time, or returns without an output it declares. The executor then hands that step to the model as program_failed, with its instruction and diagnostics. For a step of π\pi (Equation (4)), it also gives the path of the program’s source, which shows how the step was done. Only the failing step leaves the compiled path, and the rest of the plan continues compiled. The model then performs that step itself, with the source skills still available as in a cold execution. In the main runs, the executor hands back a failed program in 11 of 481 warm executions of hybrid capsules (Appendix § 12.§ 5).

Evaluation

We evaluate SkillCache on all 87 SkillsBench tasks ([26]. § 7.2 measures warm execution against cold execution, and § 7.3 compares SkillCache with reuse baselines. § 7.4 and § 7.5 study cross-model and cross-query transfer, respectively. § 7.6 analyzes where the savings come from and when compilation pays for itself, and § 7.7 conducts ablation studies.

Setup

Pipeline. We evaluate the cold-compile-warm pipeline with Claude Sonnet 4.6 ([2]) and Claude Opus 4.8 ([1]), which we call Sonnet and Opus below, at medium effort using the Claude Code harness ((Anthropic, n.d.a), with a one-hour timeout and a fresh sandbox per execution (Appendix § 12.§ 1). A cold execution serves the request with the skills alone, a compiler agent with the same model compiles its trace, and a warm execution serves the same request again. The warm execution starts in a fresh sandbox without the cold execution’s outputs, and § 7.5 tests changed requests, including ones the original answer fails. We run the whole pipeline three times with each model, each from its own cold executions, and report the mean and standard deviation across runs. Cross-model transfer and the replay ablation run three times, once with each run’s capsules, and cross-query transfer runs three times with the first run’s capsules.

Baselines. Besides the cold execution, we compare SkillCache with two reuse baselines from prior work. Each warm context runs in the same harness with the same request and skills, and adds one form of cold execution. Raw trace adds the trace itself, as systems that reuse trajectories in context do ([15]). Written procedure adds a textual procedure, the representation used in workflow memory ([47]) and plan caching ([58]). For a fair comparison, the same compiler writes it from the trace with the prompt of the capsule’s textual form (Appendix § 13). Both baselines are agent-driven. SkillCache adds the capsule and runs it with the plan executor. To separate the representation from the executor, § 7.7 also runs the capsule agent-driven against both baselines.

Metrics. We report provider-reported tokens, which include cache reads and writes, list-price cost, model calls, latency, and verifier reward. Reward is the task verifier’s score in [0,1][0,1], which is 1 when every check passes, and a few tasks give partial credit. Latency is the span from a task’s first model call to the end of its last, so it includes the commands and programs between calls. A missing outcome scores zero reward, and tokens, cost, and calls cover the tasks on which every context (cold included) recorded tokens and reward. Warm executions exclude the compile cost because a one-trace capsule is compiled after its request is served. We report this cost separately and amortize it over reuses in Section § 7.6. Because a few long tasks can dominate totals, we also count the tasks on which one context is better or worse, taking each task’s three-run mean.

Main Results

In Table 2, warm execution uses 80.9 ± 3.6% fewer tokens in total than cold execution with Sonnet 4.6 and 74.3 ± 6.3% fewer with Opus 4.8. Appendix § 12.§ 4 shows that warm execution reduces every token component, including output tokens by 85% and 80%. In each run, it uses fewer tokens on 84, 86, and 85 of 87 tasks with Sonnet and on 85, 86 and 86 with Opus. It also reduces cost by 82% and 75% and latency by 72% and 69%, and mean reward stays within run-to-run noise with both models (Appendix § 12.§ 6). Token savings hold in every task type and vary most across runs in cybersecurity and finance, where a few long tasks dominate (Appendix § 12.§ 5).

(a) Tokens per task (thousands)
Task typeSonnet 4.6 ColdSonnet 4.6 WarmOpus 4.8 ColdOpus 4.8 Warm
Overall1313247 (−80.9±3.6%)1063273 (−74.3±6.3%)
Cybersecurity2020579 (−68.9±35.4%)1264526 (−58.1±17.0%)
Finance/econ.2382651 (−64.4±28.4%)1402326 (−76.2±14.9%)
Industrial/phys.1141103 (−91.0±0.9%)977203 (−79.0±4.4%)
Math/formal1165135 (−88.2±2.4%)1589186 (−88.3±1.5%)
Media559101 (−82.0±9.5%)506136 (−72.6±6.3%)
Natural sci.595104 (−82.6±4.1%)466140 (−70.1±3.2%)
Office833182 (−77.2±9.9%)846313 (−63.1±8.6%)
Software eng.1909283 (−84.7±3.7%)1482358 (−75.8±2.5%)
(b) Cost per task ($) | | | |
Task typeSonnet 4.6 ColdSonnet 4.6 WarmOpus 4.8 ColdOpus 4.8 Warm
Overall0.900.17 (−81.6±1.0%)1.210.30 (−75.1±5.5%)
Cybersecurity1.240.40 (−67.8±34.6%)1.230.57 (−53.7±22.0%)
Finance/econ.1.620.41 (−71.1±22.0%)1.940.34 (−82.3±8.9%)
Industrial/phys.1.020.07 (−93.1±1.0%)1.350.32 (−75.9±3.1%)
Math/formal1.080.12 (−88.2±2.3%)1.740.23 (−87.0±2.9%)
Media0.260.05 (−79.6±10.2%)0.450.13 (−70.4±6.2%)
Natural sci.0.420.06 (−85.2±4.8%)0.520.13 (−74.2±1.6%)
Office0.630.13 (−79.3±6.0%)0.850.33 (−60.6±5.4%)
Software eng.1.020.19 (−81.3±0.9%)1.540.35 (−77.6±2.1%)
(c) Latency per task (s)
Task typeSonnet 4.6 ColdSonnet 4.6 WarmOpus 4.8 ColdOpus 4.8 Warm
Overall372103 (−72.1±2.4%)373113 (−69.2±7.2%)
Cybersecurity387165 (−57.3±13.1%)278178 (−35.3±11.2%)
Finance/econ.468125 (−70.5±20.9%)46675 (−80.3±14.8%)
Industrial/phys.45260 (−86.3±2.9%)439123 (−72.0±1.5%)
Math/formal636216 (−64.1±16.1%)843198 (−73.3±19.5%)
Media8436 (−57.2±13.5%)12960 (−50.4±18.8%)
Natural sci.343132 (−57.8±14.7%)271128 (−53.0±5.5%)
Office25855 (−74.7±12.4%)18670 (−62.3±4.9%)
Software eng.32086 (−73.8±8.0%)41697 (−76.6±2.7%)
(d) Reward
Task typeSonnet 4.6 ColdSonnet 4.6 WarmOpus 4.8 ColdOpus 4.8 Warm
Overall0.5380.546 (+0.8±2.7 pp)0.6920.690 (−0.2±1.1 pp)
Cybersecurity0.5310.603 (+7.1±18.6 pp)0.6340.610 (−2.4±2.4 pp)
Finance/econ.0.2220.185 (−3.7±6.4 pp)0.4440.444 (+0.0±0.0 pp)
Industrial/phys.0.4920.492 (+0.0±0.0 pp)0.6690.669 (+0.0±7.1 pp)
Math/formal0.4810.510 (+2.9±5.1 pp)0.6500.650 (+0.0±0.0 pp)
Media0.6670.667 (+0.0±0.0 pp)0.7330.733 (+0.0±0.0 pp)
Natural sci.0.8080.808 (+0.0±0.0 pp)0.9050.905 (+0.0±0.0 pp)
Office0.5710.619 (+4.8±4.1 pp)0.7380.738 (+0.0±0.0 pp)
Software eng.0.4800.459 (−2.1±3.6 pp)0.6570.657 (+0.0±0.0 pp)

Table 2. Cold execution against SkillCache on 87 SkillsBench tasks, by task type. Panels (a) to (c) give the mean per task and the percent change in the total from cold to warm, and panel (d) gives mean reward and its change in percentage points. Each cell is the mean over three runs, and each change gives its standard deviation across runs.

Comparison with Reuse Baselines

SkillCache saves more than both reuse baselines (Table 3), so its savings come from more than reusing the cold execution.

ContextSonnet 4.6 TokensSonnet 4.6 CostSonnet 4.6 RewardOpus 4.8 TokensOpus 4.8 CostOpus 4.8 Reward
Totals
Raw trace52.638.480.54147.454.750.700
Procedure37.627.820.54144.247.410.685
Ours21.514.410.54623.726.160.690
Ours better/worse, task by task
vs raw trace77/10*78/9*5/375/12*78/9*0/4
vs procedure82/5*82/5*5/482/5*79/8*3/4

Table 3. SkillCache (Ours) against the other warm contexts on 87 tasks. Upper rows give three-run means of total tokens (millions), total cost (dollars), and mean reward, and lower rows count the tasks on which Ours is better/worse. A star marks p<0.005p < 0.005 in a two-sided sign test.

The raw trace, the written procedure, and SkillCache use 54%, 67%, and 81% fewer tokens than the cold execution with Sonnet and 49%, 52%, and 74% fewer with Opus, and SkillCache uses the fewest in every run (Appendix § 12.§ 6). Table 12 also provides model calls, latency, and exact pp values. None of these three contexts changes mean reward by more than 0.01 from the cold execution, which is within run-to-run noise. § 7.7 further shows that SkillCache’s savings come from both the capsule representation and the executor-driven design.

Table 12. SkillCache against every other warm context, task by task. Each cell counts the 87 tasks on which SkillCache is lower/equal/higher, on each task’s mean over the three runs, and for reward higher/equal/lower, with the two-sided sign test pp value in parentheses.

ModelSkillCache vsTokensCostModel callsLatencyReward
Sonnet 4.6Raw trace77/0/10 (6×10−14)77/0/10\ (6 \times10^{-14})78/0/9 (7×10−15)78/0/9\ (7 \times10^{-15})65/4/18 (2×10−7)65/4/18\ (2 \times10^{-7})63/0/24 (3×10−5)63/0/24\ (3 \times10^{-5})5/79/3 (0.73)5/79/3\ (0.73)
Written procedure82/0/5 (5×10−19)82/0/5\ (5 \times10^{-19})82/0/5 (5×10−19)82/0/5\ (5 \times10^{-19})82/1/4 (6×10−20)82/1/4\ (6 \times10^{-20})79/0/8 (8×10−16)79/0/8\ (8 \times10^{-16})5/78/4 (1.00)5/78/4\ (1.00)
Agent-driven78/0/9 (7×10−15)78/0/9\ (7 \times10^{-15})78/0/9 (7×10−15)78/0/9\ (7 \times10^{-15})77/3/7 (5×10−16)77/3/7\ (5 \times10^{-16})73/0/14 (9×10−11)73/0/14\ (9 \times10^{-11})4/79/4 (1.00)4/79/4\ (1.00)
Opus 4.8Raw trace75/0/12 (3×10−12)75/0/12\ (3 \times10^{-12})78/0/9 (7×10−15)78/0/9\ (7 \times10^{-15})58/3/26 (6×10−4)58/3/26\ (6 \times10^{-4})57/0/30 (5×10−3)57/0/30\ (5 \times10^{-3})0/83/4 (0.12)0/83/4\ (0.12)
Written procedure82/0/5 (5×10−19)82/0/5\ (5 \times10^{-19})79/0/8 (8×10−16)79/0/8\ (8 \times10^{-16})79/2/6 (2×10−17)79/2/6\ (2 \times10^{-17})76/0/11 (4×10−13)76/0/11\ (4 \times10^{-13})3/80/4 (1.00)3/80/4\ (1.00)
Agent-driven70/3/14 (4×10−10)70/3/14\ (4 \times10^{-10})67/3/17 (3×10−8)67/3/17\ (3 \times10^{-8})70/6/11 (1×10−11)70/6/11\ (1 \times10^{-11})56/3/28 (3×10−3)56/3/28\ (3 \times10^{-3})3/84/0 (0.25)3/84/0\ (0.25)

Table 12.

Cross-Model Transfer

Setup. If capsules transfer across models, a strong model can compile once and an open-weight model can serve recurring requests. To test this, we run DeepSeek-V4-Flash and DeepSeek-V4-Pro [11], and Kimi-K3 [24], with the skills alone and with the unchanged capsules of each Opus run. DeepSeek-V4-Flash runs at low and medium effort, DeepSeek-V4-Pro at medium, and Kimi-K3 at high.

Results. Figure 5 shows that Opus capsules raise the mean reward of every model by 0.16 to 0.25, bringing it close to Opus’s own reward of 0.690 with the same capsules, while using 72 to 81% fewer tokens than the skills alone. DeepSeek-V4-Flash shows similar gains at both effort levels, and the token and reward changes are both significant for every model, with p<0.005p < 0.005 in a task-by-task sign test. Appendix § 12.§ 7 gives each model’s numbers. We also run DeepSeek-V4-Flash at low effort with the Sonnet capsules and find a similar gain, with mean reward rising from 0.437 to 0.553, against 0.546 for Sonnet, and 81% fewer tokens.

Figure 5. Cross-model transfer of Opus capsules on 87 tasks. Bars give three-run means with standard deviations, and the dotted line marks Opus’s own reward.

Cross-Query Transfer

Setup. Because SkillsBench gives each task a single request, we additionally build three kinds of probes, each changing one thing in a source task, to test whether a capsule still works when a recurring request changes. An instance probe changes the input content or a parameter the request states, a rename probe changes the paths of files the request names,

and a reword probe rewrites one to three sentences of the request. A probe is kept only if, in its task’s container, its reference solution passes its verifier and, for an instance probe, the source task’s reference answer fails. We build 23 instance, 19 rename, and 24 reword probes for 24 of the 44 tasks whose cold execution succeeded in the first Sonnet run, all of which also succeeded with Opus (Appendix § 12.§ 9). We start from successful cold executions to test whether the resulting capsules can carry a successful execution path over to a changed request.

Results. Capsules stay effective when the request changes and keep their token savings (Table 4). Averaged over three runs, tokens decrease by 70 to 87% for every probe type with both models, and mean reward changes by +0.01 to +0.15. On instance probes, where the original answer would fail, tokens decrease by 82% with Sonnet and 72% with Opus while reward stays comparable. With DeepSeek-V4-Flash running the same Opus capsules, tokens decrease by 71% and mean reward rises from 0.54 to 0.92 across all probes (Appendix § 12.§ 9). One failure case comes from three Sonnet capsules that hard-code request-dependent values, causing wrong answers on the corresponding instance probes. This highlights the need for generated programs to use request-dependent values through bindings.

ProbeTokens per probeMean reward
Sonnet 4.6
Overall658k117k (−82±2%)0.810.89 (+0.08±0.04)
Instance660k117k (−82±2%)0.810.83 (+0.01±0.05)
Rename649k162k (−74±8%)0.810.88 (+0.07±0.03)
Reword663k83k (−87±1%)0.810.96 (+0.15±0.13)
Opus 4.8
Overall688k190k (−72±1%)0.910.97 (+0.06±0.03)
Instance782k219k (−72±4%)0.880.93 (+0.05±0.05)
Rename575k170k (−70±3%)0.951.00 (+0.05±0.05)
Reword688k178k (−74±2%)0.921.00 (+0.08±0.04)

Table 4. Cross-query transfer to new requests. Each probe changes one thing in a source task and runs with the skills alone and with the source task’s capsule. Cells are three-run means, and each change gives its standard deviation across runs.

Analysis

Model calls and savings by capsule type. Table 5 shows that savings follow model calls, since every call reads the context again. In turn, the more of the plan programs cover, the fewer calls the model makes. When every step is a program, the model makes about three calls per task. Natural-language steps and textual capsules leave more of the work to the model, so they save less.

Capsule typeSonnet 4.6 Model calls ColdSonnet 4.6 Model calls WarmSonnet 4.6 Tokens savedOpus 4.8 Model calls ColdOpus 4.8 Model calls WarmOpus 4.8 Tokens saved
All tasks23.65.681%20.96.774%
Hybrid
Programs only18.83.089%17.23.487%
Natural-language steps31.68.678%25.110.167%
Textual41.920.956%22.612.048%

Table 5. Model calls and token savings by capsule type, pooled over the three runs, which hold 178, 65, and 18 task runs of the three kinds with Sonnet and 134, 113, and 14 with Opus.

Amortization. Compiling all 87 tasks costs $67 with Sonnet and $116 with Opus, counting every attempt, repair, and textual fallback. One reuse saves $64 and $79, so compilation is repaid after 1.1 reuses with Sonnet and 1.5 with Opus in aggregate, and after a median of 1.3 and 2.2 reuses per task. In tokens, compilation and the first warm execution together use 45% fewer than the cold execution with Sonnet and 16% fewer with Opus, so in aggregate one reuse already covers the compilation cost. On average across runs, one reuse covers it on 67 of 87 tasks with Sonnet and 39 with Opus.

Ablation Study

Plan executor. Table 6 compares the executor-driven design with the agent-driven one on the same capsules. The executor-driven design uses 26% and 21% fewer tokens than the agent-driven one with Sonnet and Opus, and fewer in each run (Appendix § 12.§ 6). It also needs fewer model calls on 77 and 70 of 87 tasks (Appendix § 12.§ 7), with no significant reward difference. Notably, even when all three are agent-driven, the capsule alone uses 44% and 22% fewer tokens than the raw trace and the written procedure baselines with Sonnet and 38% and 32% fewer with Opus. We attribute the savings to the model seeing each program through its interface, which keeps the code out of its context until needed, and to program steps that usually take a single call. Thus, both the capsule representation and the executor-driven design contribute to the savings.

ContextSonnet 4.6 TokensSonnet 4.6 CostSonnet 4.6 RewardOpus 4.8 TokensOpus 4.8 CostOpus 4.8 Reward
Totals
Agent-driven29.017.400.54429.730.050.678
Executor-driven21.514.410.54623.726.160.690
Executor-driven better/worse, task by task
vs agent-driven78/9*78/9*4/470/14*67/17*3/0

Table 6. Executor-driven against agent-driven execution of the same capsules on 87 tasks. Tokens are in millions and cost in dollars. A star marks p<0.005p < 0.005 in a two-sided sign test.

Replay. Table 7 shows the effect of replay during qualification. To isolate it, we rerun each task where replay changed the published capsule in its run, this time with the first candidate that passed the first two gates (65 task runs with Sonnet and 79 with Opus, pooled over the three runs). Against that candidate, the published capsule uses 59 ± 28% fewer tokens with Sonnet and 36 ± 7% fewer with Opus, averaged over the three runs, fewer in every run (Appendix § 12.§ 6), and fewer on 56 of 65 and 66 of 79 task runs. Mean reward is 0.406 against 0.368 with Sonnet and 0.625 against 0.597 with Opus. Neither paired sign test is significant.

ContextSonnet 4.6 (n=65n = 65) TokensSonnet 4.6 (n=65n = 65) CostSonnet 4.6 (n=65n = 65) RewardOpus 4.8 (n=79n = 79) TokensOpus 4.8 (n=79n = 79) CostOpus 4.8 (n=79n = 79) Reward
Totals
No replay80.448.230.36848.752.200.597
Replay28.219.730.40631.835.100.625
Replay better/worse, per task run
vs no replay56/9*53/12*5/366/13*67/12*3/0

Table 7. Replay against no replay, pooled over the three runs, on the task runs where replay changed the published capsule. No replay reuses the first candidate that passed the first two gates. Tokens are in millions and cost in dollars. A star marks p<0.005p < 0.005 in a two-sided sign test.

Zero-shot with the executor. § 3.2 runs zero-shot capsules agent-driven. To test whether the executor alone closes their gap to one-trace capsules, we also run them with the plan executor and find that the gap remains (Figure 6). Per reuse, executor-driven zero-shot capsules use fewer tokens than the skills alone on 59 of 84 tasks, against 84 of 87 for first-run one-trace capsules. With the compile call, they use fewer on 30 of 84 tasks, against 67 of 87 for one-trace capsules.

Figure 6. Zero-shot and first-run one-trace capsules with Sonnet 4.6, each executed agent-driven and executor-driven. Ratios are to the skills alone for zero-shot and to the cold execution for one-trace, and the right panel adds the compile call.

Limitations and Future Work

In our study, all experiments use SkillsBench and the Claude Code harness. We see broader potential in the idea of compiling a completed execution into programs that an executor drives on later requests. It could also benefit recurring agent tasks without skills or in other harnesses. Extending SkillCache to these settings is one direction for future work.

SkillCache also incurs a one-time compilation cost and is most useful when later requests amortize it (§ 7.6). In addition, each capsule is compiled from one cold execution and may carry useful patterns alongside brittle assumptions, errors, or biases. Replay in qualification also runs the programs only with the original request’s values and inputs, so a capsule that hard-codes one of those values can still pass, as the instance probes in § 7.5 show. Future work could let a capsule learn from its warm executions and improve with use, much as a tracing JIT compiles paths it discovers later ([17]).

Finally, as SkillsBench supplies each task’s skills, our evaluation supplies each task’s capsule and does not test retrieval. Production use would require reliable retrieval and selection as the cache grows, along with execution safeguards and cache invalidation when a skill or its environment changes. Integrating these lifecycle and security mechanisms in persistent deployments is another direction for future work.

Related Work

Skill evolution and source-level compilation. Skill-evolution methods construct or refine skills using rewarded trajectories ([49, 52] (Mi et al. 2026)), held-out rollouts ([53, 43]), or other execution feedback ([57, 62, 56] (Ni et al. 2026)). A separate line of work compresses skill content ([18]) or translates skill packages into typed representations ([37]), runtime interfaces ((Xu et al., 2026)), and executable harnesses ([10]). SkillCache complements both by preserving the supplied skill and separately storing a specialization compiled from one completed skill-guided invocation.

Execution-grounded specialization. Existing systems learn code routines, executable skills, or workflows from interactions, demonstrations, and traces ([44, 46, 60, 9, 45, 12, 20, 42]). SkVM ([7]) compiles skills for different model-harness targets and promotes code patterns after repeated signature matches across invocations. TraceCompiler ([13]) compiles clusters of agent traces into mostly deterministic workflows. SkillTracer ([26]) localizes failures within skill plan graphs and repairs the affected structure. When external evaluation is available, PreAct ([26]) compiles one successful GUI trace into a gated state machine, and SkillDroid ([8]) compiles such a trace into an action template replayed without per-step model calls. Other work likewise validates artifacts with verifier feedback ([40]) or deterministic checks (Lu et al., 2026). SkillCache instead specializes one completed skill-guided invocation without benchmark reward or verifier access and retains the source skill for recovery.

Planning, program compilation, and harness optimization. ReWOO (Xu et al., 2023) and Plan-and-Act ([14]) separate planning from execution, LLM-Compiler ([23]) parallelizes function calls while respecting task dependencies, and Agent JIT Compilation ([48]) turns web-task descriptions into cost-ranked code plans before execution. DSPy ([21]) compiles LM programs, Meta-Harness ([25]) searches over harness code, and SoL-Pi ([29]) searches for token-reducing harness mechanisms, among them fusing a file edit and its follow-up command into one tool call. SkillCache instead specializes a supplied skill from one completed invocation into a capsule whose programs take whole runs of deterministic tool calls away from the model. Unlike LLM-as-Code (Qi et al., 2026), where a program also owns control flow and calls the model only for reasoning, our executor drives the capsule inside an unchanged agent harness.

Procedural reuse and inference caching. Prior systems reuse model-readable insights, workflows, or procedural memories ([59, 47, 36, 15]), cache plan templates and transitions ([58, 22]), build reusable tools ([5]), or synthesize executable response generators ([6]). At the inference layer, Prompt Cache ([19]) reuses attention states across prompts, while Don’t Break the Cache ([31]) evaluates exact-prefix prompt caching for agentic workloads. SkillCache instead caches programs and natural-language steps derived from a skill-guided trace.

Conclusion

We study how repeated skill orchestration can be compiled into reusable execution. Compiling from the skill and request alone does not reliably reduce tokens, so SkillCache grounds each capsule in one completed execution, replays it before reuse, and drives it with a plan executor, keeping the source skill for recovery. Warm executions use 81% and 74% fewer tokens with Sonnet and Opus at comparable reward, and capsules stay effective under controlled request changes and transfer across models.

AI USAGE DISCLOSURE

We used LLM-based coding assistants, Anthropic Claude Code and OpenAI Codex, in this work. The authors conceived the research question and designed the method and the experiments, and discussed with the assistants how to refine them. The authors searched for and read the related literature, and used the assistants to make the search more complete and to summarize papers. The assistants supported method implementation (writing and refactoring code under the authors’ direction), experiment execution (automating and monitoring runs), result analysis (writing scripts that aggregate results, build tables, and plot figures, and examining the results), and the generation of the cross-query probes from SkillsBench tasks. For the manuscript, the authors discussed the wording with the assistants, and the assistants helped with editing, polishing, LaTeX formatting, and drawing the method diagrams. The language models evaluated in § 7 serve as the SkillCache compiler and task executors and are the object of study. All reported numbers come from benchmark executions scored by the tasks’ verifiers. The authors reviewed and verified AI-assisted work and take full responsibility for this paper.

Experimental Details and Additional Results

Experimental Details

Every execution uses a fresh sandbox and a one-hour timeout, with at most 15 tasks in parallel, or 12 in zero-shot specialization and cross-model transfer. Matched conditions use the same provider defaults for temperature and top_p. Within a task, executions run one after another. The cold execution, and the direct execution of the zero-shot study, run first, and the order of the others rotates across tasks so that none always runs first. An attempt runs again when the harness fails before the agent starts or when the agent produces no output for ten minutes, and executions that could not run as planned run again in a later invocation. In both cases the last finished attempt counts, regardless of reward. The first run of each model reuses cold executions recorded earlier under the same execution protocol, which serve as both its cold baseline and the input its compiler reads. The raw trace baseline receives the observable trajectory the compiler reads, as JSON, with each image’s encoded bytes replaced by a note, so that the baseline is not charged for base64 text that the cold model saw as an image.

In cross-model transfer and the cross-query probes, token comparisons exclude task-run pairs with missing or incomplete usage records, including seven cross-model pairs with partially recorded provider usage. Rewards cover every task and probe. Because parallel execution introduces contention, we treat latency as system-descriptive. Latency additionally excludes tasks if any compared execution ends in an error or lacks timing records. Cost uses the published list prices per million tokens, $3 for input and $15 for output with Sonnet 4.6 and 5and5 and25 with Opus 4.8, with cache reads at 0.1 times and five-minute cache writes at 1.25 times the input price. We access all models through hosted APIs.

For environment compatibility, we patch three task images in every run. Two seismic images pin setuptools<81 to preserve the pkg_resources interface required by their dependencies, and the civ6-adjacency-optimizer image makes its output directory writable by the unprivileged agent user. The same images are used across matched conditions, with no change to requests, skills, fixtures, evaluators, or scoring. For the later cross-model runs, the multilingual-video-dubbing image also pins four packages to their previous releases, because new releases broke its build.

Zero-Shot Specialization

This study runs once, with medium effort for direct execution, compilation, and capsule execution. The compiler is the main study’s compiler with Sonnet 4.6 and an empty trace. Its user message adds that no execution has happened yet, that it should use only the request and the source skills without inspecting the task workspace, and that it should package as programs only the deterministic operations those specifications justify, leaving decisions that need a runtime observation as natural-language steps. Its candidates go through the same syntax and build checks in a sandbox without task data, but not replay, since no execution supplies observed values. After three failed attempts it falls back to the textual form, which happened on 2 of the 87 tasks. Each capsule then runs agent-driven (Section 3) and executor-driven (Section 7.7). We read each agent-driven trajectory to record whether a compiled program failed observably, through an exception, a missing dependency, a timeout, or a bug in the program, and whether a program returned a wrong answer without an error and that answer reached the final output. A program does not count as failed when its non-zero exit came from an input the model supplied, from a check that correctly reported the model’s own code, or from stray lines on standard output beside correct results.

Table 8 gives the per-task token ratios, total-token changes, and sign test pp values of Section 3.2. Each ratio is a geometric mean over tasks with a 95% interval from 10,000 task-bootstrap resamples. One task holds 18% of the direct tokens and alone turns an 11% increase in total tokens, compile call included, into a 5% decrease. Counting execution alone, zero-shot still uses more tokens than direct execution on 30 of the 84 tasks, where persisting the capsule never repays compilation.

Table 8. Zero-shot specialization against direct execution on 84 tasks (Sonnet 4.6). Each cell gives the per-task token ratio, the change in total tokens, and the two-sided sign test pp value of the task counts. The first three rows are agent-driven (§ 3), and the last is executor-driven (§ 7.7). The No failure and Failure rows split the tasks by whether a compiled program failed observably. For agent-driven execution, mean reward decreases from 0.517 to 0.459, and reward rises on 10 tasks and decreases on 12 (p=0.83p = 0.83).

TasksRatioTotalppRatioTotalpp
Compile + executionExecution only
All1.24 [1.06, 1.46]−5%<0.0010.71 [0.58, 0.85]−25%0.01
No failure1.19 [0.96, 1.46]+3%0.020.60 [0.46, 0.77]−18%0.003
Failure1.34 [1.03, 1.71]−15%0.020.92 [0.71, 1.17]−33%0.86
Executor-driven1.14 [0.99, 1.31]−10%0.010.60 [0.50, 0.71]−30%<0.001

Sandboxes per Phase

Every phase runs in its own fresh sandbox (Table 9). No phase sees the benchmark’s tests, reference solutions (its oracle), verifier, or rewards. Every phase runs as the unprivileged agent user, and those files are restricted to root. A verifier is uploaded only after a cold or warm execution has finished, for scoring, so it never guides compilation or triggers recovery. The trace the compiler reads excludes provider reasoning and redacts credentials. Programs run in the agent’s starting directory and read the source skills’ files from a fixed read-only path. Environment variables named like keys, tokens, or passwords are removed from their environment.

Token Components

Table 10 decomposes the tokens of Table 2 by provider component. Cache reads make up about 95% of the cold tokens with both models. SkillCache reduces every component, including output tokens by 85% and 80%, so its savings do not come only from cache reads.

Table 10. Cold and warm tokens by provider component, as in Table 2, in millions and averaged over the three runs. Reduction is the mean of each run’s reduction, with its standard deviation across runs. Cache reads and writes are parts of the input, and the rest of the input, under 0.01% of it, is uncached.

ModelComponentColdWarmReduction
Sonnet 4.6Total114.2121.4781±4%
Input112.1521.1681±4%
Output2.060.3185±1%
Cache read108.1120.1781±4%
Cache write4.030.9876±3%
Opus 4.8Total92.4823.7174±6%
Input90.7423.3774±6%
Output1.740.3480±4%
Cache read87.9522.3475±6%
Cache write2.781.0363±7%

Table 9. What each phase receives. The compiler runs without the task’s input files and sees them only through the trace and the failures that replay reports. In replay, the host gives the examples EE as bindings in place of the model. *An agent-driven warm execution has no plan executor, and a textual capsule is given in the prompt with nothing mounted.

ReceivesColdCompileCheckReplayWarm
The model, with the agent’s tools✓✓✓✓
The request✓✓✓✓✓
The source skills✓✓✓✓
The task’s input files✓partly✓✓✓
The trace and the compile instruction✓
The runtime and the plan executor✓✓✓*
The capsule without EE, and its program sources✓✓
The examples EE✓

Savings by Task Type and Failure Cases

In Table 2, Sonnet’s tokens decrease by 77–91% in six task types and by 69% and 64% in cybersecurity and finance, the two types whose savings vary most between runs, with standard deviations of 35 and 28 points. A few long tasks drive this. In the first run, a cybersecurity task that sets up fuzzing for several Python libraries uses about as many tokens warm as cold and alone holds the type at a 28% reduction. With Opus, tokens decrease least in cybersecurity, by 58%, for the same reason. Reward is unchanged or higher in every type except finance and software engineering with Sonnet, where it decreases by at most 0.04, and cybersecurity with Opus, where it decreases by 0.02.

Warm execution uses more tokens than cold on one to three tasks per run, ten task runs in all, and no task does so in two runs with the same model. In eight of the ten, the cold execution already scored zero, so the capsule came from a failed execution and the warm execution failed as well. In the second Sonnet run, for example, shock-analysis-supply downloads economic data for Georgia and builds a production-function model in a workbook. Its capsule compiles all five steps into programs. In the warm execution, the first program cannot open the file it downloads as a workbook and the second parses no values, so the executor hands both steps back to the model, which finds the data with ordinary tools. The verification program then finds a depreciation rate outside its expected range and hands that step back as well, and the model corrects the workbook. The warm execution makes 104 model calls against 53 cold and uses 4.3M tokens against 3.8M, and its reward stays zero.

Such hand-backs are rare. Over the three runs, 481 warm executions of hybrid capsules keep every executor report in their trajectories, and the executor hands at least one failed step back to the model in 5 of the 239 with Sonnet and 6 of the 242 with Opus. In 9 of these 11, the cold execution already scored zero. In 9 further executions, at least one executor report is missing from the trajectory, and 2 of these also show a hand-back.

Repeated Runs

Table 11 gives each repeated run of the whole pipeline, and Table 13 gives each warm context’s change in mean reward against cold, with each task’s change averaged over the three runs. Every 95% interval includes zero, although three Opus values have zero as an endpoint. SkillCache changes mean reward by +0.008+0.008 with Sonnet and by −0.002-0.002 with Opus.

Table 11. Repeated runs of the whole pipeline, each from its own cold executions. Each warm context saves the given share of cold’s total tokens, from the totals that Table 3 and Table 6 average, and reward gives cold→executor-driven capsule. Replay saving is the share of tokens that the published capsule saves against the first candidate that passed the first two gates, on that run’s task runs of Table 7. The last row of each model gives the mean over runs and the standard deviation across them.

ModelRunRaw traceProcedureCapsule (agent-driven)Capsule (executor-driven)Replay savingReward
Sonnet 4.6160%73%77%83%28%0.549→0.5700.549 \to0.570
250%63%76%83%68%0.565→0.5420.565 \to0.542
351%64%69%77%82%0.499→0.5260.499 \to0.526
Mean54±5%54 \pm5\%67±5%67 \pm5\%74±4%74 \pm4\%81±4%81 \pm4\%59±28%59 \pm28\%0.538→0.5460.538 \to0.546
Opus 4.8146%54%63%67%30%0.673→0.6590.673 \to0.659
251%45%71%79%43%0.712→0.7120.712 \to0.712
349%57%70%77%35%0.690→0.6980.690 \to0.698
Mean49±3%49 \pm3\%52±6%52 \pm6\%68±4%68 \pm4\%74±6%74 \pm6\%36±7%36 \pm7\%0.692→0.6900.692 \to0.690

Table 11.

Table 13. Change in mean reward against cold on all 87 tasks. Each task’s change is averaged over the three runs, and brackets give the 95% task-bootstrap interval.

ContextSonnet 4.6Opus 4.8
Cold reward0.5380.692
Change against cold
Raw trace+0.003+0.003 [−0.002-0.002, +0.011+0.011]+0.008+0.008 [0.0000.000, +0.020+0.020]
Written procedure+0.003+0.003 [−0.013-0.013, +0.021+0.021]−0.007-0.007 [−0.030-0.030, +0.013+0.013]
Agent-driven+0.006+0.006 [−0.016-0.016, +0.030+0.030]−0.014-0.014 [−0.034-0.034, 0.0000.000]
SkillCache+0.008+0.008 [−0.011-0.011, +0.030+0.030]−0.002-0.002 [−0.006-0.006, 0.0000.000]

Table 13.

Task-by-Task Comparisons

Table 12 counts every measure task by task for Table 3, and Table 14 gives each model’s tokens and reward in cross-model transfer, with the same counts task by task.

Model (effort)CapsulesTokens per taskMean rewardTokensReward
DeepSeek-V4-Flash (low)Opus 4.81,590k → 317k0.421 → 0.64977/0/4 (1×10−1810^{-18})42/34/11 (2×10−510^{-5})
DeepSeek-V4-Flash (medium)Opus 4.82,489k → 466k0.384 → 0.63377/0/1 (5×10−2210^{-22})46/30/11 (3×10−610^{-6})
DeepSeek-V4-Pro (medium)Opus 4.81,757k → 489k0.448 → 0.66263/0/3 (1×10−1510^{-15})41/39/7 (6×10−710^{-7})
Kimi-K3 (high)Opus 4.81,150k → 220k0.518 → 0.67872/0/1 (2×10−2010^{-20})39/37/11 (9×10−510^{-5})
DeepSeek-V4-Flash (low)Sonnet 4.61,769k → 335k0.437 → 0.55377/0/3 (1×10−1910^{-19})36/38/13 (1×10−310^{-3})

Table 14. Cross-model transfer, capsule against the skills alone. Tokens per task and mean reward are three-run means as in Figure 5. The counts compare each task’s mean over the three runs. Tokens count fewer/equal/more on tasks with complete token records for both contexts in all three runs, reward counts higher/equal/lower on all 87 tasks, and the two-sided sign test’s pp is in parentheses.

Capsule Structure

Table 15 describes the 261 capsules that each model publishes over the three runs, of which 243 with Sonnet and 247 with Opus are hybrid. A hybrid capsule holds on average 2.8 programs and 3.4 steps with Sonnet, and 2.6 programs and 3.7 steps with Opus. Of these steps, 89% with Sonnet and 74% with Opus call a program, and the model performs the rest as natural-language steps. Opus keeps natural-language steps in 113 capsules and Sonnet in 65, and this capsule type saves fewer tokens with both models (Table 5).

Capsule typeSonnet 4.6Opus 4.8
Programs only178134
Natural-language steps65113
Textual1814
Per hybrid capsule
Programs2.82.6
Steps3.43.7
Natural-language steps0.41.0
Bindings3.95.8
Steps that call a program89%74%

Table 15. Published capsules over the three runs, 261 per model, by the capsule types of Table 5. Programs, steps, natural-language steps, and bindings are means over the hybrid capsules. Steps include those of π\pi and VV, and the last row gives the share of these steps that call a program.

Cross-Query Probes

The main evaluation reuses each capsule on the task it was compiled from. The cross-query probes of § 7.5 reuse each capsule on new requests of its task. Each probe is its source SkillsBench task with one change, applied as a patch to the task’s request and environment. A rerword probe keeps the input files and every quoted span, path, number, and identifier of the request.

Task selection. We built the probes for 24 of the 44 tasks whose cold execution succeeded in the first Sonnet run, after a pilot of an earlier probe design. Of the other 20 tasks, 18 have an instance that did not qualify, mostly because its answer needed no new computation or the verifier could not tell a reused answer from a new one. The other 2 would need a hand-made fix or a calibration tuned in trial runs, and were not built. Apart from requiring a successful cold execution, no selection rule uses model results, and every reason for excluding a task concerns its data, verifier, or reference solution. A task has no rename probe when its request names no file or when its skill hard-codes the file names, since every context receives the same unchanged skill. This leaves 20 rename probes for 24 tasks.

Checks. Every probe is checked in its task’s container before any model run. Its reference solution passes its verifier, and for an instance probe the source task’s reference answer fails that verifier, so the old answer cannot pass. Two probes that pass the applicable checks are removed from every run. The lake-warming-attribution instance has an expected answer that holds only under the reference solution’s choice of variables, and the crystallographic-wyckoff-position-analysis rename needs no path rebound, since its verifier passes the renamed file to the requested function. The runs use 23 instance, 19 rename, and 24 reword probes.

Same request. On the same 24 tasks, the first run’s warm executions use 87% fewer tokens than their cold executions

with Sonnet and 73% fewer with Opus. Over all probe types and the three runs, the probes save 82% and 72% against a fresh skills-only execution of each probe.

Another execution model. We run the same probes three times with DeepSeek-V4-Flash at low effort, with the skills alone and with the first Opus run’s capsules (Table 16). Over all probe types, tokens decrease by 71% and mean reward rises from 0.54 to 0.92, against 0.97 for Opus with the same capsules (Table 4). On instance probes, reward rises from 0.60 to 0.87.

ProbeTokens per probeMean reward
Skill onlyWith capsuleSkill onlyWith capsule
DeepSeek-V4-Flash with Opus 4.8 capsules
Overall698k203k (−71±2%)0.540.92 (+0.38±0.00)
Instance700k250k (−64±8%)0.600.87 (+0.27±0.01)
Rename694k170k (−75±3%)0.460.95 (+0.49±0.06)
Reword702k185k (−74±11%)0.560.96 (+0.39±0.04)

Table 16. Cross-query probes with DeepSeek-V4-Flash at low effort, with the skills alone and with the first Opus run’s capsules. Cells are three-run means, and each change gives its standard deviation across runs.

Prompts and Example Capsules

The compiler receives a short user message and a mounted skill that holds its instruction. Both are the same for every task. Figure 7 and Figure 8 give them for the hybrid form and Figure 9 for the textual form. The bracketed headings mark the user message and the mounted skill. A repair sends the same message with the failure appended and mounts the previous answer for the compiler to correct (§ 5.3).

Compiler prompt for the hybrid form (part 1 of 2)

Figure 7. Compiler prompt for the hybrid form (part 1 of 2).

Compiler prompt for the hybrid form (part 2 of 2)

Figure 8. Compiler prompt for the hybrid form (part 2 of 2).

Compiler prompt for the textual form

Figure 9. Compiler prompt for the textual form.

Every cold and warm execution receives the same prompt, shown in Figure 10, and the contexts differ only in its cached invocation. A cold execution gets None, the raw trace baseline gets the trace, and the written procedure baseline gets the procedure. A hybrid capsule fills one of the two templates in the figure. The executor-driven template gives the bindings needed before the first hand-over and the run protocol, and the agent-driven template gives each step with the interface of its program. Neither includes the program sources. A textual capsule is shown as written in both. Braces mark what each capsule fills in, and bracketed lines are not part of the prompt.

Execution prompt with executor-driven and agent-driven templates of a cached invocation for a hybrid capsule

Figure 10. Execution prompt, with the executor-driven and agent-driven templates of its cached invocation for a hybrid capsule.

We show two example capsules, each without its examples EE, which are removed at mount. Figure 11 shows the capsule that the warm execution of Figure 1 runs, and Figure 15 shows a capsule with several steps. Figure 12 to Figure 14 and 17 to 20 give the source of their programs.

JSON specification for the prefix-cache-replay skill

Figure 11. Ops 4.8 capsule for llm-prefix-cache-replay, run by the warm execution of Figure 1.

import json
import os
from collections import OrderedDict

with open(os.environ["SKILLCACHE_INPUT"]) as f:
    _in = json.load(f)
config_path = _in["config_path"]
trace_path = _in["trace_path"]
report_path = _in["report_path"]

with open(config_path) as f:
    cfg = json.load(f)

if cfg.get("policy") != "S3FIFO":
    raise SystemExit("config policy is %r, this capsule only implements S3FIFO" % cfg.get("policy"))

block_size = cfg["block_size"]
capacity = cfg["cache_capacity_blocks"]
small_ratio = cfg["s3fifo"]["small_ratio"]
max_freq = cfg["s3fifo"]["max_freq"]

small_cap = round(capacity * small_ratio)
main_cap = capacity - small_cap
ghost_cap = main_cap

# S and M: ordered dict hash -> freq (insertion order = FIFO; head is first)
S = OrderedDict()
M = OrderedDict()
# Ghost: FIFO of hashes, set for membership
G = OrderedDict()  # hash -> None

def clamp(v):
    return v if v < max_freq else max_freq

def insert_to_G(h):
    if h in G:
        del G[h]
    elif len(G) >= ghost_cap:
        G.popitem(last=False)
    G[h] = None

def admit_to_M(h, freq):
    while len(M) >= main_cap:
        victim, vf = next(iter(M.items()))
        if vf >= 1:
            del M[victim]
            M[victim] = vf - 1  # requeue at tail
            continue
        else:
            del M[victim]
            insert_to_G(victim)
            break
    M[h] = freq

def admit_to_S(h):
    while len(S) >= small_cap:
        victim, vf = next(iter(S.items()))
        del S[victim]
        if vf >= 1:
            admit_to_M(victim, vf)
        else:
            insert_to_G(victim)
    S[h] = 0

Figure 12. Program replay of the capsule in Figure 11 (part 1 of 2).

Program verify_report of the capsule in Figure 11
import json
import os

with open(os.environ["SKILLCACHE_INPUT"]) as f:
    _in = json.load(f)

with open(_in["config_path"]) as f:
    cfg = json.load(f)
capacity = cfg["cache_capacity_blocks"]

with open(_in["report_path"]) as f:
    rep = json.load(f)

errors = []
tpt = rep["total_prompt_tokens"]
tht = rep["total_hit_tokens"]
per = rep["per_request"]

expected_rate = (tht / tpt) if tpt else 0.0
if abs(rep["overall_hit_rate"] - expected_rate) > 1e-12:
    errors.append("overall_hit_rate %r != total_hit_tokens/total_prompt_tokens %r" % (rep["overall_hit_rate"],
        expected_rate))

if sum(r["hit_tokens"] for r in per) != tht:
    errors.append("sum(per_request hit_tokens) != total_hit_tokens")

if sum(r["prompt_tokens"] for r in per) != tpt:
    errors.append("sum(per_request prompt_tokens) != total_prompt_tokens")

if rep["final_cache_blocks"] > capacity:
    errors.append("final_cache_blocks %r > cache_capacity_blocks %r" % (rep["final_cache_blocks"], capacity))

if len(per) != rep["total_requests"]:
    errors.append("len(per_request) %r != total_requests %r" % (len(per), rep["total_requests"]))

if errors:
    raise SystemExit("report sanity checks failed: " + "; ".join(errors))
print(json.dumps({"status": "complete", "result": {"sanity_ok": True}}))

Figure 14. Program verify_report of the capsule in Figure 11.

Opus 4.8 capsule for exceltable-in-ppt (part 1 of 2)
{
  "form": "hybrid",
  "name": "update_embedded_xlsx_rate_in_pptx",
  "description": "Updates a single value in an Excel table embedded in a PowerPoint slide, where the slide also
    contains a text box stating one updated value, then writes a new .pptx with everything else unchanged.
    Specifically: given an input .pptx whose slide holds a text box with an ’updated rate’ for one row/column
    pair of a currency cross-rate matrix (rows = source currency, columns = target currency), it finds the single
    hardcoded matrix cell for that pair, overwrites it with the new value, leaves all formula cells as formulas
    (recalculating their cached values), and saves to an output .pptx. Applies only when the embedded workbook
    cell to change is a hardcoded number (not a formula). It does not create tables, change layout, or alter any
    other cell or slide content.",
  "bindings": {
    "input_pptx": "Path to the source .pptx file, from the request (e.g. the file to read and update).",
    "output_pptx": "Path to write the updated .pptx, from the request.",
    "unpacked_dir": "Workspace path where the pptx is unpacked; choose a fresh directory under the workspace.
    Produced/used by the unpack program and reused by later programs.",
    "embedded_xlsx_rel": "Output of unpack_and_inspect: relative path (within unpacked_dir) of the embedded Excel
    workbook under ppt/embeddings/.",
    "slide_texts": "Output of unpack_and_inspect: ordered list of text-run strings found in the slide(s), used to
    read the updated-rate text box.",
    "cells_dump": "Output of unpack_and_inspect: list of {sheet, coordinate, formula_or_value, cached_value} for
    every non-empty cell of the embedded workbook, used to locate the target cell.",
    "target_cell": "Decided by the ’locate target cell’ step: object {sheet, coordinate} naming the single
    hardcoded matrix cell for the updated currency pair.",
    "new_value": "Decided by the ’locate target cell’ step: the numeric value parsed from the updated-rate text
    box to write into target_cell."
  },
  "programs": {
    "unpack_and_inspect": {
      "command": ["python3", "{package}/run.py"],
      "check": ["python3", "-c", "import ast,sys; ast.parse(open(’{package}/run.py’).read())"],
      "inputs": ["input_pptx", "unpacked_dir"],
      "outputs": ["embedded_xlsx_rel", "slide_texts", "cells_dump"],
      "files": {
        "run.py": "<source shown in a later figure>"
      }
    },
    "apply_update_and_recalc": {
      "command": ["python3", "{package}/run.py"],
      "check": ["python3", "-c", "import ast,sys; ast.parse(open(’{package}/run.py’).read())"],
      "inputs": ["unpacked_dir", "embedded_xlsx_rel", "target_cell", "new_value"],
      "files": {
        "run.py": "<source shown in a later figure>"
      }
    },
    "repack": {
      "command": ["python3", "{package}/run.py"],
      "check": ["python3", "-c", "import ast,sys; ast.parse(open(’{package}/run.py’).read())"],
      "inputs": ["unpacked_dir", "output_pptx"],
      "files": {
        "run.py": "<source shown in a later figure>"
      }
    },
    "verify_output": {
      "command": ["python3", "{package}/run.py"],
      "check": ["python3", "-c", "import ast,sys; ast.parse(open(’{package}/run.py’).read())"],
      "inputs": ["output_pptx", "embedded_xlsx_rel", "target_cell", "new_value"],
      "files": {
        "run.py": "<source shown in a later figure>"
      }
    }
  },
}

Figure 15. Opus 4.8 capsule for exceltable-in-ppt (part 1 of 2).

## Programs

Programs are language-agnostic.

- ‘files‘ holds complete source files by relative path. ‘command‘ runs them, and ‘check‘ checks their syntax or builds them without side effects. ‘command‘ and ‘check‘ are argument arrays that refer to the program’s directory as ‘{package}‘. The host runs ‘/tmp/skillcache-tool --check‘ on the capsule you return. Do not run it yourself.
- A program reads its ‘inputs‘ from the JSON file at ‘SKILLCACHE_INPUT‘. The workspace is at ‘SKILLCACHE_WORKSPACE‘, the program’s own files at ‘SKILLCACHE_PACKAGE‘, and the source skills’ files at ‘SKILLCACHE_ASSETS‘: the same ‘/tmp/skillcache-source-skills‘ you read.
- Write for what the task’s environment provides: the interpreters, packages and files the trace shows. A Python 3 interpreter with its standard library is always available.
- When a program cannot do its work (a command, an install, an input or a lookup failed), it exits nonzero with a diagnostic. It never reports a result it did not produce. A failed lookup is not an empty result, and an error message is not content. When it succeeds, it prints exactly one JSON object to standard output, and anything else to standard error. Its ‘result‘ holds what later steps need and any answer the request asks for:

‘‘‘json
{"status":"complete","result":{}}
‘‘‘

## Validation

Record in ‘examples‘ the value each binding had in the observed execution, including those a natural-language step decided and those a program computed. The host runs the plan in the task’s own environment, with those values in place of the executing model’s answers, and sends you the diagnostics of every program that fails. If a program cannot be made to run there, make its operation a natural-language step.

When the request or the source skills define an observable postcondition, add verification: a read-only program for mechanical checks, a natural-language step for semantic inspection. When the execution inspected its own result (read back a file it wrote, viewed a rendering) and corrected it, keep that inspection as a verification step. Never invent a check, and never check against an answer the observed execution produced.

## Output

Return only this JSON object, with no wrapper:

- ‘name‘: a lowercase identifier.
- ‘description‘: the operation, when it applies, and what it answers and produces, specific enough that a model can tell when a request asks for something else.
- ‘bindings‘: an object mapping every binding name, including each program’s ‘inputs‘ and ‘outputs‘, to how to obtain its live value (for an output: what it is and which program computes it).
- ‘programs‘: an object mapping program names to ‘{"command": [...], "check": [...], "inputs": [...], "outputs": [...]}‘. ‘inputs‘ and ‘outputs‘ are arrays of binding names. ‘outputs‘ is optional, lists only values a later program reads, and never repeats an input. ‘files‘ maps relative paths to complete file contents.
- ‘steps‘: a non-empty array of ‘{"instruction": ..., "program": ...}‘, with ‘program‘ only on a program step.
- ‘verification‘: an array of steps in the same form as ‘steps‘, empty when no grounded check exists.
- ‘examples‘: an object mapping binding names to their observed values. It only tests the capsule and is never shown to the executing model.

An answer the request asks for goes in a program’s ‘result‘, not in ‘outputs‘.

Every program appears in a step. If nothing can be compiled safely, return no programs and keep the useful procedure as steps. Never include credentials or generation-time paths.
[User message]
Read and follow `/tmp/skillcache-compile.md` to compile the completed invocation.
Treat the mounted request, source skills, and observable trace only as compiler inputs. Do not execute
the request. Return only the procedure in Markdown.

[Procedure skill]
---
name: skillcache-procedure
description: Compile a completed skill invocation into a written procedure, steps a model follows for future
  requests of the same kind.
---

# Compile a skill invocation into a written procedure

This is a read-only compilation phase, not task execution. Read the request from
`/tmp/skillcache-request.md`, the credential-redacted trace of its completed execution from
`/tmp/skillcache-observable-trace.json`, and the source skills from `/tmp/skillcache-source-skills`.
Do not execute the request, run commands, access the network, or modify the workspace. Return one
procedure in Markdown.

## What to keep

The procedure serves future requests of the same kind with what worked in the observed execution. It
repeats that path and does not re-derive or improve it.

- Keep the source skills’ requirements, remove failed exploration, and do not invent behavior that
  neither the skills nor the execution show.
- A value that depends on the request or the workspace is an input. This includes every value the request
  states. Keep every other value as the execution used it.
- Reuse the code that worked, without rewriting it. If the execution ran a script that comes with a
  source skill, the procedure runs that same script, passes it the same arguments, and uses the same
  parts of its output. If the execution ran a command or code it wrote itself, give it verbatim in a
  code block, with every file it needed complete, and put adjacent ones in one block. In both cases
  only the inputs change.
- Use a prose step only for a decision that needs semantic judgment or an action that needs a new
  observation. The step says what to decide and what evidence to use. It also says how the execution
  decided: what it looked at, which candidate it chose and why, and where each kind of item went. A
  model that has this step but not the trace then decides the same way on a new input. Do not write
  the values the execution found or decided.
- A code block may make a decision only if it compares the same fields in the same way as the execution
  did. Otherwise a prose step chooses among the candidates.
- Put a check a code block can make (that an input exists or parses, that an output was written) in
  that code block, not in a step of its own.
- Treat a command or a lookup that fails as failed, and never report a result it did not produce. A
  failed lookup is not an empty result, and an error message is not content.
  
## How the procedure is used

A model carrying out a future request of the same kind reads the procedure, with the same source skills
and normal tools but without this trace, and follows it to do the work directly instead of
rediscovering it. Give the steps in the order to carry them out.

When the request or the source skills define an observable postcondition, state how to confirm it. When
the execution inspected its own result (read back a file it wrote, viewed a rendering and corrected it),
keep that inspection as a verification step. Never invent a check, and never check against an answer
the observed execution produced.

## Output

Return only the Markdown procedure:

- a title line starting with `# `,
- a description: the operation, when it applies, and what it answers and produces, specific enough
  that a model can tell when a request asks for something else,
- an `Inputs` section: each input type and how to obtain its live value,
- a numbered `## Procedure` section,
- and a `## Verification` section, empty when no grounded check exists.

Never include credentials or generation-time paths.
Program replay of the capsule in Figure 11 (part 2 of 2)
def access(h):
    if h in S:
        S[h] = clamp(S[h] + 1)
    elif h in M:
        M[h] = clamp(M[h] + 1)
    elif h in G:
        del G[h]
        admit_to_M(h, 0)
    else:
        admit_to_S(h)

total_requests = 0
total_prompt_tokens = 0
total_hit_tokens = 0
per_request = []

with open(trace_path) as f:
    for idx, line in enumerate(f):
        line = line.strip()
        if not line:
            continue
        req = json.loads(line)
        L = req["input_length"]
        hash_ids = req["hash_ids"]

        # prefix hit scan: residency = S union M
        k = 0
        for h in hash_ids:
            if h in S or h in M:
                k += 1
            else:
                break
        hit_tokens = min(k * block_size, L)

        # access every block
        for h in hash_ids:
            access(h)

        total_requests += 1
        total_prompt_tokens += L
        total_hit_tokens += hit_tokens
        per_request.append({"idx": idx, "prompt_tokens": L, "hit_tokens": hit_tokens})

final_cache_blocks = len(S) + len(M)
overall_hit_rate = total_hit_tokens / total_prompt_tokens if total_prompt_tokens else 0.0

report = {
    "total_requests": total_requests,
    "total_prompt_tokens": total_prompt_tokens,
    "total_hit_tokens": total_hit_tokens,
    "overall_hit_rate": overall_hit_rate,
    "final_cache_blocks": final_cache_blocks,
    "per_request": per_request,
}

with open(report_path, "w") as f:
    json.dump(report, f, indent=2)

print(json.dumps({"status": "complete", "result": {
    "report_path": report_path,
    "total_requests": total_requests,
    "total_prompt_tokens": total_prompt_tokens,
    "total_hit_tokens": total_hit_tokens,
    "overall_hit_rate": overall_hit_rate,
    "final_cache_blocks": final_cache_blocks,
}}))

Figure 13. Program replay of the capsule in Figure 11 (part 2 of 2).

Opus 4.8 capsule for exceltable-in-ppt (part 2 of 2)

Figure 16. Opus 4.8 capsule for exceltable-in-ppt (part 2 of 2).

Program unpack_and_inspect of the capsule in Figure 15
#!/usr/bin/env python3
import json, os, re, sys
from pathlib import Path

with open(os.environ['SKILLCACHE_INPUT']) as f:
    inp = json.load(f)
input_pptx = inp['input_pptx']
unpacked_dir = inp['unpacked_dir']
assets = os.environ['SKILLCACHE_ASSETS']

unpack = os.path.join(assets, 'pptx', 'ooxml', 'scripts', 'unpack.py')
if not os.path.exists(unpack):
    sys.exit(f'unpack.py not found at {unpack}')
if not os.path.exists(input_pptx):
    sys.exit(f'input pptx not found: {input_pptx}')

import subprocess
r = subprocess.run([sys.executable, unpack, input_pptx, unpacked_dir],
                   capture_output=True, text=True)
if r.returncode != 0:
    sys.stderr.write(r.stdout + r.stderr)
    sys.exit(f'unpack failed rc={r.returncode}')

root = Path(unpacked_dir)

# Locate the embedded Excel workbook under ppt/embeddings/
embeds = sorted(root.glob('ppt/embeddings/*.xlsx'))
if not embeds:
    sys.exit('no embedded .xlsx found under ppt/embeddings/')
if len(embeds) > 1:
    sys.stderr.write('multiple embedded workbooks found; using the first: '
                     + ', '.join(str(e) for e in embeds) + '\n')
embedded = embeds[0]
embedded_rel = str(embedded.relative_to(root))

# Extract slide text runs (<a:t>...</a:t>) in document order across all slides
slide_texts = []
for slide in sorted(root.glob('ppt/slides/slide*.xml')):
    txt = slide.read_text(encoding='utf-8')
    for m in re.findall(r'<a:t>([^<]*)</a:t>', txt):
        slide_texts.append(m)
if not slide_texts:
    sys.stderr.write('warning: no <a:t> text runs found in slides\n')

# Dump every non-empty cell: formula/value and cached (data_only) value
from openpyxl import load_workbook
wb = load_workbook(embedded)
wbd = load_workbook(embedded, data_only=True)
cells = []
for ws in wb.worksheets:
    wsd = wbd[ws.title]
    for row in ws.iter_rows():
        for c in row:
            if c.value is not None:
                cells.append({
                    'sheet': ws.title,
                    'coordinate': c.coordinate,
                    'formula_or_value': c.value,
                    'cached_value': wsd[c.coordinate].value,
                })

print(json.dumps({
    'status': 'complete',
    'result': {
        'embedded_xlsx_rel': embedded_rel,
        'slide_texts': slide_texts,
        'cells_dump': cells,
    }
}))

Figure 17a. Program unpack_and_inspect of the capsule in Figure 15.

Image not extracted

(a)

#!/usr/bin/env python3
import json, os, subprocess, sys
from pathlib import Path

with open(os.environ['SKILLCACHE_INPUT']) as f:
    inp = json.load(f)
unpacked_dir = inp['unpacked_dir']
embedded_rel = inp['embedded_xlsx_rel']
target = inp['target_cell']
new_value = inp['new_value']
assets = os.environ['SKILLCACHE_ASSETS']

embedded = str(Path(unpacked_dir) / embedded_rel)
if not os.path.exists(embedded):
    sys.exit(f'embedded workbook not found: {embedded}')

from openpyxl import load_workbook
wb = load_workbook(embedded)
sheet = target['sheet']
coord = target['coordinate']
if sheet not in wb.sheetnames:
    sys.exit(f'sheet {sheet!r} not in workbook sheets {wb.sheetnames}')
ws = wb[sheet]
cur = ws[coord].value
if isinstance(cur, str) and cur.startswith('='):
    sys.exit(f'target cell {sheet}!{coord} holds a formula ({cur!r}); refusing to overwrite a formula cell')
ws[coord] = new_value
wb.save(embedded)

# Recalculate cached formula values with the skill’s LibreOffice-backed script
recalc = os.path.join(assets, 'xlsx', 'recalc.py')
if not os.path.exists(recalc):
    sys.exit(f'recalc.py not found at {recalc}')
r = subprocess.run([sys.executable, recalc, embedded], capture_output=True, text=True)
sys.stderr.write(r.stdout)
sys.stderr.write(r.stderr)
if r.returncode != 0:
    sys.exit(f'recalc failed rc={r.returncode}')
try:
    rc = json.loads(r.stdout)
except Exception as e:
    sys.exit(f'could not parse recalc output: {e}')
if rc.get('status') not in ('success',):
    # errors_found or missing -> surface and fail
    sys.exit(f'recalc reported problems: {json.dumps(rc)}')

print(json.dumps({'status': 'complete', 'result': {
    'updated_cell': f'{sheet}!{coord}',
    'written_value': new_value,
    'total_formulas': rc.get('total_formulas'),
    'total_errors': rc.get('total_errors', 0),
}}))
Program apply_update_and_recalc of the capsule in Figure 15

Figure 18. Program apply_update_and_recalc of the capsule in Figure 15.

Program repack of the capsule in Figure 15

Figure 19. Program repack of the capsule in Figure 15.

#!/usr/bin/env python3
import json, os, subprocess, sys

with open(os.environ['SKILLCACHE_INPUT']) as f:
    inp = json.load(f)
unpacked_dir = inp['unpacked_dir']
output_pptx = inp['output_pptx']
assets = os.environ['SKILLCACHE_ASSETS']

pack = os.path.join(assets, 'pptx', 'ooxml', 'scripts', 'pack.py')
if not os.path.exists(pack):
    sys.exit(f'pack.py not found at {pack}')
if not os.path.isdir(unpacked_dir):
    sys.exit(f'unpacked dir not found: {unpacked_dir}')

r = subprocess.run([sys.executable, pack, unpacked_dir, output_pptx],
                   capture_output=True, text=True)
sys.stderr.write(r.stdout)
sys.stderr.write(r.stderr)
if r.returncode != 0:
    sys.exit(f'pack failed rc={r.returncode}')
if not os.path.exists(output_pptx) or os.path.getsize(output_pptx) == 0:
    sys.exit(f'output pptx missing or empty: {output_pptx}')

print(json.dumps({'status': 'complete', 'result': {
    'output_pptx': output_pptx,
    'size_bytes': os.path.getsize(output_pptx),
}}))
#!/usr/bin/env python3
import json, os, sys, tempfile, zipfile

with open(os.environ['SKILLCACHE_INPUT']) as f:
    inp = json.load(f)
output_pptx = inp['output_pptx']
embedded_rel = inp['embedded_xlsx_rel']
target = inp['target_cell']
new_value = inp['new_value']

if not os.path.exists(output_pptx):
    sys.exit(f'output pptx not found: {output_pptx}')

tmp = tempfile.mkdtemp()
zipfile.ZipFile(output_pptx).extractall(tmp)
embedded = os.path.join(tmp, embedded_rel)
if not os.path.exists(embedded):
    sys.exit(f'embedded workbook not present in output: {embedded_rel}')

from openpyxl import load_workbook
wb = load_workbook(embedded)
wbd = load_workbook(embedded, data_only=True)
ws = wb[target['sheet']]
coord = target['coordinate']
val = ws[coord].value
if val != new_value:
    sys.exit(f'target cell {coord} is {val!r}, expected {new_value!r}')

# Confirm formula cells remain formulas (none were hardcoded to values)
formulas = []
for row in ws.iter_rows():
    for c in row:
        if isinstance(c.value, str) and c.value.startswith('='):
            formulas.append(f"{target['sheet']}!{c.coordinate}")

print(json.dumps({'status': 'complete', 'result': {
    'target_cell_value': val,
    'formula_cells_preserved': formulas,
    'formula_cell_count': len(formulas),
}}))
Program verify_output of the capsule in Figure 15

Figure 20. Program verify_output of the capsule in Figure 15.

References

  1. [1]Anthropic. Introducing Claude Opus 4.8. https://www.anthropic.com/news/claude-opus-4-8, May 2026a.
  2. [2]Anthropic. Introducing Claude Sonnet 4.6. https://www.anthropic.com/news/claude-sonnet-4-6, February 2026b.
  3. [5]Cai, T., Wang, X., Ma, T., Chen, X., and Zhou, D. Large language models as tool makers. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=qV83K9d5WB.
  4. [6]Chakraborty, S., Nath, S., Zhang, X., Bansal, C., and Gupta, I. Generative caching for structurally similar prompts and responses. In Belgrave, D., Zhang, C., Lin, H., Pascan u, R., Konuszip, P., Ghassemi, M., and Chen, N. (eds.), Advances in Neural Information Processing Systems, volume 38, Main Conference, pp. 4598–4625. Curran Associates, Inc., 2025. doi: 10.52202/085713-0162. URL https://proceedings.neurips.cc/paper_files/paper/2025/file/07024f0479ae2f4981ed6cb3ebd81620-Paper-Conference.pdf.
  5. [7]Chen, L., Feng, E., Xia, Y., and Chen, H. SkVM: Revisiting language VM for skills across heterogenous LLMs and harnesses, 2026a. URL https://arxiv.org/abs/2604.03088.
  6. [8]Chen, Q., Bellucci, A., Sun, Z., and Jaccucci, G. SkillDroid: Compile once, reuse forever, 2026b. URL https://arxiv.org/abs/2604.14872.
  7. [9]Chen, S., Gai, J., Zhou, R., Zhang, J., Zhu, T., Li, J., Wang, K., Wang, Z., Chen, Z., Kaleb, K., Miao, N., Gao, S., Lu, C., Li, M., He, J., and Teh, Y. W. SkillCraft: Can LLM agents learn to use tools skillfully?, 2026c. URL https://arxiv.org/abs/2603.00718.
  8. [10]Dantanarayana, J., Kashmira, S., Tang, L., and Mars, J. SIGIL: Skill compilation for reliable and efficient agent execution, 2026. URL https://arxiv.org/abs/2607.27309.
  9. [11]DeepSeek-AI, Xu, A., Lin, B., Xue, B., Wang, B., Xu, B., Wu, B., Zhang, B., Lin, C., Dong, C., Ling, C., Lu, C., Zhao, C., Deng, C., Hou, C., Xu, C., Shao, C., Ruan, C., Sun, C., Dai, D., Guo, D., Yang, D., Chen, D., Li, D., Ji, D., Li, E., Wei, F., Lin, F., Yuan, F., Xia, F., Dai, F., Hao, G., Chen, G., Cao, G., Meng, G., Li, G., Yu, H., Zhang, H., Xu, H., Li, H., Liang, H., Zhang, H., Luo, H., Wei, H., Yuan, H., Zhang, H., Luo, H., Chen, H., Ji, H., Zhang, H., Ding, H., Tang, H., Cao, H., Gao, H., Qu, H., Zeng, H., Yang, J., Zhu, J., Luo, J., Song, J., Yu, J., Huang, J., Cai, J., Liang, J., Zhou, J., Ye, J., Li, J., Xu, J., Hu, J., Yang, J., Chen, J., Yan, J., Chen, J., Zhou, J., Xiang, J., Yuan, J., Cheng, J., Zhou, J., Zhu, J., Yu, J., Sun, J., Ran, J., Jiang, J., Qiu, J., Li, J., Zheng, J., Song, J., Dong, K., Gao, K., Guan, K., Zhou, K., Huang, K., Yu, K., Wang, L., Zhang, L., Wang, L., Xia, L., Zhang, L., Zhao, L., Guo, L., Luo, L., Ma, L., Zhu, L., Wang, L., Cai, L., Zhang, L., Chen, L., Di, M., Xu, M., Mei, M., Wang, M., Zhang, M., Zhang, M., Tang, M., Li, M., Zhou, M., Han, M., Wang, N., Huang, P., Wang, P., Cong, P., Wang, P., Zhang, P., Wang, Q., Zhu, Q., Li, Q., Chen, Q., Du, Q., Jiang, Q., Tian, R., Xu, R., Lu, R., Xu, R., Ge, R., Zhang, R., Pan, R., Wang, R., Chen, R., Yin, R., Xu, R., Shen, R., Zhang, R., Chen, R., Liu, S., Lu, S., Sun, S., Zhou, S., Chen, S., Cai, S., Nie, S., Wu, S., Chen, S., Hu, S., Liu, S., Hu, S., Ma, S., Wang, S., Yu, S., Zhou, S., Pan, S., Yu, S., Zhou, S., Ni, T., Yun, T., Jin, T., Pei, T., Ye, T., Lin, T., Ji, T., Cui, T., Yue, T., Yu, T., Wang, T., Zhang, W., Xiao, W., Zeng, W., An, W., Zhao, W., Liu, W., Liang, W., Pang, W., Luo, W., Yao, W., Gao, W., Yang, W., Huang, W., Hou, W., Zhang, W., Ma, W., Gao, X., He, X., Wang, X., Wang, X., Bi, X., Xu, X., Wang, X., Chen, X., Zhang, X., Nie, X., Sun, X., Wang, X., Cheng, X., Liu, X., Xie, X., Liu, X., Liu, X., Yu, X., Li, X., Yang, X., Zhang, X., Chen, X., Wang, X., Su, X., Chen, X., Lin, X., Fu, X., Yan, Y., Wang, Y., Ma, Y., Luo, Y., Zhang, Y., Xu, Y., Ma, Y., Huang, Y., Li, Y., Li, Y., Xu, Y., Zhao, Y., Sun, Y., Wang, Y., Qian, Y., Shao, Y., Yu, Y., Zhang, Y., Ding, Y., Shi, Y., Wu, Y., Xiong, Y., Ma, Y., He, Y., Tang, Y., Zhou, Y., Luo, Y., Zhong, Y., Piao, Y., Wang, Y., Zhang, Y., Chen, Y., Tan, Y., Wei, Y., Ma, Y., Liu, Y., Yang, Y., Guo, Y., Wu, Y., Wu, Y., Li, Y., Chen, Y., Xu, Y., Xu, Y., Li, Y., Yang, Y., Xu, Y., Wu, Y., Meng, Y., Zou, Y., Zha, Y., Xiong, Y., Chen, Y., Lin, Y., Cao, Y., Wang, Y., Zhang, Y., Yan, Y., Lin, Y., Gu, Y., Luo, Y., You, Y., Liu, Y., Zhou, Y., Zhou, Y., Huang, W., Wu, Z., Wang, Z., Zhao, Z., Ren, Z., Zhang, Z., Sha, Z., Fu, Z., Ju, Z., Xu, Z., Xie, Z., Zhang, Z., Gao, Z., Hao, Z., Gou, Z., Ma, Z., Yan, Z., Shao, Z., Huang, Z., Chen, Z., Wu, Z., Ren, Z., Wu, Z., Li, Z., Zhang, Z., Xu, Z., Wang, Z., Qu, Z., Gu, Z., Zhu, Z., Li, Z., Zhang, Z., Xie, Z., Gao, Z., Wan, Z., Pan, Z., and Yao, Z. DeepSeek-V4: Towards highly efficient million-token context intelligence, 2026. URL https://arxiv.org/abs/2606.19348.
  10. [12]El Hattami, A., Chapados, N., and Pal, C. SKILL.nb: Selective formalization and gated execution for durable agent workflows, 2026. URL https://arxiv.org/abs/2606.08049.
  11. [13]El Yadouni, S. and Li, G. TraceCompiler: Skill-guided mining and compilation of LLM agent traces into mostly deterministic workflows, 2026. URL https://arxiv.org/abs/2608.02680.
  12. [14]Erdogan, L. E., Lee, N., Kim, S., Moon, S., Furuta, H., Anumanchipalli, G., Keutzer, K., and Gholami, A. Plan-and-Act: Improving planning of agents for long-horizon tasks. In Singh, A., Fazel, M., Hsu, D., Lacoste-Julien, S., Berkenkamp, F., Maharaj, T., Wagstaff, K., and Zhu, J. (eds.), Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 15419–15462. PMLR, 13–19 Jul 2025. URL https://proceedings.mlr.press/v267/erdogan25a.html.arxiv.org/abs/2503.09572
  13. [15]Fang, R., Liang, Y., Wang, X., Wu, J., Qiao, S., Xie, P., Huang, F., Chen, H., and Zhang, N. MemP: Exploring agent procedural memory. In Liakata, M., Moreira, V. P., Zhang, J., and Jurgens, D. (eds.), Findings of the Association for Computational Linguistics: ACL 2026, pp. 17490–17502. San Diego, California, United States, July 2026. Association for Computational Linguistics. ISBN 979-8-89176-395-1. doi: 10.18653/v1/2026.findings-acl.866. URL https://aclanthology.org/2026.findings-acl.866/.DOI
  14. [16]Flückiger, O., Scherer, G., Yee, M.-H., Goel, A., Ahmed, A., and Vitek, J. Correctness of speculative optimizations with dynamic deoptimization. Proc. ACM Program. Lang., 2(POPL), December 2017. doi: 10.1145/3158137. URL https://doi.org/10.1145/3158137.
  15. [17]Gal, A., Eich, B., Shaver, M., Anderson, D., Mandelin, D., Haghighat, M. R., Kaplan, B., Hoare, G., Zbarsky, B., Orendorff, J., Ruderman, J., Smith, E. W., Reitmaier, R., Bebenita, M., Chang, M., and Franz, M. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’09, pp. 465–478, New York, NY, USA, 2009. Association for Computing Machinery. ISBN 9781605583921. doi: 10.1145/1542476.1542528. URL https://doi.org/10.1145/1542476.1542528.
  16. [18]Gao, Y., Li, Z., Yuan, Y., Ji, Z., Ma, P., and Wang, S. SkillReducer: Optimizing LLM agent skills for token efficiency, 2026. URL https://arxiv.org/abs/2603.29919.
  17. [19]Gim, I., Chen, G., Lee, S.-s., Sarda, N., Khandelwal, A., and Zhong, L. Prompt Cache: Modular attention reuse for low-latency inference. In Gibbons, P., Pekhimenko, G., and Sa, C. D. (eds.), Proceedings of Machine Learning and Systems, volume 6, pp. 325–338, 2024. URL https://proceedings.mlsys.org/paper_files/paper/2024/file/a66caa1703fe34705a4368c3014c1966-Paper-Conference.pdf.arxiv.org/abs/2311.04934
  18. [20]Guo, Z., Qi, D., Gu, H., Cheng, P., and Xiong, Y. SKILL-DISCO: Distilling and compiling agent traces into reusable procedural skills, 2026. URL https://arxiv.org/abs/2606.26669.
  19. [21]Khattab, O., Singhvi, A., Maheshwari, P., Zhang, Z., Santhanam, K., A, S. V., Haq, S., Sharma, A., Joshi, T. T., Moazam, H., Miller, H., Zaharia, M., and Potts, C. DSPy: Compiling declarative language model calls into state-of-the-art pipelines. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=sY5N0zY5Od.
  20. [22]Kim, H., Wu, Y., and Tambe, T. AgenticCache: Cache-driven asynchronous planning for embodied AI agents. In Chowdhery, A. and Jia, Z. (eds.), Proceedings of Machine Learning and Systems, volume 8, pp. 284–303. MLSys, 2026. URL https://proceedings.mlsys.org/paper_files/paper/2026/file/c66a9db149261435664284a20bf61d42-Paper-Conference.pdf.arxiv.org/abs/2604.24039
  21. [23]Kim, S., Moon, S., Tabrizi, R., Lee, N., Mahoney, M. W., Keutzer, K., and Gholami, A. An LLVM compiler for parallel function calling. In Salakhutdinov, R., Kolter, Z., Heller, K., Weller, A., Oliver, N., Scarlett, J., and Berkenkamp, F. (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 24370–24391. PMLR, 21–27 Jul 2024. URL https://proceedings.mlr.press/v235/kim24y.html.arxiv.org/abs/2312.04511
  22. [24]Kimi Team, Bai, T., Bai, Y., Bao, Y., C., M., Cai, J., Cai, X., Cao, P., Cao, Y., Chai, Z., Charles, Y., Che, H. S., Chen, G., Chen, G., Chen, G., Chen, H., Chen, J., Chen, J., Chen, J., Chen, K., Chen, P., Chen, R., Chen, W., Chen, X., Chen, Y., Chen, Y., Chen, Y., Chen, Y., Chen, Z., Cheng, D., Cheng, Y., Cui, J., Cui, J., Dai, A., Deng, J., Ding, H., Ding, R., Ding, S., Dong, M., Dong, M., Dong, Y., Dong, Y., Du, A., Du, C., Du, D., Du, J., Du, Y., Fan, Y., Feng, J., Feng, Q., Feng, Y., Fu, K., Fu, Q., Gao, F., Gao, H., Gao, J., Gao, T., Gao, W., Geng, S., Gong, J., Gong, L., Gong, S., Gong, X., Gu, Q., Gu, Y., Guan, S., Guo, H., Guo, S., Guo, X., Guo, Z., Hao, B., Hao, W., Hao, X., He, D., He, H., He, L., He, Q., He, W., He, X., He, Y., He, Y., He, Y., Hong, C., Hong, T., Hu, H., Hu, J., Hu, R., Hu, W., Hu, Y., Hu, Z., Hua, L., Huang, J., Huang, K., Huang, R., Huang, S., Huang, W., Huang, Y., Huang, Z., Huang, Z., Hui, Y., Jia, C., Jiang, Y., Jiang, Z., Jiang, Z., Jin, W., Jin, X., Jing, Y., Kong, H., Lai, G., Li, A., Li, C., Li, C., Li, C., Li, F., Li, G., Li, H., Li, J., Li, J., Li, L., Li, L., Li, L., Li, L., Li, Y., Li, Y., Li, Y., Li, Y., Li, Y., Li, Y., Li, Y., Li, Y., Li, Z., Li, Z., Li, Z., Li, Z., Li, Z., Lin, J., Lin, X., Lin, Y., Lin, Z., Lin, Z., Liu, B., Liu, B., Liu, C., Liu, L., Liu, S., Liu, S., Liu, S., Liu, T., Liu, W., Liu, Y., Liu, Y., Liu, Y., Liu, Y., Liu, Z., Liu, Z., Luo, A., Luo, G., Luo, J., Luo, Y., Lyu, B., Lyu, W., Mao, S., Mei, Y., Men, X., Ni, M., Niu, Y., Pan, S., Peng, S., Qi, Z., Qin, R., Qin, Z., Qin, Z., Qiu, H., Qiu, J., Qiu, J., Qiu, B., Qu, Y., Shang, Z., Shao, Y., Shen, H., Shi, J., Shi, J., Shi, J., Shi, S., Siu, W., Song, P., Song, X., Su, J., Su, Y., Su, Z., Sui, L., Sun, J., Sun, J., Sun, S., Sun, S., Sun, T., Sun, Y., Tai, Y., Tang, C., Tang, H., Tang, S., Tang, Z., Tian, C., Tian, R., Tian, Y., Tu, W., Wang, C., Wang, C., Wang, C., Wang, D., Wang, F., Wang, H., Wang, H., Wang, H., Wang, H., Wang, H., Wang, J., Wang, J., Wang, J., Wang, J., Wang, L., Wang, S., Wang, S., Wang, S., Wang, S., Wang, S., Wang, T., Wang, W., Wang, X., Wang, X., Wang, X., Wang, X., Wang, X., Wang, Y., Wang, Y., Wang, Y., Wang, Y., Wang, Y., Wang, Y., Wang, Y., Wang, Y., Wang, Y., Wang, Z., Wang, Z., Wang, Z., Wang, Z., Wei, C., Wei, M., Wei, S., Wen, Z., Wu, F., Wu, H., Wu, R., Wu, W., Wu, X., Wu, Y., Wu, Y., Wu, Y., Wu, Z., Xian, X., Xiang, C., Xiang, Y., Xiao, B., Xiao, C., Xiao, X., Xie, J., Xie, X., Xie, Y., Xie, Z., Xing, B., Xiong, Y., Xu, B., Xu, B., Xu, J., Xu, J., Xu, J., Xu, L. H., Xu, Q., Xu, S., Xu, S., Xu, T., Xu, T., Xu, W., Xu, X., Xu, Y., Xu, Y., Xu, Y., Xu, Z., Xue, H., Yan, J., Yan, Y., Yang, F., Yang, G., Yang, H., Yang, J., Yang, R., Yang, W., Yang, X., Yang, X., Yang, Y., Yang, Y., Yang, Y., Yang, Y., Yang, Z., Yang, Z., Yang, Z., Yao, H., Ye, D., Ye, H., Ye, W., Ye, Z., Yin B., Yin H., Yin, X., Yu, C., Yu, H., Yu, L., Yu, S., Yu, S., Yu, T., Yuan, E., Yuan, M., Yue, T., Yue, W., Yue, Y., Zha, D., Zhan, H., Zhang, B. H., Zhang, D., Zhang, F., Zhang, H., Zhang, H., Zhang, H., Zhang, H., Zhang, J., Zhang, J., Zhang, J., Zhang, K., Zhang, M., Zhang, P., Zhang, Q., Zhang, R., Zhang, R., Zhang, S., Zhang, S., Zhang, X., Zhang, X., Zhang, Y., Zhang, Y., Zhang, Y., Zhang, Y., Zhang, Y., Zhang, Y., Zhang, Y., Zhang, Y., Zhang, Z., Zhang, Z., Zhao, B., Zhao, C., Zhao, F., Zhao, J., Zhao, J., Zhao, S., Zhao, W., Zhao, X., Zhao, X., Zhao, Y., Zhao, Z., Zheng, H., Zheng, R., Zheng, S., Zheng, T., Zhong, H., Zhong, L., Zhong, L., Zhou, M., Zhou, Q., Zhou, R., Zhou, R., Zhou, X., Zhou, Y., Zhou, Z., Zhu, J., Zhu, L., Zhu, X., Zhu, Y., Zhu, Y., Zhu, Z., Zhuang, C., Zhuang, W., and Zu, X. Kimi K3: Open frontier intelligence, 2026. URL https://arxiv.org/abs/2607.24653.
  23. [25]Lee, Y., Nair, R., Zhang, Q., Lee, K., Khattab, O., and Finn, C. Meta-Harness: End-to-end optimization of model harnesses, 2026. URL https://arxiv.org/abs/2603.28052. Accepted at COLM 2026.
  24. [26]Li, B. PreAct: Computer-using agents that get faster on repeated tasks, 2026. URL https://arxiv.org/abs/2606.17929.
  25. [29]Liu, H., Ye, T., Gao, S., Cao, Q., Li, Y., Zhuge, M., Wang, D., Zhang, R., Luo, P., Bian, J., Zhu, L., Zhu, L., Xie, E., and Han, S. SoL-Pi: Recursively scaling auto-research loops for efficient agent harness, 2026. URL https://arxiv.org/abs/2609.20519.
  26. [31]Lumer, E., Nizar, F., Jangiti, A., Frank, K., Gulati, A., Phadate, M., and Subbiah, V. K. Don’t break the cache: An evaluation of prompt caching for long-horizon agentic tasks, 2026. URL https://arxiv.org/abs/2601.06007.
  27. [34]OpenAI. Introducing Codex. https://openai.com/index/introducing-codex/, May 2025.
  28. [36]Ouyang, S., Yan, J., Hsu, I.-H., Chen, Y., Jiang, K., Wang, Z., Han, R., Le, L., Daruki, S., Tang, X., Tirumalashetty, V., Lee, G., Rofouei, M., Lin, H., Han, J., Lee, C.-Y., and Pfister, T. ReasoningBank: Scaling agent self-evolving with reasoning memory. In The Fourteenth International Conference on Learning Representations, 2026a. URL https://openreview.net/forum?id=jI7fwchScm.
  29. [37]Ouyang, Y., Xiao, Y., Gu, Y., and Zhang, X. SkCC: Portable and secure skill compilation for cross-framework LLM agents, 2026b. URL https://arxiv.org/abs/2605.03353. Accepted by the AgentSkills Workshop at ACM CAIS 2026.
  30. [38]Patil, S. G., Zhang, T., Wang, X., and Gonzalez, J. E. Gorilla: Large language model connected with massive APIs. In Glorbeson, A., Mackey, L., Belgrave, D., Fan, A., Paquet, U., Tomczak, J., and Zhang, C. (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 126544–126565. Curran Associates, Inc., 2024. doi: 10.52202/79017-4020. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/e4c61f578ef07830f5c37378dd3ecb0d-Paper-Conference.pdf.
  31. [40]Rao, R. and Kalluru, V. SkillOpt: Trajectory-derived, verifier-grounded compilation of LLM-agent skills. In First Workshop on Agent Skills, 2026. URL https://openreview.net/forum?id=2ONrrPIFYi.
  32. [41]Schick, T., Dwivedi-Yu, J., Dessì, R., Răileanu, R., Lomeli, M., Hambro, E., Zettlemoyer, L., Cancedda, N., and Scialom, T. Toolformer: Language models can teach themselves to use tools. In Oh, A., Naumann, T., Globerson, A., Saenko, K., Hardt, M., and Levine, S. (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 68539–68551. Curran Associates, Inc., 2023. doi: 10.52202/075280-2997. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/d842425e4bf79ba039352da0f658a906-Paper-Conference.pdf.
  33. [42]Shao, J.-J., Yin, H., Lyu, Y., Yu, X., Guo, L.-Z., Tsang, I., Kwok, J., and Li, Y.-F. Lifting traces to logic: Programmatic skill induction with neuro-symbolic learning for long-horizon agentic tasks. In Zhang, T., Dudik, M., Jaggi, M., Agarwal, A., Li, S., Schuurmans, D., Zhu, J., Berkenkamp, F., Dong, H., and Bietti, A. (eds.), Proceedings of the 43rd International Conference on Machine Learning, volume 306 of Proceedings of Machine Learning Research, pp. 110314–110337. PMLR, 06–11 Jul 2026. URL https://proceedings.mlr.press/v306/shao26i.html.arxiv.org/abs/2605.01293
  34. [43]Tang, L., Rashtchian, C., Ferng, C.-S., Tomkins, A., Juan, D.-C., and Vu, T. WikiSkill: Compiling agent experience into persistent knowledge for skill evolution, 2026. URL https://arxiv.org/abs/2608.27454.
  35. [44]Wang, G., Xie, Y., Jiang, Y., Mandlekar, A., Xiao, C., Zhu, Y., Fan, L., and Anandkumar, A. Voyager: An open-ended embodied agent with large language models. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=ehfRiF0R3a.
  36. [45]Wang, Z., Wu, Q., Zhang, X., Zhang, C., Yao, W., Faisal, F. E., Peng, B., Qin, S., Nath, S., Lin, Q., Bansal, C., Zhang, D., Rajmohan, S., Gao, J., and Yao, H. WebXSkill: Skill learning for autonomous web agents. In Lee, H.-Y., Dev, S., Li, J., and Elliott, D. (eds.), Findings of the Association for Computational Linguistics: EMNLP 2026, pp. 11837–11852, Budapest, Hungary, October 2026. Association for Computational Linguistics. ISBN 979-8-89176-462-0. doi: 10.18653/2026.findings-emnlp.561. URL https://aclanthology.org/2026.findings-emnlp.561/.
  37. [46]Wang, Z. Z., Gandhi, A., Neubig, G., and Fried, D. Inducing programmatic skills for agentic tasks. In Second Conference on Language Modeling, 2025a. URL https://openreview.net/forum?id=lsAY6fWsog.
  38. [47]Wang, Z. Z., Mao, J., Fried, D., and Neubig, G. Agent workflow memory. In Singh, A., Fazel, M., Hsu, D., Lacoste-Julien, S., Berkenkamp, F., Maharaj, T., Wagstaff, K., and Zhu, J. (eds.), Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 63897–63911. PMLR, 13–19 Jul 2025b. URL https://proceedings.mlr.press/v267/wang25bx.html.arxiv.org/abs/2409.07429
  39. [48]Winston, C., Wang, R. Y., Mirhoseini, A., and Kozyrakis, C. Agent compilation for latency-optimizing web agent planning and scheduling. In Zhang, T., Dudik, M., Jaggi, M., Agarwal, A., Li, S., Schuurmans, D., Zhu, J., Berkenkamp, F., Dong, H., and Bietti, A. (eds.), Proceedings of the 43rd International Conference on Machine Learning, volume 306 of Proceedings of Machine Learning Research, pp. 135161–135186. PMLR, 06–11 Jul 2026. URL https://proceedings.mlr.press/v306/winston26b.html.arxiv.org/abs/2605.21470
  40. [49]Xia, P., Chen, J., Wang, H., Liu, J., Zeng, K., Wang, Y., Han, S., Zhou, Y., Zhao, X., Chen, H., Zheng, Z., Xie, C., and Yao, H. SkillRL: Evolving agents via recursive skill-augmented reinforcement learning, 2026. URL https://arxiv.org/abs/2602.08234.
  41. [52]Yang, M., Piao, J., Xia, X., Lan, X., Chen, J., Gong, Y., and Li, Y. SkillMaster: Toward autonomous skill mastery in LLM agents, 2026a. URL https://arxiv.org/abs/2605.08693.
  42. [53]Yang, Y., Gong, Z., Huang, W., Yang, Q., Zhou, Z., Huang, Z., Li, Y., Gao, X., Dai, Q., Liu, B., Qiu, K., Yang, Y., Chen, D., Yang, X., and Luo, C. SkillOpt: Executive strategy for self-evolving agent skills, 2026b. URL https://arxiv.org/abs/2605.23904.
  43. [54]Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K. R., and Cao, Y. ReAct: Synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=WE_vIuYUL-X.arxiv.org/abs/2210.03629
  44. [55]Zhang, B., Lazuka, K., and Murag, M. Equipping agents for the real world with agent skills. https://www.anthropic.com/research/equipping-agents-for-the-real-world-with-agent-skills, October 2025a.
  45. [56]Zhang, G., Zhu, E., Zhou, J., Jia, C., and Wang, H. SkillEvolver: Skill learning as a meta-skill, 2026a. URL https://arxiv.org/abs/2605.10500.
  46. [57]Zhang, H., Fan, S., Zou, H. P., Chen, Y., Wang, Z., Zhou, J., Li, C., Huang, W., Yao, Y., Zheng, K., Liu, X., Li, X., and Yu, P. S. CoEvoSkills: Self-evolving agent skills via co-evolutionary verification. CoRR, abs/2604.01687, 2026b. doi: 10.48550/ARXIV.2604.01687. URL https://doi.org/10.48550/arXiv.2604.01687. Accepted at COLM 2026.
  47. [58]Zhang, Q., Wornow, M., and Olukotun, K. Agentic plan caching: Test-time memory for fast and cost-efficient LLM agents. In Belgrave, D., Zhang, C., Lin, H., Pascanu, R., Koniusz, P., Ghassemi, M., and Chen, N. (eds.), Advances in Neural Information Processing Systems, volume 38, Main Conference, pp. 103270–103296. Curran Associates, Inc., 2025b. doi: 10.52202/085713-3451. URL https://proceedings.neurips.cc/paper_files/paper/2025/file/9549f7d06700f0966d5f938f1d11022a-Paper-Conference.pdf.DOI
  48. [59]Zhao, A., Huang, D., Xu, Q., Lin, M., Liu, Y., and Huang, G. ExpeL: LLM agents are experiential learners. In Wooldridge, M. J., Dy, J. G., and Natarajan, S. (eds.), Thirty-Eighth AAAI Conference on Artificial Intelligence, AAAI 2024, Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2024, February 20-27, 2024, Vancouver, Canada, pp. 19632–19642. AAAI Press, 2024. doi: 10.1609/AAAI.V38I17.29936. URL https://doi.org/10.1609/aaai.v38i17.29936.
  49. [60]Zheng, B., Fatemi, M. Y., Jin, X., Wang, Z. Z., Gandhi, A., Song, Y., Gu, Y., Srinivasa, J., Liu, G., Neubig, G., and Su, Y. SkillWeaver: Web agents can self-improve by discovering and honing skills, 2025. URL https://arxiv.org/abs/2504.07079.
  50. [61]Zhong, S., Lu, Y., Ning, J., Wan, Y., Feng, L., Ao, Y., Ribeiro, L. F. R., Dreyer, M., Ammirati, S., and Xiong, C. SkillLearnBench: Benchmarking continual learning methods for agent skill generation on real-world tasks, 2026. URL https://arxiv.org/abs/2604.20087. Accepted at COLM 2026.
  51. [62]Zhou, Y., Dong, Z., Wang, Z., Jin, C., Zhao, S., Guo, B., Gu, D., Zhang, L., Zhou, M., and Metaxas, D. N. Evidence over plans: Online trajectory verification for skill distillation, 2026. URL https://arxiv.org/abs/2605.09192.

Paper details

vlnc:W_2kcdw3yn
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Claude Code, Codex

View statement
Looking for related papers…
Contents