Source-linked AI summary
SkillZip: Contract-Preserving Graph Compression for Scalable Agent Skill Libraries
Xingyu Tan, Xiaoyang Wang, Qing Liu, Xiwei Xu, Xin Yuan, Liming Zhu, Wenjie Zhang
TL;DR
Growing skill libraries need the smallest sufficient executable context within tight budgets, yet existing systems retrieve whole packages. SkillZip uses section-level graphs and reversible, contract-preserving macros to retrieve compact executable contexts. It outperforms retrieval and graph-based baselines in end-task performance and source-skill retrieval on SkillsBench and ALFWorld while achieving a 3.46× compression ratio.
Problem
Growing skill libraries pose a challenge: retrieving the smallest sufficient executable context within tight budgets when existing systems retrieve whole skill packages.
Source: §1 · p. 1Method
SkillZip represents skills as section-level graphs, compresses recurring motifs into reversible, contract-preserving macros, and retrieves dependency-closed contexts with expansion only when execution requires detail.
Source: §1 · pp. 2–3Results
Takeaways & Limitations
SkillZip supports efficient, reliable skill reuse in long-horizon agent tasks while improving library scalability and maintaining executable structure.
Source: §6 · p. 9SkillZip’s preservation guarantee is structural, not semantic: it does not establish equivalence of unrecorded behavior or verifier correctness.
Source: §4.2 · p. 6
Abstract
from arXiv · showhide
Large Language Models (LLMs) increasingly act as agents whose procedural knowledge is stored in reusable skill packages and loaded at inference time. As skill libraries grow, a central challenge is to expose the smallest sufficient executable context under a limited context budget. Existing systems struggle to reuse routines below the whole-skill level, preserve procedural contracts during compression, keep compressed routines executable and expandable, and update the compressed library as skills evolve. These challenges reveal a unit mismatch: skills are retrieved as packages, compressed as text, and converted into execution graphs only after retrieval, whereas reliable reuse requires a contract-bearing procedural unit. We propose SkillZip, an execution-aware procedural abstraction framework that performs contract-preserving compression over section-level graphs. SkillZip rewrites recurring contract-valid motifs into reversible ported macros while preserving boundary signatures, dependency closure, verifier reachability, and source-level expansion. At inference time, it hydrates a compact, dependency-closed context and expands macros only when required. ReZip further integrates new skills and revises risky macros using execution evidence. Comprehensive experiments1 on technical and embodied agent benchmarks show SkillZip consistently outperforms the strongest baseline by up to 12.2 points, while achieving a 3.46x compression ratio with 99.2% dependency preservation and 98.7% verifier reachability. Scaling analyses further confirm robust retrieval across skill libraries ranging from 200 to 100K skills.
1 INTRODUCTION
SkillZip unifies retrieval, compression, and execution around source-grounded, contract-bearing section graphs, replacing recurring procedures with reversible macros. It hydrates dependency-closed context and updates abstractions using new skills and execution evidence.
Challenges in existing methods
- The central challenge is exposing the smallest sufficient executable context while aligning reuse granularity, contract preservation, persistent compression, and execution-aware maintenance.Whole-skill retrieval, textual compression, and post-retrieval graph construction operate on different units. Shared contract-compatible procedures should instead be retrieved once, alongside only the task-specific sections.Source: §1 · pp. 1–2
Contribution
- MotifZip replaces recurring section-level motifs with ported macros only when boundary signatures, dependency closure, verifier reachability, and reversible source expansion remain preserved.Each macro is a reversible graph rewrite rather than a lossy textual summary.Source: §1 · p. 2
- Sec2Graph opens skill packages into source-grounded section nodes, exposing reusable procedural components while retaining execution roles, dependencies, verifiers, and provenance.Sections include intents, inputs, operations, verifiers, and outputs, making internal components visible without manually splitting the skill library.Source: §1 · p. 2
- PathHydrate routes over the compressed graph to construct compact, dependency-closed executable context, repairing missing execution roles and expanding macros only as needed.Macros can be rendered as a name, contract, outline, or full source, using the lowest sufficient level of detail.Source: §1 · pp. 2–3
- ReZip incrementally maintains the compressed graph by matching new skills to compatible macros, promoting recurring contract-valid residuals, and revising risky macros using execution evidence.Revisions can increase hydration detail, split macros, or retire them as new skills and execution traces arrive.Source: §1 · pp. 2–3
Effectiveness, efficiency, and scalability
- 12.2 points is SkillZip’s maximum gain over SkillDAG on ALFWorld, with best end-task performance in every directly comparable setting.A 3.46× compression ratio and 71.0% reduction in active storage accompany 99.2% dependency preservation and 98.7% verifier reachability. SkillZip spans six LLM backbones and technical and embodied benchmarks without backbone-specific fine-tuning, maintaining its retrieval advantage from 200 to 100K skills.Source: §1 · p. 3
2 RELATED WORK
Existing work establishes skills as procedural memory and improves skill selection and coordination, but generally emphasizes whole-skill reuse or task-time orchestration. Compression for agent skill libraries must additionally preserve execution interfaces, dependency closure, verifier reachability, and source provenance.
Agent skills and procedural memory
Skill retrieval and execution
- Skill retrieval research improves selection and coordination, but primarily addresses skill-level retrieval or task-time orchestration.Approaches include progressive loading [51], dependency-based organization [1] [24] [54], granularity adaptation [27] [29], and execution graphs constructed after selection [17] [48]. SkillGraph [19] retrieves ordered dependency subgraphs, while SkillOps [33] combines typed contracts with an ecosystem graph for diagnosis and maintenance.Source: §2 · p. 3
Skill and graph compression
- Agent skill compression requires preserving execution interfaces, dependency closure, verifier reachability, and source provenance beyond shortening text or compressing repeated graph structure.Context compression uses token selection, rewriting, or compact representations [8] [10] [11] [32] [44] [50]; procedural-memory methods abstract experience into reusable skills, rules, or memories [2] [28] [31] [55] [56] [61]. Graph methods supply frequent-subgraph mining, MDL-based summaries, grammar-based replacement, and incremental maintenance [5] [12] [13] [14] [15] [26].Source: §2 · p. 3
3 PRELIMINARIES
SkillZip models skill libraries as occurrence-specific procedural graphs with explicit interface, execution, and verification contracts. Reversible macros compress connected subgraphs, while hydrated contexts must cover query anchors, close required dependencies, preserve verifier reachability, and remain expandable to source sections.
3 PRELIMINARIES
- Compatible occurrences link to shared canonical prototypes without merging source occurrences; each skill forms an executable subgraph from an intent or trigger root to verified output.Occurrences retain skill membership, multiplicity, and source pointers, while packages remain source provenance. Graph edges encode dependencies, membership, resources, and prototype links; multiple typed dependencies express multi-input/multi-output procedures, and ports expose external contracts.Source: §3 · p. 3
- Nine operational roles classify section nodes by procedural function rather than source-file position; nodes also record content, signatures, resources, guards, and provenance.The roles are Intent, Trigger, Input, Precondition, Operation, Resource, Failure, Verifier, and Output. Each node records input/output signatures, resources or tools, guard or verifier conditions, and its original skill source.Source: §3 · p. 3
- Procedural contracts combine section fields, typed edges, and ports into separately validated interface, execution, and verification aspects.Interface covers typed inputs, outputs, and resource bindings; execution covers preconditions, dependencies, guards, effects, and failure handling. Verification covers success conditions and verifier hooks, while source pointers retain provenance for reversible expansion.Source: §3 · p. 3
- Ported macros compress connected section subgraphs while preserving boundary inputs, outputs, procedural contracts, and reversible source expansion.A valid macro preserves all three contract aspects across compatible occurrences. Every state-changing operation or macro must retain a directed dependency path to at least one verifier.Source: §3 · pp. 3–4
- SkillZip builds a section graph and macro dictionary, then hydrates context for a query, executor profile, and context budget.The hydrated subgraph must cover query anchors, close required dependencies, retain reachable verifiers, and support expansion to source sections.Source: §3 · p. 4
4 METHOD
SkillZip keeps procedural contracts explicit while converting skill packages into section graphs, compressing recurring subgraphs into reversible macros, and hydrating task-specific executable context. ReZip uses new skills and execution evidence to maintain the compressed library as it evolves.
4.1 Sec2Graph: Building Procedural Subgraphs
- Sec2Graph converts packages into source-grounded, role-typed section graphs with explicit contracts, execution dependencies, validation links, and occurrence-preserving cross-skill prototypes.Contracts record typed I/O, resources, guards, and verifier conditions; graphs retain order, repair edges, skill membership, intent roots, and verified-output terminals. Prototype sharing requires compatible roles, boundary signatures, resources, and verifier behavior, while occurrences retain local edges and source pointers.Source: §4.1 · pp. 4–5
4.2 MotifZip: Contract-Preserving Compression
- MotifZip accepts recurring subgraphs as macros only when interfaces remain stable, dependencies are internal or port-exposed, and operation-to-verifier paths remain reachable.Candidates grow within structurally compatible neighborhoods defined by roles, resources, and I/O shapes; semantic similarity is considered only afterward. Support counts non-conflicting source occurrences rather than canonical prototypes or repeated text.Source: §4.2 · p. 5
- MotifZip greedily selects non-overlapping macros using description-length savings, cross-skill reuse, boundary-loss penalties, and execution-risk penalties, retaining reversible source expansion.Rewriting reconnects external edges through typed ports, and inverse expansion restores the source-grounded graph; greedy selection does not claim global optimality. The guarantee preserves recorded interfaces, dependencies, verifier paths, and provenance, not unrecorded behavior or verifier correctness.Source: §4.2 · pp. 5–6
4.3 PathHydrate: Budgeted Executable Context
- PathHydrate combines subgoal and raw-query section matching with reciprocal-rank fusion of skill-description and best-section rankings to concentrate seeds without losing skill coherence.Task anchors capture goals, expected outputs, capabilities, visible inputs, executor profiles, and ordered subgoals. Subgoal matching emphasizes capabilities and output signatures, raw-query matching retains names and resources, and high-confidence section-level rescue remains available after skill-level fusion.Source: §4.3 · p. 6
- PathHydrate searches for compact, anchor-covering context under a token budget, repairing dependencies and verifier reachability and stopping once execution requirements are satisfied.Scaffold repair walks backward for inputs, preconditions, and resources, and forward for failure handlers, verifiers, and outputs; unused budget does not trigger additional filling. If no verifier-reachable context fits, it falls back to the smallest skill-level bundle covering the anchors.Source: §4.3 · p. 6
- PathHydrate renders macros at the lowest sufficient detail level, expanding them when needed inputs, guards, verifiers, or source pointers are unavailable.Available levels are name, contract, outline, and full source; the rendered context includes intent, inputs, preconditions, operations, resources, guards, failure handlers, verifiers, and expansion pointers. Hydration logs record selected sections, levels, token costs, late expansions, verifier coverage, and source pointers, providing runtime feedback to ReZip.Source: §4.3 · pp. 6–7
4.4 ReZip: Incremental Library Maintenance
- ReZip assimilates new skills by reusing contract-compatible macros and buffering unmatched regions until repeated cross-skill support, compression gain, and contract checks justify promotion.Arriving skills pass through Sec2Graph, and reused macros retain occurrence-specific source maps. Promotion applies the same port, dependency-closure, and verifier checks as offline compression, then removes promoted occurrences from the residual buffer.Source: §4.4 · p. 7
- ReZip uses macro execution evidence to raise hydration levels for risky task profiles, then splits or retires macros when risk persists.Evidence includes macro uses, source expansions, verifier failures, and downstream repair cost. Revisions retain source-grounded expansion and preserve the executable-subgraph lifting invariant used by PathHydrate.Source: §4.4 · p. 7
5 EXPERIMENTS
SkillZip achieves the best task performance across SkillsBench and ALFWorld with both evaluated backbones, while improving retrieval and reducing execution costs. Its compression preserves dependency and verifier structure, while ablations identify distinct benefits from section-level procedures, contract constraints, and adaptive hydration.
5.1 Main Results
- 33.3 SkillsBench task reward and 79.3 ALFWorld episode success rate accompany SkillZip’s best end-to-end performance across both benchmarks and both backbones.With MiniMax-M2.7, these exceed SkillDAG by 6.0 and 12.2 points, respectively. With gpt-5.2-codex, SkillZip reaches 43.0 SkillsBench task reward and 96.4 ALFWorld episode success rate, exceeding SkillDAG by 6.2 and 2.8 points.Source: §5.1 · pp. 7–8
5.2 Compression and Structural Fidelity
- 3.46× compression preserves DPR at 99.2 and VR at 98.7, while SkillZip raises task reward from the raw section graph’s 31.0 to 33.3.Exact-text deduplication achieves only 1.43× compression; text compression matches SkillZip’s rounded compactness but yields DPR 65.0, VR 60.0, reward 25.5, and 45.0% recovery versus SkillZip’s 14.8%, while generic graph grammar and unchecked merges also sacrifice structural fidelity. Contract extraction achieves 91.6 macro-F1 and 84.6 exact match against human annotations, with high DPR and VR maintained under 10% contract corruption.Source: Table 2 · p. 8, §5.2 · p. 8
5.1 Main Results
- 27.8-point and 30.3-point ALFWorld Ret@1 gains over SkillDAG with MiniMax-M2.7 and gpt-5.2-codex, respectively, demonstrate improved retrieval across both evaluated backbones.On SkillsBench with MiniMax-M2.7, Ret@1 rises from 66.7 to 73.6, Ret@5 from 78.2 to 92.0, and MRR by 10.0; with gpt-5.2-codex, Ret@5 improves by 12.6. The Ret@1 advantage over SkillDAG widens from 6.2 at 200 skills to 23.3 at 100K, where SkillZip retains 65.1 Ret@1 with 248.3 ms online retrieval and hydration latency.Source: §5.1 · p. 8
- 47.0% less cumulative prompt processing and 21.7% fewer average tool calls accompany SkillZip’s gains over SkillDAG on matched MiniMax-M2.7 SkillsBench runs.Uncached prompt input falls by 18.7% and end-to-end task time by 21.1%; these trajectory-level counters differ from the one-time hydrated skill context. After section contracts are available, local graph construction and MotifZip take 178 seconds for a 100K-skill library containing 4.77M section nodes.Source: §5.1 · p. 8
5.3 Ablation Study
- 5.4 points of task reward are lost when skill-level nodes replace section-level nodes, the largest component-ablation drop.This replacement also lowers Ret@1 by 6.9 points and increases rendered context by 59.9%; removing MotifZip preserves perfect DPR and VR but increases context by 52.9% and lowers reward to 31.0. Removing dependency closure lowers DPR to 82.3, while removing verifier constraints lowers VR to 76.4 despite near-full-model Ret@1, showing that retrieval accuracy alone does not preserve executability.Source: Table 3 · p. 8, §5.3 · p. 8
- 33.3% more tokens are required without adaptive hydration, despite preserved DPR and VR; global section rescue separately supports retrieval and task reward.Removing global section rescue reduces Ret@1 to 68.2 and reward to 30.4 because local expansion can miss useful sections. PathHydrate renders 1,941 tokens per task in the budget analysis, 72.1% fewer than top-5 whole-skill loading.Source: §5.3 · p. 9
6 CONCLUSION … A.5 ReZip
SkillZip compresses section-level procedural graphs into compact task-specific contexts while preserving dependency and verifier contracts. Its algorithms cover graph construction, contract-valid macro compression, budgeted hydration, and incremental maintenance; experiments on SkillsBench and ALFWorld show improvements over strong retrieval and graph-based baselines.
6 CONCLUSION
- SkillZip outperforms strong retrieval and graph-based baselines on SkillsBench and ALFWorld in both end-task performance and source-skill retrieval.The framework maintains executable structure while improving skill-library scalability and supporting reliable reuse in long-horizon tasks.Source: §6 · p. 9
APPENDIX OUTLINE
- The appendix outlines additional evaluations of compression robustness, retrieval scalability, procedural overlap, hydration compactness, lifecycle costs, streaming maintenance, and reliability.Its listed questions also address domain generalization, repeated-run stability, backbone generalization, and remaining failure sources.Source: APPENDIX OUTLINE · p. 11
A.1 SkillZip Workflow
- The SkillZip workflow connects raw section-graph construction, repeated-motif compression, task-specific context hydration, and compressed-library updates triggered by new skills or execution traces.Algorithm 1 distinguishes construction, compression, hydration, maintenance, contract validation, and evaluation or logging operations with colored badges.Source: §A.1 · p. 12
A.2 Sec2Graph
- Sec2Graph converts skill packages into typed procedural graphs whose sections explicitly retain roles, input/output signatures, resource references, guard or verifier conditions, and source pointers.Graph construction adds ordering, input bindings, requirements, verifiers, and repairs. Verifier attachment is conservative: links require reachability through skill order, explicit tests, or matching output signatures.Source: §A.2 · p. 12
A.3 MotifZip
- MotifZip replaces repeated, signature-compatible motifs with nonconflicting reversible macros only after validating boundaries, stable signatures, dependency closure, verifier reachability, and positive compression gain.Missing or ambiguous effects are conservatively treated as state-changing and require a reachable verifier; contradictory signatures or verifier bindings remain explicit rather than being traded against gain. After validity checks, risk penalizes underspecified guards or resources, incomplete I/O bindings, and weak verifier support.Source: §A.3 · p. 13
A.4 PathHydrate
- PathHydrate fuses task-aware section and skill evidence to compile budgeted, connected execution contexts with scaffold repair, dependency closure, reachable verifiers, and progressive macro rendering.BreadthFill covers multi-skill tasks and DepthFill adds dominant-skill sections; both stop once task anchors, required dependencies, and verifier reachability are satisfied rather than exhausting budget. Closure repair restores dependencies or verifier hooks when possible and records infeasible roles; macros render as name, contract, outline, or full source.Source: §A.4 · pp. 13–14
A.5 ReZip
- ReZip assimilates new skills through existing macros and uses execution traces to revise macros that repeatedly require expansion or cause downstream failures.Residual motifs are promoted only with sufficient support, positive compression gain, and valid contracts. Updates reuse MotifZip’s port, dependency-closure, and verifier tests; revision increases hydration detail before splitting or retiring macros, preserves source expansion, and resets revised-rule evidence.Source: §A.5 · p. 14
A.6 Evaluation-facing Metrics · B ADDITIONAL EXPERIMENTS
EvaluateSkillZip converts framework logs into evaluation metrics that check structural preservation without adding a retrieval mechanism. Its measurements test whether compressed contexts remain executable rather than merely shorter.
A.6 Evaluation-facing Metrics
- EvaluateSkillZip checks whether the compressed representation preserves SkillZip’s claimed structural conditions; it does not introduce a new retrieval mechanism.Algorithm 6 converts framework-level logs into the empirical quantities used in evaluation.Source: §A.6 · p. 14
- Evaluation takes queries, raw and compressed graphs, a macro dictionary, executor, profile, and budget, returning per-query logs and an aggregate report.Source: §A.6 · p. 14
- Evaluation reports task success, token reduction, dependency preservation, verifier reachability, macro expansion, full-source fallback, and downstream execution inflation.The last five metrics test structural constraints enforced during MotifZip and PathHydrate.Source: §A.6 · p. 14
- Paired evaluation compares hydrated compressed contexts with uncompressed contexts for the same task under the same executor seed.PathHydrate constructs the compressed context using the query, profile, budget, compressed graph, and macro dictionary.Source: §A.6 · p. 14
- Downstream execution inflation quantifies nonnegative execution-cost increases relative to the paired uncompressed execution.The cost is J(tau) = n_repair(tau) + n_tool(tau) + 2n_vfail(tau). Inflation is 100 max{0, J(tau_q) - J(tau_full_q)}/max{1, J(tau_full_q)}.Source: §A.6 · p. 14
- Macro expansion and full-source fallback are aggregated as query-level indicators, with fallback treated as a strict subset of expansion.Source: §A.6 · p. 14
B.1 Compression Fidelity and Contract Robustness
On a 1K-skill library, SkillZip reduces active procedural storage while retaining source packages for reversible expansion. Contract validation keeps fallback and downstream inflation low.
B.1 Compression Fidelity and Contract Robustness
- 13.0 MB remains with exact-text deduplication; generic graph grammar reaches 6.4 MB but raises fallback to 14.8% and downstream inflation to 14.6%.The audit jointly measures active storage, retained source packages, fallback expansion, and downstream inflation to distinguish useful compression from deferred recovery costs.Source: §B.1 · p. 15
- 0.5 MB is saved by removing contract checks, but fallback rises from 7.2% to 24.7% and downstream inflation from 2.7% to 23.4%.Contract validation therefore preserves most available storage savings without shifting the cost to downstream recovery.Source: §B.1 · p. 15
- 71.0% lower active storage—from 18.6 MB to 5.4 MB—leaves SkillZip’s 112.4 MB source library unchanged for reversible expansion.Active storage includes the graph representation and macro dictionary used during retrieval and hydration. All representations reuse cached section contracts, isolating representation and compression from LLM extraction.Source: Table 4 · p. 15, §B.1 · p. 15
B.2 Retrieval Scalability and Ambiguity · B.3 Procedural Overlap and Domain Applicability
SkillZip retains higher retrieval accuracy and lower confusion than SkillDAG as libraries grow, while increasing compression and keeping retrieval–hydration latency below 250 ms. Compression increases with contract-compatible procedural overlap, and task improvements extend across the tested procedural domains.
B.2 Retrieval Scalability and Ambiguity
- 65.1 versus 41.8 Ret@1 favors SkillZip over SkillDAG at 100K skills, widening their gap from 6.2 points at 200 skills to 23.3 points.With evaluation queries fixed, SkillZip Ret@1 falls from 78.3 to 65.1, a 13.2-point decrease; SkillDAG falls from 72.1 to 41.8, a 30.3-point decrease.Source: Table 6 · p. 16, §B.2 · p. 16
- 4.2% to 12.4% similar-skill confusion for SkillZip contrasts with SkillDAG’s increase from 8.5% to 48.2% as the library grows.The authors attribute this difference to section-level matching distinguishing concrete operations, dependencies, and verifiers, whereas whole-skill retrieval is more sensitive to overlapping descriptions and routines.Source: Table 6 · p. 16, §B.2 · p. 16
- 2.31× to 4.29× compression accompanies library growth, while SkillZip’s online retrieval–hydration latency increases from 18.4 to 248.3 ms per query.Latency remains below 250 ms at 100K skills; recurring procedural structure enables a more compact active retrieval graph.Source: Table 6 · p. 16, §B.2 · p. 16
B.3 Procedural Overlap and Domain Applicability
- The controlled-overlap experiment varies recurring contract-compatible motifs in distractor-only skills while holding library size, evaluation queries, and target skills fixed.Three variants of the same 1K-skill pool replace non-target routines while preserving section counts and role distributions. Injected occurrences preserve role topology, typed I/O, resource family, guards, and verifier connections, but use independently paraphrased text to distinguish procedural recurrence from exact-text duplication.Source: §B.3 · p. 16
- 1.18× to 4.63× CR accompanies increasing procedural overlap, while mean macro support rises from 2.3 to 9.7 occurrences.DPR stays above 99.1, VR stays above 98.8, and reward varies by only 1.1 points. SkillZip leaves more sections explicit when contract-compatible repetitions are scarce rather than forcing aggressive macros.Source: Table 7 · p. 16, §B.3 · p. 16
- 4.8–6.7-point SkillsBench reward gains and a 12.2-point ALFWorld success-rate gain favor SkillZip over SkillDAG in every domain with a matched baseline.The reward gains cover four SkillsBench domains; the miscellaneous category reaches 30.5 reward without a category-level baseline.Source: Table 8 · p. 17, §B.3 · p. 17
- 4.21× CR in data wrangling is the highest domain compression ratio, versus 1.62× in ALFWorld; domain VR ranges from 98.5 to 99.4.The authors suggest recurring loading, schema-handling, normalization, and validation routines explain data wrangling’s higher compression. ALFWorld’s task improvement despite lower compression shows that compression ratio and task gains are not identical.Source: Table 8 · p. 17, §B.3 · p. 17
B.4 Hydration Quality and Context Compactness
PathHydrate achieves 33.3 reward with compact context under its default 3,000-token selection budget, while larger budgets yield diminishing gains. Hydration stops when execution obligations are satisfied rather than filling the budget.
(RQ10) How does PathHydrate balance task quality and context budget?
- 33.3 reward at the default 3,000-token budget leaves only 0.8 points of improvement at 5,000 tokens.Reward rises from 22.4 at 1,000 tokens to 31.5 at 2,000 tokens as hydration recovers execution-critical dependencies and verifier conditions. The SkillsBench experiment uses MiniMax-M2.7 and holds the library, retriever, and executor fixed.Source: Figure 4 · p. 17, §B.4 · p. 17
(RQ11) Is hydrated context compact under the default budget?
- 72.1% and 88.8% context reductions versus top-5 and top-12 whole-skill loading accompany PathHydrate’s 33.3 reward at the default 3,000-token budget.On the 1K-skill SkillsBench library, mean rendered context is 1,941 tokens (median 1,947), versus 6,958 for top-5 and 17,384 for top-12 whole-skill loading.Source: Figure 5 · p. 18, §B.4 · p. 18
- 51.7% of tasks use fewer than 2,000 tokens, and 74.7% use fewer than 2,500, showing that compactness is not merely an averaging artifact.The modal interval is 1,000–1,500 tokens, containing 26.4% of tasks.Source: §B.4 · p. 18
- PathHydrate stops hydration once task anchors are covered, dependencies are closed, and a verifier remains reachable, expanding only for unresolved execution obligations.The budget acts as a selection allowance rather than a quota.Source: §B.4 · p. 18
B.5 System Cost across the Skill Lifecycle · B.6 Streaming ReZip Maintenance
SkillZip combines cacheable offline construction and lightweight local retrieval with lower end-to-end cost and higher task reward. ReZip maintains evolving libraries close to full-recompression performance while requiring substantially less update cost.
B.5 System Cost across the Skill Lifecycle
- 178 s suffices for local graph construction and MotifZip at 100K skills with 4.77M cached section nodes, excluding LLM extraction.Construction takes 274 ms for 100 skills, 1.44 s for 1K, and 16.1 s for 10K; typed-signature bucketing restricts motif matching to interface-compatible candidates. Single-server measurements include initialization and bucket construction, while provider-dependent contract extraction is accounted for separately and its outputs cached.Source: Table 9 · p. 18, §B.5 · p. 18
- 27.9 ms online latency and 1,941 rendered tokens improve on SkillDAG’s 41.2 ms and 3,103 tokens for one retrieval-and-rendering step.Measured after task anchors are available and excluding provider inference, latency includes retrieval, graph closure, macro hydration, and rendering. Vector Skills takes only 12.1 ms without closure or hydration but renders 2,834 tokens, 46.0% more than SkillZip.Source: Table 10 · p. 19, §B.5 · p. 19
- 33.3 reward versus SkillDAG’s 27.3 accompanies SkillZip reductions of 47.0% in total prompt processing and 21.1% in average task time.On default 1K-skill SkillsBench with MiniMax-M2.7, completion tokens decrease from 31,963 to 20,601 and tool calls from 36.9 to 28.9 versus SkillDAG. SkillZip is fastest among five systems, although full-task timing includes provider and container variation.Source: Table 11 · p. 19, §B.5 · p. 19
- 18.7% fewer uncached prompt tokens—62,526 for SkillZip versus 76,880 for SkillDAG—accompany larger reductions in cached and total prompt processing.The paper attributes the larger overall savings to compact section-level procedures reducing irrelevant branches, missing dependencies, repair attempts, and repeated context across turns. Most prompt tokens in all systems are served from cache.Source: §B.5 · p. 19
B.6 Streaming ReZip Maintenance
- 50% of the 1K-skill pool initializes streaming evaluation, with the remaining 50% arriving in ten equal, non-overlapping batches under a fixed order.After batch five, verifier conditions are tightened for a fixed, domain-stratified macro subset without changing interfaces or operations; every batch uses the same frozen queries covering initial and arriving procedures. ReZip uses only cached records and traces observed so far, and update costs exclude one-time LLM extraction.Source: §B.6 · p. 20
- 3.64× CR, 33.2 reward, and 98.6 VR let ReZip approach full recompression with only 0.22× its cumulative update cost.Full recompression reaches 3.71× CR, 33.6 reward, and 99.1 VR after ten arrival batches. ReZip recovers from injected contract drift within 1.4 batches on average.Source: Table 12 · p. 20, §B.6 · p. 20
- 28.7 reward and 91.2 VR under static maintenance trail append-only insertion’s 30.1 reward and 94.6 VR, while append-only CR drops to 2.41×.Static macros remain unrevised after verifier contracts change, while append-only insertion leaves recurring new routines uncompressed. ReZip instead uses execution traces to promote recurring contract-valid residuals into macros and demote or revise macros implicated by verifier failures.Source: Table 12 · p. 20, §B.6 · p. 20
B.7 Reliability across Runs and Backbones
SkillZip’s gains remain statistically stable across repeated agent runs and extend across six LLM backbones on two benchmarks. Executable section-level context benefits both weaker and stronger executors.
RQ16: Stability across repeated runs
- 2.8 points separate SkillZip’s 96.4 ALFWorld success from SkillDAG’s 93.6 with gpt-5.2-codex, despite limited remaining headroom.The paired permutation test remains significant at p = .031, supporting a repeated-run benefit even in this conservative setting.Source: §B.7 · p. 20
- 2.8 to 12.2 points are SkillZip’s paired task-performance gains over SkillDAG across four settings, with every 95% confidence interval excluding zero.Five matched runs pair methods by task or episode and random seed; confidence intervals use 1,000 paired bootstrap samples over outcome-level differences rather than run-level means. SkillsBench reward gains are 6.0 points with MiniMax-M2.7 and 6.2 with gpt-5.2-codex; ALFWorld success-rate improvement reaches 12.2 points with MiniMax-M2.7.Source: Table 13 · p. 20, §B.7 · p. 20
RQ17: Generalization across LLM backbones
- 12 of 12 benchmark–backbone settings favor SkillZip over Vector Skills, with SkillsBench reward gains of 19.9 to 26.2 points.SkillsBench relative gains are 2.0×–3.2×; MiniMax-M2.7 reward increases from 10.4 to 33.3. The comparison spans six backbones and two benchmarks.Source: §B.7 · p. 21
- 52.4 SkillsBench reward with Claude Sonnet 4.5, versus Vector Skills’ 26.2, demonstrates that SkillZip’s gains persist with stronger executors.Gemini 3 Pro improves from 19.3 to 44.4, and gpt-5.2-codex improves from 21.5 to 43.0. Executable sections reduce the burden of unrelated branches and missing verifier or dependency paths, supporting benefits across executor strengths.Source: §B.7 · p. 21
- 50.7 to 79.3 is MiniMax-M2.7’s ALFWorld success-rate increase from Vector Skills to SkillZip; Qwen 3.5 improves from 72.9 to 87.4.SkillZip reaches 97.9 with Kimi K2.5, 99.0 with Claude Sonnet 4.5, 99.1 with Gemini 3 Pro, and 96.4 with gpt-5.2-codex. Relative gains are smaller where Vector Skills already achieves high success rates.Source: §B.7 · p. 21
B.8 Failure Analysis
Remaining failures arise both within SkillZip’s procedural-context stages and after context has been retrieved and hydrated. Retrieval ambiguity and implicit contracts are the main remaining targets for improving SkillZip itself.
B.8 Failure Analysis
- Under the default 1K-skill SkillsBench setting, each failed or repaired trajectory is attributed to its earliest blocking stage to avoid double-counting downstream failures.This separates procedural-context errors from downstream execution errors without recounting an upstream retrieval miss as a contract, hydration, or execution failure.Source: §B.8 · p. 21
- 58% of remaining failures originate in SkillZip-controlled stages, with retrieval contributing 26%, the largest share within this group.Retrieval failures mainly involve ambiguous anchors among closely related skills or required sections missing from the initial candidate set.Source: Figure 7 · p. 21, §B.8 · p. 21
- 18% of remaining failures involve contract extraction, concentrated in implicit preconditions, resource requirements, and underspecified verifier hooks.The analysis identifies implicit contracts, alongside retrieval ambiguity, as the main remaining improvement targets within SkillZip.Source: §B.8 · p. 21
- 14% of remaining failures involve hydration, usually because tight context budgets omit required branches or source expansion occurs too late.The smaller hydration share suggests that reversible source expansion usually limits structural information loss rather than shifting missing context into downstream execution.Source: §B.8 · p. 21
- 42% of failures occur after context retrieval and hydration: agent execution accounts for 33% and infrastructure for 9%.Execution errors include invalid action ordering, tool misuse, and failed recovery after verifier rejection; infrastructure errors include environment, timeout, and tool-interface failures. These require better action control and more reliable execution environments.Source: §B.8 · p. 21
C CASE STUDIES
Three illustrative case studies show how SkillZip resolves retrieval ambiguity, preserves executable contracts during compression, and revises abstractions using execution evidence. These are constructions based on recurring benchmark patterns, not additional quantitative samples.
Case study 1: Resolving skill-level ambiguity
- PathHydrate retrieves the shared ingest routine and row-count verifier with required dependencies, excluding unrelated continuations to reduce context size and retrieval ambiguity.Operation and Verifier anchors capture header normalization and unchanged row count, while dependency closure supplies file-input and schema requirements. Unlike whole-skill retrieval, the hydrated context excludes missing-value repair, pivot aggregation, and competing output rules.Source: C CASE STUDIES · p. 22
Case study 2: Preserving contracts during compression
- MotifZip compresses contract-compatible CSV routines into a reversible macro but rejects the similar workbook routine because formula preservation changes its executable contract.Typed ports, dependencies, resources, and verifier paths determine compatibility: Clean CSV and Pivot Table qualify, whereas Formula-Safe Workbook changes interface, execution-resource, and verification requirements. Accepted occurrences retain source maps and downstream verifier links; pivot aggregation remains outside the macro, connected through its output port.Source: C CASE STUDIES · p. 22
Case study 3: Maintaining compression under library evolution
- ReZip promotes repeated contract-compatible residuals without full recompression and responds to execution risk by splitting macros or increasing default hydration.A new Merge Monthly Reports skill reuses the stable CSV-ingest macro while initially retaining its align periods–merge–balance check residual explicitly. Repeated expansion, repair, or verifier failures localize export-macro risk to formula-bearing workbooks, keeping stable reuse compact and risky procedures source-expanded.Source: C CASE STUDIES · p. 23
D EXPERIMENTAL DETAILS · E DETAILED RELATED WORK · F PROMPTS
These appendices detail SkillZip’s evaluation protocols, comparison controls, metrics, cost accounting, and prompts, distinguishing contract-bearing section macros from whole-skill retrieval and generic compression, and model-assisted extraction and anchoring from deterministic graph operations. They also describe an ALFWorld JSON interface that separates actions from requests for procedural detail, favors acting when the next move is clear, and requires separate placement after state-changing actions when the goal demands it.
D EXPERIMENTAL DETAILS
- 87 SkillsBench [20] tasks and 140 ALFWorld [40] episodes evaluate artifact construction and interactive household execution under matched agent settings.The default uses MiniMax-M2.7, a 1,000-skill library, and procedural-content budgets of 3,000 tokens for SkillsBench and 1,200 for ALFWorld. Benchmark verifiers are withheld from anchoring, retrieval, hydration, and agents, and invoked only after execution.Source: D EXPERIMENTAL DETAILS · pp. 23–24
- Retrieval evaluation projects sections and macros to source skills, preserving retrieval order and deduplicating source IDs so every method shares Ret@k/MRR units.SkillsBench reward measures verifier tests passed, whereas ALFWorld reward measures episode success; CR includes the macro dictionary, and Tok measures final rendered context. Selection budgets precede fixed rendering overhead, indivisible whole skills can exceed them, and CR is measured before restoration while Tok and reward follow restoration.Source: D EXPERIMENTAL DETAILS · pp. 23–24
- Structural and recovery metrics distinguish preserved dependencies and verifier paths from later expansion, source fallback, closure repair, and downstream execution inflation.DPR measures retained required dependencies and VR measures reachable operation-to-verifier paths in the first compact view; fallback follows insufficient macro expansion, while Recover. also includes graph-local closure repair. DI compares paired raw-section executions using repair steps, tool calls, and double-weighted verifier failures, exposing compression that merely shifts work downstream.Source: D EXPERIMENTAL DETAILS · p. 24
- Comparisons preserve baseline disclosure policies while matching task inputs, backbones, executors, and retrieval settings; controlled compression variants isolate contract validation.Baselines include Vanilla Skills, Vector Skills, Graph-of-Skills [24], SkillDAG [1], exact-text deduplication, LLMLingua-2-style compression [32], generic graph grammar, and SkillZip without contract checks. Text compression is tuned to SkillZip’s active-representation ratio, with failed dependency or verifier checks triggering source restoration before execution.Source: D EXPERIMENTAL DETAILS · p. 24
- 1.44 seconds measures local graph construction and MotifZip for 1K skills from cached records, excluding model-assisted extraction and remote inference.Single-process structural timings use the same server and cached-record starting point through 100K skills; nested scaling libraries add only distractors while queries, annotations, embeddings, and retrieval budgets remain fixed. Statistical comparisons use five matched runs, while trajectory-level prompt, cache, completion, and tool-call accounting remains distinct from once-rendered Tok.Source: D EXPERIMENTAL DETAILS · p. 25
E DETAILED RELATED WORK
- SkillZip distinguishes contract-bearing section macros from whole-skill organization, prompt compression, experience abstraction, and generic graph compression.Prior acquisition systems establish durable procedural memory, while Graph-of-Skills [24] and SkillDAG [1] organize whole skills or task-time invocations, and LLMLingua and extensions [10] [11] [32] compress sequences. Building on reversible graph grammars [26] and incremental summaries such as MoSSo [12], SkillZip validates boundary ports, dependency closure, verifier reachability, and source provenance before replacement and budgeted hydration.Source: E DETAILED RELATED WORK · pp. 25–26
F PROMPTS
- Sec2Graph prompts extract source-supported section roles and contracts, then canonicalize cross-section artifact signatures; subsequent graph processing is deterministic.Extraction records inputs, outputs, preconditions, effects, and observable verifier hooks without inventing unsupported fields; normalization shares producer–consumer names without changing section boundaries or provenance. Calls use temperature zero, with 512-token extraction and 2,048-token normalization limits; offline extraction is cached, while task anchoring is cached per task.Source: F PROMPTS · pp. 26–27
- PathHydrate anchors technical and embodied tasks in a common schema while retaining raw wording; benchmark interfaces deliver hydrated context and control source expansion.Technical anchors specify artifacts, capabilities, inputs, and ordered subgoals without verifier access; embodied anchors explicitly recover navigation, pickup, state-change, and placement chains. SkillsBench bounds initial source searches and permits obstacle-driven searches, while ALFWorld returns one admissible action or a detail request that triggers rehydration within the expansion budget.Source: F PROMPTS · pp. 27–28
- Each turn must return exactly one JSON object containing a short thought and either action or expand_request, never both.An action must be an admissible environment action; an expansion request identifies the missing procedural detail.Source: F PROMPTS · p. 28
- The agent should act when the next move is clear, requesting expansion only when hydrated context lacks concrete procedural detail, without inventing tools or commands.The prompt supplies the episode, goal, hydrated executable context, current observation, and admissible actions.Source: F PROMPTS · p. 28
- State-changing actions such as clean, heat, or cool do not place objects; goals requiring placement need a separate placement action.Source: F PROMPTS · p. 28
Related papers
This paper cites
- Voyager: An Open-Ended Embodied Agent with Large Language Models2023
- ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs2023
- ALFRED: A Benchmark for Interpreting Grounded Instructions for Everyday Tasks2019
- LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression2024
- SWE-Skills-Bench: Do Agent Skills Actually Help in Real-World Software Engineering?2026
- SkillNet: Create, Evaluate, and Connect AI Skills2026