WorksComputer Science
Selm: Self-Evolving Library Management for Multi-Skill Agent Optimization
Abstract
Large language model (LLM) agents increasingly use skills as a lightweight way to acquire task-specific knowledge. Recent work enables skills to evolve from task trajectories. However, these methods often lack systematic management of evolved skills, making it difficult for agents to reuse and accumulate skills across domains, thus limiting performance on subsequent tasks.To reliably accumulate, reuse, and maintain useful skills across tasks, we present SELM (Self-Evolving Library Management), a framework that formulates skill evolution as library-level management. SELM jointly manages skill retrieval, updating, and lifecycle by maintaining skill confidence and utility signals. It introduces utility-aware retrieval to select useful skills, a Map-Reduce framework to generate targeted updates from task-specific experience, and lifecycle controls to retain or remove skills based on their effectiveness. These mechanisms enable the skill library to continuously accumulate useful experience while preserving and pruning skills across tasks, improving agent performance on complex tasks across diverse domains. We evaluate SELM on four agent benchmarks covering diverse tasks and execution environments, and SELM consistently outperforms in most settings.
Introduction
Large language model (LLM) agents are increasingly used to solve complex tasks across different domains. To improve agents’ behaviors on specific tasks, recent work introduced skills [3], which are pieces of text that can be plugged into the agent context to provide task-specific knowledge, procedures, or experience. This gives agents a simple way to gain specialized knowledge without additional model training.
Recent work has explored how skills can evolve as the agent runs. Early skills were mostly static: they were written by experts or saved from successful experiences and then kept unchanged [3] (Zhao et al. 2024). More recent methods allow agents to update skills from their execution trajectories [2, 11, 14, 12] (Yang et al. 2026a; Zhang et al. 2026a; Zheng et al. 2025; Zhou et al. 2026; Zhang et al. 2026b). After running tasks, the agent can examine which skill worked or failed, then edit existing skills or create new ones. In this way, skills can change with the agent’s experience and adapt to new tasks and environments.
However, although these evolution methods propose many strategies to evolve skills [2] (Zhang et al. 2026a; Zheng et al. 2025; Zhou et al. 2026; Zhang et al. 2026b), few of them focus on how to manage them. A skill revision that best fits the current round can be harmful to later processes. For instance, a skill that is unused or unhelpful for the present task may be overwritten or discarded; once that change is committed, a later task can never recover the deleted skill. Meanwhile, failed or redundant skills that have remained in the system may still be loaded, giving the agent wrong instructions. The core problem is that existing methods always treat skill updates as separate, one-round edits, rather than managing skills as a dynamic, long-term library. Thus, a skill management library is needed to decide not only how a skill should change, but also which skills should be retrieved, which skills should be updated, and which skills should remain in the library.

Figure 1. Prior skill-evolution methods can overwrite useful procedures or keep weak skills retrievable, causing task failures when experience from different tasks conflicts. SELM instead uses utility-aware retrieval, category-wise Map–Reduce updates, and lifecycle validation to preserve useful skills and retire ineffective ones, enabling more reliable task completion.
To address these limitations, we propose SELM (Self-Evolving Library Management), a framework that manages skills as a library and jointly controls their retrieval, updates and lifecycle. By tracking and leveraging skill confidence and utility, SELM enables the library to evolve with task experience and improves the performance of the agent across complex tasks in different domains.
Specifically, SELM introduces a skill library with explicit mechanisms for managing skill states. To dynamically evaluate skill usefulness, each skill is associated with a confidence score and a utility score. Confidence reflects how strongly the skill is supported by update operations, while utility reflects how useful it has been across tasks. These mechanisms provide a clear basis for deciding which skills should stay active, which skills should be removed, and which failed skills should not be added again. The library can thus keep a skill that is unused on the current task but still useful later, and drop one that keeps failing, instead of committing every local edit, enabling reliable, long-term skill management.
Second, SELM designs a Map-Reduce framework for skill updates. Applying every trajectory to all the skills will make experience from different types of task overwrites each other. SELM therefore groups execution trajectories by task category(Map) and analyzes each group separately, identifying which skills are affected and what changes are needed. It then combines these analyses into operations(Reduce), such as adding new skills, editing existing ones, and deleting those that no longer help. All these operations apply only to the relevant skills and unrelated skills are left unchanged, so a change that helps the current category won’t erase skills required later, which enhances skill effectiveness.
Third, SELM proposes utility-aware skill retrieval. Existing methods mainly retrieve skills based on their semantic relevance to the current task (Yang et al., 2026b), which overlooks whether the skill has been useful in previous tasks. SELM leverages historical utility to enhance skill retrieval. It first selects skills from the same task category and then ranks them by their relevance to the current task and their past usefulness. This helps the agent distinguish skills that are relevant to task on hand and have proven useful through previous execution experience, thus enabling more effective skill selection.
Finally, we evaluate SELM on four agent benchmarks covering diverse execution environments and areas. SELM achieves state-of-the-art results among skill-evolution methods, outperforming both single-document optimization and prior multi-skill baselines without updating model parameters.
Our contributions are (1) introducing a skill library that tracks skill confidence and utility, managing skill validation, retention, and removal, enabling reliable skill management throughout the evolution process; (2) designing a Map-Reduce framework that analyzes trajectories by task category and generates targeted operations, allowing the agent to update relevant skills based on task-specific experience; and (3) developing a utility-aware retrieval method that ranks skills using both task relevance and historical utility, enabling the agent to select skills that are both relevant and useful. Across our experiments, SELM outperforms existing skill optimization methods, demonstrating the effectiveness of the proposed framework.
Related Work
Skill construction and evolution. Recent work has increasingly explored constructing and evolving textual skills from agent experience, moving beyond manually specified or static skill representations [3] (Zhao et al. 2024). More broadly, approaches such as TextGrad (Yuksekgonul et al., 2025) and GEPA [1] optimize textual instructions through feedback without updating model parameters, while Dynamic Cheatsheet [18] and ACE (Zhang et al., 2026c) iteratively refine textual context from agent experience. Building on this paradigm, SkillOpt and SkillGrad optimize a shared skill document or skill package by repeatedly editing textual knowledge based on execution feedback [20] (Yang et al. 2026a). Other approaches distill execution trajectories into standalone lessons, strategic principles, or verified skills, thereby converting individual experiences into reusable knowledge [21, 14, 12, 17] (Zhao et al. 2024). Rather than maintaining a single shared artifact, SkillWeaver (Zheng et al., 2025), EvoSkill [2], SkillEvolver (Zhang et al., 2026a), Memento-Skills (Zhou et al., 2026), and CoEvoSkills (Zhang et al., 2026b) construct collections of specialized skills to capture different task types or capabilities. Complementary approaches construct skills from external domain resources or learn skill-related policies through interaction and co-training [11, 22, 8] (Yang et al. 2026b). Despite these advances, existing methods primarily focus on how skills are created or improved, treating skill evolution as a sequence of local construction or editing operations. This becomes limiting when multiple skills coexist: updates to a shared artifact can introduce conflicting changes, while independently accumulated skills provide limited mechanisms for determining which skills should be updated.
Skill library management. Early work such as Voyager [19] and ExpeL (Zhao et al., 2024) retrieves executable or experiential knowledge according to the relevance of the current task. Subsequent systems make skill selection more behavior-aware and introduce mechanisms for validating candidate skills or deciding whether updates should be merged, accepted, or discarded (Zhou et al., 2026; Yang et al., 2026a,b; Alzubi et al., 2026; Zhang et al., 2026b; Qiu et al., 2026). More recent work explicitly considers the maintenance of the skill library itself. SkillOps studies how an existing skill collection can be periodically reorganized to address issues that emerge as the library grows [16], while MUSE-Autokill organizes skill creation, catalog retrieval, per-skill memory, and test-driven refinement into successive lifecycle stages [10]. Lifelong evaluations further suggest that usage frequency alone is insufficient to characterize the utility of a skill, motivating more explicit utility-aware management (Zhang et al., 2026d). However, these approaches generally address retrieval, validation, update selection, or lifecycle maintenance as separate mechanisms, rather than jointly optimizing them as coupled decisions over a continually evolving skill library.
Preliminary
This section introduces the basic concepts of skills, skill retrieval, and skill evolution.
Skill. The -th skill is represented as
where , , , , and denote the skill name, description, instruction content, trigger conditions, and task category, respectively.
As the number of skills grows, they form a skill library, which is a collection of reusable skills that the agent can draw on for different tasks. Formally,
Skill retrieval. The agent does not need to use the entire library for every task. Given a task , a retrieval mechanism selects a subset of skills from the library to provide relevant instructions for the task. We denote the retrieved skill set as
The selected skills are then provided to the agent as part of its context before task execution.
Evolving skills. With frozen target model and current library, the agent runs on task , and the resulting experience is written back so that the same library can improve over iterations. represents the score of library on task . Given training, selection, and test splits , , and , evolution proposes libraries from and keeps the one that scores best on . Formally,
where is the set of libraries obtained by evolving on the training split. The score and the operators that map trajectories to library edits are instantiated in § 4.
CRUD operations. CRUD is an operational concept in databases for managing persistent records. It stands for Create, Read, Update, and Delete. We migrate this concept to skill management. In this paper, the library operations are ADD, EDIT, UPVOTE, DOWNVOTE, and DELETE: ADD creates a new skill, EDIT revises an existing skill, UPVOTE and DOWNVOTE adjust its confidence, and DELETE removes it from the active library.
Method
SELM freezes the target model and optimizes only the skill library. At each iteration, the agent retrieves a small set of skills from the current library, uses them to solve a batch of training tasks, and converts the resulting trajectories into library updates. The updated library is then evaluated on the selection set and retained only when it passes the validation gate. This iterative process jointly improves skill retrieval, skill updates, and library quality, with the overall procedure summarized in Algorithm 1 (Appendix § 7).
For each skill, SELM manages it through two pieces of information: confidence score and utility score. The confidence score reflects how strongly a skill should be retained based on update operations, while the utility score records how useful the skill has been across tasks. These two scores support different stages of the library evolution process: confidence is updated by UPVOTE/DOWNVOTE operations and used for lifecycle control, while utility is used to guide skill retrieval and updated from execution outcomes. Their corresponding update mechanisms are described in § 4.1 and § 4.2, respectively.
Utility-Aware Skill Retrieval
SELM retrieves skills by jointly considering task category, task relevance, and historical utility. For each task , let denote its task category. SELM first constructs a candidate set from the active skill set , retaining skills whose categories match or are marked as “general”. It then ranks the candidates using a utility-aware retrieval score and selects the top- skills for injection. Formally,
where measures the relevance between skill and task using semantic and keyword-based matching, and is the historical utility of the skill. The coefficient controls the contribution of historical utility.

Figure 2. Overview of SELM. The frozen agent retrieves skills by relevance and utility, executes tasks, and turns trajectories into category-wise Map–Reduce updates. Candidate skills are validated on a held-out set; accepted skills remain in the library, and low-utility skills are retired to a graveyard that blocks their names from returning.
The top- skills are selected for task :
The selected skills are injected into the agent context before execution. This retrieval strategy favors skills that are both relevant to the current task and useful based on previous execution results.
Utility Feedback. The utility score measures how useful a skill has been on the tasks that used it. Let denote the set of tasks whose retrieved skill set contains . The average reward of in the current update is
We update the utility using an exponential moving average (EMA)
where controls the contribution of new observations. The same utility score is then used by the retrieval mechanism in the next iteration. Thus, utility provides a feedback signal across successive retrieval rounds: execution outcomes update the utility of the skills that were used, and the resulting utility is subsequently incorporated into retrieval, reducing the selection of ineffective skills and improving agent performance across tasks.
Skill Library Evolution
After retrieving skills for each task, SELM runs the frozen target model and uses the resulting trajectories to update the skill library. The update process consists of four steps: rollout, trajectory analysis, CRUD synthesis, and candidate construction.
Rollout and Reward. For each training task , the selected skills are injected into the agent context. Given the frozen target model and execution harness , the rollout produces a trajectory and task scores:
where indicates whether the task is fully solved, and measures partial progress in two ways: When the task is judged by multiple checks, and only when every check passes. When a task is judged by comparing a prediction with a reference answer, is their token-level overlap and is exact match.
The reward used for library optimization is obtained from these task scores:
where
Each rollout therefore yields two signals for library evolution. The trajectory is the execution evidence, including the agent’s actions, tool calls, intermediate outputs, and errors. The scalar reward shows how much of the task was solved. Later updates read to decide what to change, and use to decide which trajectories are worth changing from.
Trajectory Selection. SELM prioritizes trajectories whose observed rewards differ substantially from the historical utility of the retrieved skills. For task , we compute the average utility of its retrieved skills:
and define the diagnostic priority as
SELM selects the highest-priority trajectories for further analysis. Trajectories with large provide stronger evidence that the retrieved skills may need to be updated. is the library’s current belief about those skills, and a large gap means the observed reward may contradict that belief. A much higher shows a successful pattern that the stored utility under-credits, and a much lower shows that the retrieved guidance failed on this task. A small gap means the rollout agrees with the existing record, so it adds little new information about what to change.
Map—Category-wise Analysis. The selected trajectories are partitioned by task category and analyzed independently. For each category, a TrajectoryAnalyst identifies successful patterns, failure patterns, and new insights from the corresponding trajectories. The analysis prevents experience from unrelated task categories from being directly mixed during skill updates.
Reduce—Skill update. Given the category-wise trajectory analyses and the current skill library, a SkillSynthesizer generates a bounded set of CRUD operations. The synthesizer considers the current skill content, confidence, utility, and category-specific execution feedback when deciding how to update the library.
Given a set of trajectories, SELM updates the library through the CRUD operations introduced in § 3:
For an existing skill , the confidence score is updated as
The generated operations are applied to the relevant skills:
When a category exhibits recurring failure patterns, the synthesizer can also create new skills that describe strategies for avoiding these failures. The resulting candidate library is then passed to the validation stage.
Multi-timescale Updates. Following prior work on iterative skill evolution (Yang et al. (2026a)), SELM uses both fast and slow updates. Fast updates are performed after each training batch to incorporate recent trajectory feedback, while slow updates are performed less frequently across epochs to consolidate changes that persist over time. We also allow slow updates to produce meta skills, which summarize persistent cross-skill patterns identified across an epoch. This allows the library to respond to recent task feedback while reducing unnecessary updates caused by short-term fluctuations.
Skill Lifecycle Management
SELM treats skill maintenance as an explicit lifecycle process, using validation, utility tracking, and retirement mechanisms to prevent ineffective skills from accumulating or re-entering the library. Throughout optimization, the active set of and the graveyard obey three structural invariants:
Capacity bounds the store; uniqueness forbids duplicate names in ; graveyard blocking forbids reintroducing a retired name.
Validation. A candidate update is not directly added to the active library. SELM first evaluates the candidate library on the selection set using the frozen target model and the same execution harness. Its validation score is
The candidate library is retained only when it improves the validation performance over the current library. This validation gate prevents updates that appear reasonable from the trajectory analysis but reduce the actual task performance from being incorporated into the library.
Pruning and Graveyard. SELM sets a threshold for utility score. For skill , if or , it will be retired from the active set and moved to the graveyard . Retired skills are excluded from future retrieval and cannot simply be reintroduced under the same identity. This prevents ineffective skills from repeatedly entering and leaving the library and keeps the active library compact.
Experiments
We evaluate SELM as a library-level optimizer for frozen agents. The experiments answer three questions. (i) Does a managed skill library improve over no skill, static skills, prompt evolution, single-document skill optimization, and recent multi-skill methods? (ii) Does that comparison hold across different models? (iii) Which library-management controls are required for the gains?
Experimental Setup
Baselines. We compare against No skill; Human skill (an expert-written document per benchmark); LLM skill (a one-shot skill from Claude-Opus-4.6 that is never updated); prompt-evolution GEPA [1]; skill-construction methods SkillEvolver (Zhang et al., 2026a), Memento-Skills (Zhou et al., 2026), and Trace2Skill [14]; single-document SkillOpt (Yang et al., 2026a); and, under Claude Code, folder-based EvoSkill [2]. EvoSkill is omitted from the no-harness block because it assumes a SKILL.md package layout. Qwen3-30B-A3B is evaluated only without a harness.
Benchmarks. We use four datasets: SkillsBench [9], SpreadsheetBench [13], OfficeQA [15], and LiveMath [7]. Detailed descriptions are in Appendix § 8.
Target models. We use Claude-Opus-4.6 [5], DeepSeek-V4-Pro [6], and Qwen3-30B-A3B [23] as frozen target models. Claude and DeepSeek are evaluated both without a harness and inside Claude Code [3]; Qwen3-30B-A3B is evaluated only without a harness. No-harness runs prepend retrieved skills to the system prompt. Claude Code loads skills through the native agent workspace. All methods in a given cell use the same target model, harness, and scorer.
Hyperparameters. Hyperparameters are reported in Appendix § 9.
Main Results
Table 1 shows that SELM consistently improves agent performance across different benchmarks and target models. Compared with no-skill baseline and existing skill optimization methods, SELM achieves substantial gains in both no-harness and Claude Code settings, demonstrating the effectiveness of managing skills as a structured library rather than optimizing a single shared document. The improvements are also consistent across Claude-Opus-4.6, DeepSeek-V4-Pro, and Qwen3-30B-A3B, suggesting that the benefit of library-level optimization is not tied to a specific target model. Meanwhile, Static human-written skills and one-shot LLM skills provide only limited improvements, while trajectory-driven methods perform better but remain below SELM. This indicates that the main benefit comes from continuously managing which skills should be retrieved, updated, and retired. In particular, the advantage is more pronounced in heterogeneous settings such as SkillsBench, where task-specific feedback can conflict when compressed into a single skill document.
Table 1: Main results on SkillsBench, OfficeQA, SpreadsheetBench, and LiveMath. SkillsBench reports soft/hard accuracy (%); other rows are accuracy (%). The best cell in each row within a model block is bold and shaded purple; the second-best cell is shaded a lighter purple. Note: Qwen3-30B-A3B failed all the tasks on SkillsBench, so the Hard Acc is not included.
| Benchmark | No skill | Human skill | LLM skill | GEPA | SkillEvolver | Memento-Skills | SkillOpt | Trace2Skill | SELM | |
| Claude-Opus-4.6 | ||||||||||
| SkillsBench | Soft Acc | 40.4 | 45.3 | 44.8 | 56.4 | 59.3 | 66.1 | 62.7 | 52.4 | 69.8 |
| Hard Acc | 31.5 | 36.3 | 34.5 | 41.8 | 43.6 | 48.2 | 46.0 | 40.2 | 50.7 | |
| OfficeQA | Acc | 45.3 | 49.7 | 47.5 | 53.1 | 54.6 | 59.5 | 56.4 | 51.2 | 62.8 |
| SpreadsheetBench | Acc | 44.3 | 46.1 | 45.8 | 49.6 | 52.5 | 54.3 | 51.3 | 48.3 | 56.8 |
| LiveMath | Acc | 35.2 | 36.8 | 37.4 | 41.5 | 50.8 | 56.0 | 56.9 | 46.5 | 61.3 |
| DeepSeek-V4-Pro | ||||||||||
| SkillsBench | Soft Acc | 21.1 | 30.3 | 25.7 | 36.9 | 39.5 | 44.2 | 43.9 | 34.3 | 45.5 |
| Hard Acc | 13.1 | 19.9 | 16.5 | 26.5 | 28.4 | 32.7 | 31.8 | 25.0 | 34.2 | |
| OfficeQA | Acc | 33.2 | 36.6 | 35.4 | 41.2 | 42.5 | 46.8 | 44.3 | 40.7 | 48.9 |
| SpreadsheetBench | Acc | 32.9 | 33.6 | 34.9 | 37.8 | 38.6 | 41.2 | 39.7 | 38.1 | 42.4 |
| LiveMath | Acc | 27.4 | 28.6 | 28.1 | 31.2 | 34.8 | 37.5 | 36.2 | 32.0 | 39.4 |
| Qwen3-30B-A3B | ||||||||||
| SkillsBench | Soft Acc | 16.4 | 17.5 | 16.9 | 17.8 | 18.5 | 19.8 | 19.2 | 17.9 | 20.5 |
| OfficeQA | Acc | 25.8 | 27.6 | 26.1 | 28.0 | 28.9 | 30.8 | 28.6 | 30.2 | 32.5 |
| SpreadsheetBench | Acc | 30.0 | 30.0 | 30.0 | 30.6 | 31.0 | 33.8 | 31.5 | 30.8 | 36.4 |
| LiveMath | Acc | 23.6 | 24.1 | 23.9 | 25.8 | 27.5 | 30.2 | 28.4 | 26.2 | 33.1 |
| Claude Code harness | ||||||||||
| Benchmark | No skill | Human skill | LLM skill | GEPA | SkillEvolver | Memento-Skills | EvoSkill | SkillOpt | SELM | |
| Claude-Opus-4.6 | ||||||||||
| SkillsBench | Soft Acc | 51.4 | 61.1 | 59.2 | 72.5 | 76.8 | 81.2 | 79.5 | 80.2 | 82.8 |
| Hard Acc | 40.0 | 46.6 | 43.9 | 52.9 | 56.5 | 59.8 | 59.0 | 58.3 | 60.9 | |
| OfficeQA | Acc | 57.6 | 61.2 | 60.4 | 66.5 | 69.8 | 74.8 | 75.4 | 71.5 | 73.1 |
| SpreadsheetBench | Acc | 19.7 | 34.7 | 33.2 | 55.3 | 72.6 | 78.7 | 66.7 | 80.0 | 81.5 |
| LiveMath | Acc | 38.5 | 42.0 | 42.8 | 46.0 | 51.5 | 54.4 | 50.2 | 53.7 | 57.8 |
| DeepSeek-V4-Pro | ||||||||||
| SkillsBench | Soft Acc | 28.8 | 34.0 | 32.6 | 42.6 | 46.3 | 50.1 | 49.0 | 50.4 | 51.6 |
| Hard Acc | 19.4 | 22.1 | 20.5 | 27.8 | 29.5 | 33.3 | 30.9 | 33.8 | 35.1 | |
| OfficeQA | Acc | 38.9 | 43.1 | 41.5 | 44.0 | 46.2 | 48.8 | 48.3 | 45.9 | 50.0 |
| SpreadsheetBench | Acc | 24.7 | 30.8 | 31.2 | 38.5 | 41.7 | 44.9 | 42.8 | 46.0 | 46.9 |
| LiveMath | Acc | 29.5 | 32.0 | 31.5 | 35.2 | 38.6 | 41.5 | 39.0 | 40.8 | 39.4 |
Table 1.
Ablation Study
We ablate three aspects of SELM: library-management components, utility estimation, and optimizer–target model interaction. We first remove individual management mechanisms, including validation, utility-aware retrieval, meta skills, slow updates, and the graveyard. We then vary the EMA decay factor to examine the sensitivity of utility estimation. Finally, we vary the optimizer and target models to study how optimizer capability affects the resulting skill library. Unless otherwise specified, the experiments follow the default configuration.
Library-management controls are critical to the effectiveness of skill evolution. Table 2 shows that removing the validation gate causes the largest single drop, while removing the utility score and utility-aware retrieval reduces only 2.9 points. Removing both meta skills and slow updates also leads to a large degradation, compared with 53.1% when removing meta skills alone. The graveyard provides a smaller but consistent gain, with accuracy dropping to 50.4% without it. These results show that validation, utility-aware selection, and longitudinal library updates are important for preventing ineffective skill changes from accumulating.
Table 2: Component ablation on SpreadsheetBench (Claude-Opus-4.6, no harness). w/o: without.
| Setting | Acc (%) |
| Full (default) | 56.5 |
| w/o meta skill | 53.1 |
| w/o meta skill + slow update | 42.7 |
| w/o utility score | 46.3 |
| w/o utility-aware retrieval () | 49.2 |
| w/o validation gate | 42.5 |
| w/o graveyard | 50.4 |
Table 2.
SELM is relatively insensitive to the EMA decay factor around the default setting. As shown in Figure 3(a), achieves 56.5% accuracy, while and 0.6 obtain 55.1% and 55.3%, respectively. More extreme values, and 0.8, reduce accuracy to 52.4% and 53.1%. This indicates that the performance gain is not dependent on a narrowly tuned smoothing coefficient.

Figure 3. (a) Sensitivity to the EMA decay on SpreadsheetBench (Claude-Opus-4.6, no harness); the marked default is . (b) SkillsBench soft accuracy (%) for each target model under different optimizers , including the no-skill baseline (no harness).
A stronger optimizer generally produces a more effective skill library, while weaker optimizers can still benefit stronger target models. Figure 3(b) shows that, with Qwen3-30B-A3B as the target, replacing the optimizer with DeepSeek-V4-Pro and Claude-Opus-4.6 increases soft accuracy from 20.45% to 24.75% and 31.34%, respectively. The same trend holds for DeepSeek-V4-Pro as the target. Meanwhile, using Qwen3-30B-A3B as the optimizer still improves Claude-Opus-4.6 from the no-skill baseline.
Library Evolution Analysis
Table 3 shows how the skill library changes during evolution on SpreadsheetBench with Qwen3-30B-A3B. The initial library contains 5 skills and achieves 17.5% accuracy on the selection set. In Epoch 1, five new skills are added, but the accuracy remains unchanged. This shows that simply adding more skills does not improve performance. In Epoch 2, only two new skills are added while four skills are downvoted, and the accuracy increases to 30.0%. The slow update then makes two edits, adds two meta skills, and downvotes two more skills. Three skills are eventually moved to the graveyard because their confidence becomes non-positive, and they are therefore excluded from future retrieval. The final library achieves 36.43% accuracy, compared with 30.0% for the no-skill baseline. These changes show that the library does not improve simply by growing in size; useful skills are added, while skills that repeatedly receive negative feedback are removed or revised.
Table 3: Skill library evolution on SpreadsheetBench (Qwen3-30B-A3B, no harness). Init and epoch accuracies are on ; Final is held-out test.
| Epoch | Active | ADD | EDIT | DOWNVOTE | Graveyard | Acc. (%) |
| Init | 5 | – | – | – | 0 | 17.5 |
| 1 | 10 | 5 | 0 | 3 | 0 | 17.5 |
| 2 | 11 | 2 | 0 | 4 | – | 30.0 |
| Slow update | 11 | 2 | 2 | 2 | 3 | – |
| Final | 11 | 9 (total) | 2 (total) | 9 (total) | 3 | 36.43 |
Table 3.
Conclusion
We propose SELM, a framework that manages skills as a library. SELM tracks skill confidence and utility, validates skill updates, and retires failed skills. Through the Map-Reduce framework and utility-aware retrieval, SELM helps the agent select the most relevant and effective skills. Various experiments validate that SELM consistently improves frozen agents over prior skill-optimization methods and achieves the strongest performance in most settings.
Iterative Library Evolution Algorithm
Algorithm 1 summarizes the SELM loop in §4: utility-aware retrieval and rollout, diagnostic trajectory selection, Map–Reduce CRUD synthesis, validation gating, pruning to the graveyard, and slow updates.
Benchmark Details
We evaluate on four agent benchmarks covering heterogeneous domains, procedural tool use, long-context document reasoning, and mathematical problem solving.
SkillsBench [9]: a multi-domain benchmark with 8 task categories (cybersecurity, data analysis, finance-economics, hardware engineering, natural science, social science, software engineering, and one general category). SkillsBench reports both hard accuracy and soft accuracy, corresponding to and in § 4.1.
SpreadsheetBench [13]: spreadsheet manipulation requiring multi-step formula generation and cell-level operations.
OfficeQA [15]: a grounded reasoning benchmark built from U.S. Treasury Bulletins with a corpus of approximately 89,000 pages.
LiveMath [7]: LiveMathematicianBench(LiveMath), a live mathematician-level reasoning benchmark, abbreviated LiveMath in tables.
The last three benchmarks report a single accuracy.
Hyperparameter Summary
| Hyperparameter | Description | Default |
| Maximum library capacity | 30 | |
| Utility weight in retrieval scoring | 0.6 | |
| soft score weight in reward calculating | 0.5 | |
| EMA decay factor for utility update | 0.4 | |
| Soft threshold for success classification | 0.3 | |
| Maximum graveyard capacity | 50 | |
| Max ADD operations per evolution step | 5 | |
| Max EDIT operations per evolution step | 3 | |
| Number of skills retrieved per task | 3 | |
| Trajectory selection budget | 50 | |
| Slow update sample size | 20 | |
| threshold for utility score | 0.05 | |
| Injection budget | Max characters for skill injection | 2000 |
| Fail compression | Max chars for failed trajectories | 2000 |
| Success compression | Max chars for successful trajectories | 400 |
| Map parallelism | Max parallel TrajectoryAnalyst workers | 16 |
Table 4. Complete hyperparameter summary with default values.
Skill Library Example
Figures 4–7 reproduce four skills from the optimized SpreadsheetBench library (Qwen3-30B-A3B, no harness; 11 active skills, test accuracy 36.43%), one from each remaining category. Text is the full library snapshot, not a truncation.

Figure 4. A general skill from the optimized SpreadsheetBench library.

Skill: dynamic_date_handling
Category. cell_level Confidence. 2 Utility. 0.44 Description. Handle dynamic date ranges and exclude weekends/holidays in formulas. Trigger conditions. When tasks involve date-range calculations with dynamic inputs or require exclusion of non-business days. Content.
Use DATE functions to define start and end dates.
Use NETWORKDAYS or custom logic to exclude weekends.
Include holiday lists if provided.
Use IF statements to validate date ranges.
Test with sample data to ensure accuracy.
Figure 5. A cell-level skill from the optimized SpreadsheetBench library.

Skill: inter_sheet_data_matching
Category. sheet_level Confidence. 2 Utility. 0.44 Description. Handle data matching and manipulation across multiple sheets. Trigger conditions. When tasks require data from multiple sheets to be compared, combined, or processed. Content.
Use VBA to reference data from other sheets.
Use loops and conditionals to match data.
Use error handling to prevent runtime issues.
Test with different data structures.
Use message boxes to provide feedback on results.
Figure 6. A sheet-level skill from the optimized SpreadsheetBench library.

Skill: slow_update_epoch_02
Category. meta Confidence. 3 Utility. 0.70 Description. Epoch-level guidance from epoch 2 slow update. Trigger conditions. None; produced by the epoch-level slow update and managed by the same utility and lifecycle rules as ordinary skills. Content.
ADD:
meta_insight_epoch_2— Identified patterns of persistent failures and regressions, highlighting the need for better handling of dynamic data, text parsing, and formula execution in VBA. Content: Focus on improving dynamic data handling, text parsing, and formula execution. Address issues with date handling, string matching, and VBA macro behavior. Prioritize skills that were downvoted or showed persistent failure.EDIT:
dynamic_column_handlingEDIT:
advanced_text_parsing_in_vbaDOWNVOTE:
text_matching_strategies(Showed persistent failure in text comparison and filtering tasks, indicating a need for re-evaluation of its implementation and use cases.)DOWNVOTE:
vba_data_preservation(Caused regression in data preservation tasks, suggesting potential issues with how it handles macro execution and data integrity.)
Figure 7. A meta skill produced by the epoch-level slow update.
Limitations and Future Work
Semantic deduplication. The graveyard mechanism operates at the name level (exact string match), preventing exact-name oscillation but not semantically equivalent skills with different names from coexisting. Embedding-based similarity detection would be a natural extension.
Cross-environment transfer. A skill library optimized on one benchmark could potentially warm-start optimization on another, analogous to transfer learning in neural networks. We leave exploration of cross-benchmark transfer to future work.
Scalability. While we demonstrate effectiveness with up to 30 skills across 8 categories, scaling to hundreds of categories or thousands of skills would require more sophisticated indexing (e.g., embedding-based retrieval) and potentially hierarchical library organization.
Optimizer model dependence. The quality of evolution depends on the optimizer LLM’s ability to analyze trajectories and synthesize CRUD operations. Weaker optimizer models may produce lower-quality operations, and the interaction between optimizer capability and library quality deserves systematic study.
Algorithm 1 SELM — Iterative Library Evolution
Require: Frozen target model , execution harness , training split , selection split , epochs , retrieval budget , trajectory budget , EMA coefficient , utility weight , retirement threshold , maximum capacity
initial skill library ▷ empty or seed skills
▷ graveyard starts empty
▷ snapshot kept for export
▷ score on
for do
for each training batch ▷ one fast update do
▷ block retired names
for each task do
Let be the category of
▷ utility-aware retrieval
▷ rollout
▷ scalar reward
▷ gap from stored utility
end for
Select the top- trajectories according to ▷ most informative traces
for each skill used in the current batch do
▷ EMA utility
end for
Partition selected trajectories by task category ▷ Map
for each category do
▷ success, failure, insights
end for
▷ Reduce; operation budgets
▷ candidate library
Evaluate ▷ validation gate
if then
▷ accept only if improved
end if
if then
▷ keep the best snapshot
end if
end for
if slow update is scheduled at epoch ▷ less frequent than fast updates then
Generate additional CRUD operations ▷ consolidate persistent trends
Validate on ▷ same gate as the fast update
if then
end if
if then
end if
end if
Lifecycle pruning:
for each do
if or ▷ low utility or non-positive confidence then
▷ retire; name cannot return
end if
end for
Enforce ▷ graveyard capacity
Enforce , name uniqueness, and graveyard blocking
end for
return ▷ not necessarily the last
References
- [1]Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong, Arnav Singhvi, Herumb Shandilya, Michael J Ryan, Meng Jiang, Christopher Potts, Koushik Sen, Alex Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, and Omar Khattab. Gepa: Reflective prompt evolution can outperform reinforcement learning. In C. Vondrick, B. Hariharan, C. Raffel, L. Pinto, D. Yang, and A. Faust (eds.), International Conference on Learning Representations, volume 2026, pp. 8479–8565, 2026. URL https://proceedings.iclr.cc/paper_files/paper/2026/file/0e9e708b6f48e14fd0ac29e167413f76-Paper-Conference.pdf.arxiv.org/abs/2507.19457
- [2]Salaheddin Alzubi, Noah Provenzano, Jaydon Bingham, Weiyuan Chen, and Tu Vu. Evoskill: Automated skill discovery for multi-agent systems, 2026. URL https://arxiv.org/abs/2603.02766.
- [3]Anthropic. Equipping agents for the real world with agent skills, oct 2025. URL https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills. Engineering blog, 16 October 2025.
- [5]Anthropic. Introducing claude opus 4.6, feb 2026. URL https://www.anthropic.com/research/claude-opus-4-6.
- [6]DeepSeek-AI. Deepseek-v4: Towards highly efficient million-token context intelligence, 2026. URL https://arxiv.org/abs/2606.19348.
- [7]Linyang He, Qiyao Yu, Hanze Dong, Baohao Liao, Xinxing Xu, Micah Goldblum, Jiang Bian, and Nima Mesgarani. Livemathematicianbench: A live benchmark for research-level mathematical reasoning with proof sketches, 2026. URL https://arxiv.org/abs/2604.01754.
- [8]Guanyu Jiang, Zhaoch en Su, Xiaoye Qu, and Yi R. Fung. Xskill: Continual learning from experience and skills in multimodal agents, 2026. URL https://arxiv.org/abs/2603.12056.
- [9]Xiangyi Li, Yimin Liu, Wenbo Chen, Bingran You, Zonglin Di, Yifeng He, Shenghan Zheng, Kyoung Whan Choe, Jiankai Sun, Shuyi Wang, Chujun Tao, Binxu Li, Xuandong Zhao, Hejia Geng, Xiaojun Wu, Junwei Zhou, Xiaokun Chen, Hanwen Xing, Yubo Li, Ounhong Zeng, Di Wang, Yuanli Wang, Roey Ben Chaim, Penghao Jiang, Haotian Shen, Luyang Kong, Xinyi Liu, Runhui Wang, Xuanqing Liu, Jiachen Li, Xin Lan, Yueqian Lin, Wengao Ye, Junwei He, Songlin Li, Yue Zhang, Yipeng Gao, Yijiang Li, Ze Ma, Liqiang Jing, Tianyu Wang, Kaixin Li, Yiqi Xue, Haoran Lyu, Yizhuo He, Yuchen Tian, Shoutong Wu, Bowei Wang, Yixuan Gao, Bo Chen, Litong Liu, Sikai Cheng, Jiajun Bao, Shuaicheng Tong, Shuwen Xu, Terry Yue Zhuo, Tinghan Ye, Qi Qi, Miao Li, Longtai Liao, Zelin Tan, Chang Shi, Xilin Tang, Srinath Tankasala, Boqin Yuan, Yaoyao Qian, Jianhong Tu, Chunguang Wang, Yizhou Sun, Wei Wang, Aaron Taylor, Ziyue Yang, Changkun Guan, Zhikang Dong, Xinyu Zhang, Steven Dillmann, Han chung Lee, and Dawn Song. Skillsbench: Benchmarking how well agent skills work across diverse tasks, 2026. URL https://arxiv.org/abs/2602.12670.
- [10]Huawei Lin, Peng Li, Jie Song, Fuxin Jiang, and Tieying Zhang. Muse-autoskill: Self-evolving agents via skill creation, memory, management, and evaluation, 2026. URL https://arxiv.org/abs/2605.27366.
- [11]Xingyan Liu, Xiyue Luo, Linyu Li, Ganghong Huang, Jianfeng Liu, and Honglin Qiao. Skillforge: Forging domain-specific, self-evolving agent skills in cloud technical support. In Proceedings of the 49th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’26, pp. 4763–4768, New York, NY, USA, 2026. Association for Computing Machinery. ISBN 9789400725999. doi: 10.1145/3805712.3808466. URL https://doi.org/10.1145/3805712.3808466.
- [12]Yuchen Ma, Yue Huang, Han Bao, Haomin Zhuang, Swadheen Shukla, Michel Galley, Xiangliang Zhang, and Stefan Feurriegel. Skillgen: Verified inference-time agent skill synthesis, 2026. URL https://arxiv.org/abs/2605.10999.
- [13]Zeyao Ma, Bohan Zhang, Jing Zhang, Jifan Yu, Xiaokang Zhang, Xiaohan Zhang, Sijia Luo, Xi Wang, and Jie Tang. Spreadsheetbench: Towards challenging real world spreadsheet manipulation. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 94871–94908. Curran Associates, Inc., 2024. doi: 10.52202/079017-3007. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/ac840df270ac537dd74530a15c332684-Paper-Datasets_and_Benchmarks_Track.pdf.DOI
- [14]Jingwei Ni, Yihao Liu, Xinpeng Liu, Yutao Sun, Mengyu Zhou, Pengyu Cheng, Dexin Wang, Erchao Zhao, Xiaoxi Jiang, and Guanjun Jiang. Trace2skill: Distill trajectory-local lessons into transferable agent skills, 2026. URL https://arxiv.org/abs/2603.25158.
- [15]Krista Opsahl-Ong, Arnav Singhvi, Jasmine Collins, Ivan Zhou, Cindy Wang, Ashutosh Baheti, Owen Oertell, Jacob Portes, Sam Havens, Erich Elsen, Michael Bendersky, Matei Zaharia, and Xing Chen. Officeqa pro: An enterprise benchmark for end-to-end grounded reasoning, 2026. URL https://arxiv.org/abs/2603.08655.
- [16]Hongji Pu, Xinyuan Song, and Liang Zhao. Skillops: Managing llm agent skill libraries as self-maintaining software ecosystems, 2026. URL https://arxiv.org/abs/2605.13716.
- [17]Libin Qiu, Zhirong Gao, Junfu Chen, Yuhang Ye, Liangyu Li, Weizhi Huang, Xiaobo Xue, Wenkai Qiu, and Shuo Tang. Autorefine: Compiling trajectories into validated typed agent artifacts, 2026. URL https://arxiv.org/abs/2601.22758.
- [18]Mirac Suzgun, Mert Yuksekgonul, Federico Bianchi, Dan Jurafsky, and James Zou. Dynamic cheat-sheet: Test-time learning with adaptive memory. In Vera Demberg, Kentaro Inui, and Lluís Marquez (eds.), Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 7080–7106, Rabat, Morocco, 2026. Association for Computational Linguistics. doi: 10.18653/v1/2026.eacl-long.333. URL https://aclanthology.org/2026.eacl-long.333/.DOI
- [19]Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar. Voyager: An open-ended embodied agent with large language models, 2023. URL https://arxiv.org/abs/2305.16291.
- [20]Hanyu Wang, Yifan Lan, Bochuan Cao, Lu Lin, and Jinghui Chen. Skillgrad: Optimizing agent skills like gradient descent, 2026. URL https://arxiv.org/abs/2605.27760.
- [21]Rong Wu, Xiaoman Wang, Jianbiao Mei, Pinlong Cai, Daocheng Fu, Cheng Yang, Licheng Wen, Xuemeng Yang, Yufan Shen, Yuxin Wang, and Botian Shi. Evolver: Self-evolving llm agents through an experience-driven lifecycle. 2026. URL https://arxiv.org/abs/2510.16079.
- [22]Peng Xia, Jianwen Chen, Hanyang Wang, Jiaqi Liu, Kaide Zeng, Yu Wang, Siwei Han, Yiyang Zhou, Xujiang Zhao, Haifeng Chen, Zeyu Zheng, Cihang Xie, and Huaxiu Yao. Skillrl: Evolving agents via recursive skill-augmented reinforcement learning, 2026. URL https://arxiv.org/abs/2602.08234.
- [23]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chenguang Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jing Zhou, Jingren Zhou, Junyang Lin, Kai Dang, Keqin Bao, Kexin Yang, Le Yu, Lianghao Deng, Mei Li, Minfeng Xue, Mingze Li, Pei Zhang, Peng Wang, Qin Zhu, Rui Men, Ruize Gao, Shixuan Liu, Shuang Luo, Tianhao Li, Tianyi Tang, Wenbiao Yin, Xingzhang Ren, Xinyu Wang, Xinyu Zhang, Xuancheng Ren, Yang Fan, Yang Su, Yichang Zhang, Yinger Zhang, Yu Wan, Yuqiong Liu, Zekun Wang, Zeyu Cui, Zhenru Zhang, Zhiping Zhou, and Zihan Qiu. Qwen3 technical report, 2025. URL https://arxiv.org/abs/2505.09388.