SkillCAT: Contrastive Assessment and Topology-Aware Skill Self-Evolution
for LLM Agents
June 11, 2026
Skill self-evolution methods for LLM agents aim to turn execution trajectories into reusable skill documents, but current pipelines typically learn from one trajectory per task, merge candidate skill patches before checking them, and load the full skill corpus before inference. We propose SkillCAT, a training-free framework that separates this process into three stages. Contrastive Causal Extraction (CCE) samples multiple trajectories for each task and compares same-task success/failure pairs to identify evidence that explains outcome differences. Assessment-Augmented Evolution (AAE) replays each candidate patch on source-task clones and keeps only patches that improve or preserve task outcomes before hierarchical skill patch merging. Topology-Aware Task Execution (TTE) compiles the evolved skills into a routable sub-skill topology, so inference loads only the capability nodes relevant to the task. We evaluate SkillCAT on common agent benchmarks, including SpreadsheetBench, WikiTableQuestions, and DocVQA, and further test cross-model and out-of-distribution generalization. Across these settings, SkillCAT raises the average score over baselines by up to 40.40%, demonstrating reliable skill evolution without model training.
Large language model (LLM) based agents often rely on external skill documents at execution time, such as structured instructions, tool-use rules, and task experience injected into the context. These skills help agents complete long-horizon tasks without updating model weights [1]–[5]. Early skill libraries were mostly hand-authored; recent work instead extracts and refines skills from agent trajectories, commonly called skill self-evolution [6]–[10].
Early skill self-evolution methods usually follow sequential update loop: each new trajectory edits the current skill once, and the pipeline then moves to the next trajectory [9]–[13]. This procedure is simple, but later edits can have diminishing returns and may accumulate noise or overwrite useful behavior. Trace2Skill [14] turns this process into an offline batch pipeline: it extracts one skill patch from each trajectory and then uses a Map-Reduce style merge to combine patches into a more general skill edit. As a training-free method, Trace2Skill provides an effective baseline for skill self-evolution.
However, three problems remain as tasks and skill corpora grow. (1) Single-Trace Bias. A single trajectory gives weak evidence for a task: a successful trace may reflect an accidental strategy, while a failed trace often does not identify the root cause [14], [15]. (2) Unvalidated Merging. Patches are merged without independently checking whether they help their source tasks, so low-quality or harmful patches can enter the skill corpus [16]–[18]. (3) Context Overload. The merged skill keeps growing, and inference may present the agent with irrelevant or conflicting rules, increasing prompt length and distracting it from task-relevant content [4], [19]–[21].
We propose SkillCAT (Contrastive Assessment and Topology-aware skill self-evolution), a framework that separates the skill lifecycle into three observable stages. Contrastive Causal Extraction (CCE) generates multiple trajectories per task via multi-seed sampling and constructs same-task success/failure contrastive pairs, extracting candidate experience around the causal watershed between outcomes rather than summarizing the full trace. Assessment-Augmented Evolution (AAE) replays each candidate patch on source-task clones, assigns calibrated scores based on outcome transitions, and selects only patches that improve or preserve source-task behavior for hierarchical tiered merging. Topology-Aware Task Execution (TTE) compiles the evolved skill into a routeable topology of capability nodes and routes only task-relevant content at inference time.
On SpreadsheetBench [22], when initialized from the human-written skill, SkillCAT reaches 55.50% Vrf with Qwen3.5-35B-A3B, 25.83 percentage points above Trace2Skill, and 69.50% Vrf with Qwen3.5-122B-A10B. The evolved skills also generalize to out-of-distribution WikiTableQuestions [23], where Qwen3.5-35B-A3B and Qwen3.5-122B-A10B skill users reach 81.55% and 84.47% accuracy, and remain effective on multimodal DocVQA [24], where Qwen3.5-35B-A3B-authored SkillCAT skills reach 0.9159 and 0.7200 ANLS with Qwen3.5-35B-A3B and Qwen3.5-122B-A10B users. Ablations show that CCE, AAE, and TTE all contribute, and cross-model experiments show that these skills can also be reused by gemma-4-31B-it [25] and gpt-5.4-mini users.
Our main contributions are:
We identify three key decisions in offline agent skill improvement: evidence extraction, patch validation and integration, and test-time skill deployment. Based on this view, we propose SkillCAT, a training-free framework for skill self-evolution.
The framework integrates contrastive causal extraction, assessment-augmented evolution, and topology-aware task execution to address single-trace bias, unvalidated merging, and inference-time context overload.
Experiments show strong results across spreadsheet, document, and cross-model settings, improving matched baselines by up to 40.40% on average.
External skill documents give LLM agents reusable instructions, tool knowledge, and task experience at runtime [1]–[5]. Prior work mainly studies how such skills are organized, retrieved, and evaluated [6]: Graph of Skills and GraSP model dependencies or preconditions, SkillRAE compiles retrieval context, and benchmarks such as SkillsBench and SkillLearnBench test cross-task use and continual acquisition [15], [19], [20], [26]–[29]. These studies improve skill use, but generally assume that useful skill content already exists. We instead study how to extract reliable skills from execution experience and expose only task-relevant parts at test time.
Skill self-evolution studies how trajectories and feedback can become reusable skills [5], [9], [10]. Trace2Skill [14] makes this process offline by extracting trajectory-local patches and merging them into skill documents with Map-Reduce. Later work expands skill sources, memory maintenance, and quality control through personalized interaction, multimodal experience, structured memory, bad-case diagnosis, surrogate verification, contrastive execution, collective aggregation, utility signals, reinforcement learning, and discovery or repair benchmarks [7], [8], [11]–[13], [16]–[18], [30]–[35]. These methods typically treat experience extraction, patch validation, or skill selection separately. SkillCAT connects them with multi-seed contrastive evidence, source-task replay before merging, and topology-aware context control.
SkillCAT decomposes skill self-evolution into three stages: Contrastive Causal Extraction (CCE), Assessment-Augmented Evolution (AAE), and Topology-Aware Task Execution (TTE). CCE and AAE operate offline during skill learning; TTE operates online during task deployment. Figure 2 shows the complete pipeline.
Let \(\mathcal{X} = \{x_1, \ldots, x_N\}\) be the tasks used for skill evolution, and let \(\mathcal{Z} = \{z_1, \ldots, z_K\}\) be the random seeds. Given a base skill \(S_0\), running the agent on task \(x_i\) with seed \(z\) produces a trajectory \(\tau_{i,z}\) and a binary outcome \(y_{i,z} \in \{0,1\}\) from the official evaluator. We write the multi-seed runs for task \(x_i\) as \(\mathcal{T}_i = \{(\tau_{i,z}, y_{i,z}) : z \in \mathcal{Z}\}\), and the full evolution trace collection as \(\mathcal{T} = \{\mathcal{T}_i\}_{i=1}^N\).
Skill self-evolution takes \((S_0,\mathcal{T})\) as input and outputs an evolved skill \(S^*\), together with a routed skill \(S_c\) used for each test-time task. The objective is to improve official evaluator performance on unseen tasks while bounding the amount of skill content injected into the agent context for each task. Thus, the problem is not only to write a longer skill document: the method must decide which evidence is reliable, which patches should enter the skill, and which parts of the evolved skill should be loaded at test time.
Algorithm 3 summarizes the complete pipeline. CCE extracts candidate experience records from the multi-seed trajectories, AAE filters patches through source-task replay and merges the retained patches into \(S^*\), and TTE compiles \(S^*\) into a routable topology that assembles task-relevant skill \(S_c\) for each test task. These modules correspond to the three decisions above, so they can be ablated individually or evaluated as a full pipeline.
CCE forms same-task success/failure pairs from multi-seed runs and extracts skill evidence at the first meaningful divergence. Because each pair shares the same input, tools, and evaluator, the evidence isolates execution choices that most plausibly explain the outcome gap.
For task \(x_i\), let \(\mathcal{T}_i^+\) and \(\mathcal{T}_i^-\) denote the sets of successful and failed trajectories, respectively. When both sets are non-empty, CCE samples one trajectory uniformly at random from each set to form a contrastive pair \((\tau_i^+, \tau_i^-)\). This same-task construction prevents differences in task difficulty or input content from being mistaken for skill evidence.
Given a contrastive pair \((\tau_i^+, \tau_i^-)\), CCE locates the causal watershed \(w_i\), the first point where the action sequences in the successful and failed traces diverge. The extractor then writes a candidate experience record around this point, including local evidence, the inferred failure cause, and a skill-editable lesson. Let \(E\) denote the contrastive extractor: \[\label{eq:record95extraction} r_i = E(\tau_i^+, \tau_i^-, w_i),\tag{1}\]
where \(w_i = \min\{t : \alpha_t^+ \neq \alpha_t^-\}\), and \(\alpha_t^+\) and \(\alpha_t^-\) are the actions at step \(t\) in \(\tau_i^+\) and \(\tau_i^-\). Thus, \(r_i\) does not summarize the full trace; it focuses on the behavioral difference at the point where the outcomes begin to separate.
When all \(K\) trajectories for a task succeed or all fail, no strict success/failure contrastive pair exists. If fallback is enabled, CCE applies the single-trace extractor \(E_1\) to \(\mathcal{T}_i\); otherwise, it skips the task to preserve the definition of strict contrastive evidence.
AAE treats each candidate patch as a hypothesis to verify rather than a rule to merge directly. It isolates the patch in a temporary skill, replays it on source-task clones, and scores the resulting outcome transition before selection and merging.
For a candidate patch \(p_j\), let \(\mathcal{X}_j\) denote the source-task clone set associated with the evidence that produced it. AAE records the baseline outcome on these clones and the replay outcome after applying the temporary skill induced by \(p_j\). For compact notation, let \(y_j,\hat{y}_j \in \{0,1\}\) denote the baseline and replay outcomes used for scoring, where 1 means success and 0 means failure. AAE does not estimate a continuous reward; it ranks the four outcome transitions directly: \[\label{eq:aae95scoring} a_j = \begin{cases} 3.0 & (y_j,\hat{y}_j)=(0,1), \\ 2.0 & (y_j,\hat{y}_j)=(1,1), \\ 1.0 & (y_j,\hat{y}_j)=(0,0), \\ 0.0 & (y_j,\hat{y}_j)=(1,0). \end{cases}\tag{2}\]
The score treats failure\(\to\)success as the strongest evidence, accepts success\(\to\)success as behavior preservation, downweights failure\(\to\)failure, and rejects success\(\to\)failure. For patches derived from CCE contrastive pairs, the successful side of the pair defines the baseline state: replay success counts as success\(\to\)success, and replay failure counts as success\(\to\)failure. This conservative rule ensures that a contrastive patch does not break source-task behavior that has already been observed to succeed.
AAE passes only patches whose scores reach a threshold \(\theta\) to the merge stage: \[\label{eq:patch95selection} \mathcal{P}_{\theta} = \{ p_j : a_j \geq \theta \},\tag{3}\]
where \(\theta = 2.0\) in our configuration. The retained patches therefore either repair a source-task failure or preserve a known success; patches that leave failures unresolved or turn successes into failures are excluded from the global skill.
After thresholding, AAE groups the retained patches by score tier and merges them from lower tiers to higher tiers. Let \(\ell\) index the merge tier, \(L\) denote the number of tiers, and \(\mathcal{P}_{\theta}^{(\ell)}\) denote the selected patches at tier \(\ell\). Let \(\mu\) denote the skill merge operator: \[\label{eq:tiered95merge} S^{(\ell)} = \mu\!\left(S^{(\ell-1)},\; \mathcal{P}_{\theta}^{(\ell)}\right),\tag{4}\]
where \(S^{(0)} = S_0\) and the final evolved skill is \(S^* = S^{(L)}\). This order gives higher-scoring patches higher priority in later merge stages, while still allowing lower-scoring but validated patches to contribute non-conflicting rules. The merge operator reuses the underlying Trace2Skill skill-editing procedure; AAE changes which patches enter the merge and the order in which they are merged.
TTE casts test-time skill use as context selection. It compiles the evolved skill \(S^*\) into a routable topology offline and assembles a smaller routed skill \(S_c\) for each task online, avoiding the cost and distraction of loading the full skill.
The offline compiler parses the Markdown hierarchy of the AAE-generated \(S^*\). Level-1 content forms the always-on core skill \(S_\circ\), and level-2 sections form the routable node set \(\mathcal{V}\). For each node \(v \in \mathcal{V}\), TTE keeps the original body \(B_v\) as the content to inject, and extracts the title, keywords, summary, and available dependencies as routing metadata. The node metadata forms the topology summary \(\Sigma\). Thus, routing reads only compact summaries, while skill assembly uses the unmodified node bodies.
Given a task description \(c\) and routing budget \(k\), the LLM router \(\rho\) selects up to \(k\) relevant primary nodes from the topology summary \(\Sigma\). This output is only the raw selection \(\widetilde{\mathcal{V}}_c\). The runtime then validates node identifiers, adds deterministic recall and task-intent anchors, expands dependency edges, and includes foundational nodes. Let \(\operatorname{Expand}\) denote this deterministic expansion step: \[\label{eq:tte95routing} \widetilde{\mathcal{V}}_c = \rho(c, \Sigma; k), \qquad \mathcal{V}_c = \operatorname{Expand}\!\left(\widetilde{\mathcal{V}}_c, \Sigma\right).\tag{5}\]
| Skill User | Setting | Method | OOD | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4-6 (lr)7-7 (l)8-8 | \(\uparrow\) | \(\uparrow\) | \(\uparrow\) | WikiTQ \(\uparrow\) | Avg \(\uparrow\) | |||||||||||||||||
| Skill Author: Qwen3.5-35B-A3B | ||||||||||||||||||||||
| Qwen3.5-35B-A3B | Human-Written | 13.03 | 9.02 | |||||||||||||||||||
| Trace2Skill +Comb. | 18.80 | 51.22 | ||||||||||||||||||||
| (Ours) | 55.50 | 39.02 | 20.61 | 81.55 | 49.17 | |||||||||||||||||
| Parametric | 13.70 | 20.14 | ||||||||||||||||||||
| Trace2Skill +Comb. | 18.10 | 38.14 | ||||||||||||||||||||
| (Ours) | 54.50 | 39.35 | 19.41 | 72.82 | 46.52 | |||||||||||||||||
| 2-8 | ||||||||||||||||||||||
| gemma-4-31B-it | No-Skill | 36.84 | 79.61 | |||||||||||||||||||
| Human-Written | 23.76 | 78.64 | ||||||||||||||||||||
| (Ours) | 61.00 | 42.47 | 29.82 | 79.61 | 53.23 | |||||||||||||||||
| 2-8 | No-Skill | 14.88 | 45.63 | |||||||||||||||||||
| Human-Written | 18.42 | 54.37 | ||||||||||||||||||||
| (Ours) | 37.00 | 25.18 | 10.75 | 61.17 | 33.52 | |||||||||||||||||
| Skill Author: Qwen3.5-122B-A10B | ||||||||||||||||||||||
| Qwen3.5-122B-A10B | Human-Written | 36.30 | 74.68 | |||||||||||||||||||
| Trace2Skill +Comb. | 47.17 | 79.24 | ||||||||||||||||||||
| (Ours) | 69.50 | 47.42 | 31.91 | 84.47 | 58.32 | |||||||||||||||||
| Parametric | 36.60 | 23.73 | ||||||||||||||||||||
| Trace2Skill +Comb. | 27.37 | 56.05 | ||||||||||||||||||||
| (Ours) | 64.50 | 40.73 | 24.45 | 84.47 | 53.54 | |||||||||||||||||
| 2-8 | ||||||||||||||||||||||
| gemma-4-31B-it | No-Skill | 36.84 | 79.61 | |||||||||||||||||||
| Human-Written | 23.76 | 78.64 | ||||||||||||||||||||
| (Ours) | 70.50 | 45.18 | 31.14 | 76.70 | 55.88 | |||||||||||||||||
| 2-8 | No-Skill | 14.88 | 45.63 | |||||||||||||||||||
| Human-Written | 18.42 | 54.37 | ||||||||||||||||||||
| (Ours) | 32.50 | 22.22 | 11.51 | 66.02 | 33.06 | |||||||||||||||||
1pt
Finally, TTE concatenates the core skill with the original bodies of nodes in the final set \(\mathcal{V}_c\) to obtain the routed skill for task \(c\): \[\label{eq:routed95skill95assembly} S_c = S_\circ \oplus \bigoplus_{v \in \mathcal{V}_c} B_v,\tag{6}\]
where \(\oplus\) denotes sequential string concatenation. TTE does not regenerate skill text, so it preserves the rules produced by AAE; it changes only which rules are loaded at test time, reducing the irrelevant skill content exposed to each task.
Our main benchmark is SpreadsheetBench-Verified [22]. Following Trace2Skill [14], we split its 400 samples into 200 evolution samples and 200 held-out test samples; test samples are never used during evolution. The primary metric, Vrf,
is held-out accuracy on this split, while Soft (sub-problem pass rate) and Hard (all sub-problems pass) are reported on the full SpreadsheetBench. We additionally test out-of-distribution generalization on WikiTableQuestions [23] (WikiTQ), converting inputs and expected outputs into spreadsheet format so the same xlsx skill applies. For multimodal transfer, we use the
DocVQA [24] validation split, with the first 2,700 question-image pairs for evolution and the remaining 2,649 for evaluation, and report
ANLS and Acc (ANLS \(\geq\) 0.5).
We compare SkillCAT with No Skill, Human-Written (Anthropic’s official xlsx skill), Parametric (a prompt-generated xlsx-basic skill), and the Trace2Skill +Combined and +Error variants [14]. We evaluate two settings: Skill Deepening, initialized from the human-written xlsx skill and measured against Human-Written, and
Skill Creation, initialized from the weaker xlsx-basic skill and measured against Parametric. Main experiments use Qwen3.5-35B-A3B and Qwen3.5-122B-A10B [36] as matched skill authors and users; cross-model analysis reuses the evolved Deepening skills with gemma-4-31B-it [25] and gpt-5.4-mini [37] as skill users.
All agents run in a ReAct-style [2] harness with filesystem and spreadsheet tools. CCE samples 5 trajectory seeds per evolution task and uses
128 parallel inference workers to collect success/failure evidence. AAE evaluates candidate patches on source-task clones and keeps only patches with \(a_j \geq 2.0\) before hierarchical merging. The final TTE setting uses
the prompt-based llm_graph_router with top_k=7, followed by runtime node validation, dependency expansion, and foundational-node injection.
Table 1 summarizes the spreadsheet and OOD table evaluations. In same-model Skill Deepening, when Qwen3.5-35B-A3B is both the skill author and the skill user, SkillCAT Full reaches 55.50% Vrf, 25.83 points above Trace2Skill +Combined (29.67%) and 45.83 points above Human-Written (9.67%). When Qwen3.5-122B-A10B is used in both roles, SkillCAT is slightly below Trace2Skill on Vrf (69.50% vs.%) but higher on Soft, Hard, WikiTQ, and the average score. In Skill Creation, Trace2Skill changes Vrf little (Qwen3.5-35B-A3B: \(-0.17\); Qwen3.5-122B-A10B: \(+0.16\)), whereas SkillCAT reaches 54.50% and 64.50%, gaining 34.33 and 38.33 points over Parametric. On WikiTQ, SkillCAT is higher than Trace2Skill in every same-model author/user setting, with the largest gap under Qwen3.5-35B-A3B Skill Creation (72.82% vs.%).
The cross-model blocks in Table 1 reuse Deepening skills authored by Qwen3.5-35B-A3B or Qwen3.5-122B-A10B, without re-evolution. With Qwen3.5-35B-A3B-authored skills, gemma-4-31B-it rises from the Human-Written baseline of 39.00% to 61.00% Vrf, and gpt-5.4-mini rises from 31.00% to 37.00%. With Qwen3.5-122B-A10B-authored skills, gemma-4-31B-it reaches 70.50% Vrf (+31.50), while gpt-5.4-mini reaches 32.50% (+1.50). These results show that evolved skills can be reused beyond the author model, but the benefit depends on the user model.
Figure 4 reports the DocVQA multimodal evaluation, where all skills are authored by Qwen3.5-35B-A3B and evaluated with Qwen3.5-35B-A3B and Qwen3.5-122B-A10B as skill users. SkillCAT Full is best for both skill users: Qwen3.5-35B-A3B obtains 0.9159 ANLS (+0.2316 over No Skill) and 93.3% Acc (+18.1), while Qwen3.5-122B-A10B obtains 0.7200 ANLS (+0.0776) and 79.0% Acc (+7.8). By contrast, Trace2Skill +Error falls below the No Skill baseline for Qwen3.5-35B-A3B (0.6223 ANLS, \(-0.0620\)), indicating that unvalidated patches can harm cross-domain generalization; SkillCAT avoids this failure mode through patch validation.
Table 2 isolates the contribution of each module under same-model Skill Deepening with Qwen3.5-35B-A3B, using Trace2Skill +Combined (29.67% Vrf) as the reference. The full SkillCAT pipeline reaches 55.50%, a gain of 25.83 points. Removing any module reduces performance, but the failure modes differ. Without CCE, accuracy falls to 32.50%, indicating that same-task success/failure contrasts provide important evidence for skill edits. Without AAE, accuracy drops to 26.00%, below the reference, showing that source-task replay is needed to prevent harmful patches from entering the merged skill. Without TTE, the system still reaches 46.50%, but remains 9.00 points below the full pipeline, showing that high-quality evolved skills also benefit from task-relevant context deployment. The single-module rows support the same interpretation: Only CCE and Only AAE reach 39.00% and 34.00%, respectively, while Only TTE reaches 27.50%, so routing alone cannot compensate for insufficiently evolved skill content.
| Condition | Modules | Perf. | ||
|---|---|---|---|---|
| 2-4 (lr)5-5 | CCE | AAE | TTE | \(\uparrow\) |
| Trace2Skill +Comb. | 29.67 | |||
| Full | 55.50 | |||
| w/o CCE | 32.50 | |||
| w/o AAE | 26.00 | |||
| w/o TTE | 46.50 | |||
| Only CCE | 39.00 | |||
| Only AAE | 34.00 | |||
| Only TTE | 27.50 | |||
Figure 5 summarizes the CCE budget sweep over 1, 3, 5, 7, and 9 seed counts and keeps CCE sampling time as the cost reference. Held-out Vrf rises from 32.50% with one seed to 55.50% with five seeds, then drops to 46.00% and 41.50% with seven and nine seeds. The time bars increase with the trajectory budget, from 22m56s with one seed to 4h41m49s with nine seeds. Thus, additional trajectories raise sampling cost but do not improve generalization beyond five seeds. We therefore use five seeds as the best accuracy-cost tradeoff in this sweep.
Figure 6 checks whether source-task replay is a calibrated filter rather than only a local sanity check. We bucket 197 candidate patches by replay outcome transition and evaluate each bucket in isolation. To ensure a fair functional comparison, we equalize the number of patches in each bucket to the size of the smallest bucket. Bucket-only Vrf follows the intended AAE order: failure\(\to\)success patches reach 51.00% (+21.33 over Trace2Skill), success\(\to\)success reaches 41.00% (+11.33), failure\(\to\)failure reaches 32.00% (+2.33), and success\(\to\)failure drops to 23.50% (\(-6.17\)). The monotone ordering shows that replay transitions carry downstream signal: patches that repair failed source tasks are most useful, while patches that turn successes into failures should be rejected.
Figure 7 asks whether TTE can reduce inference context while preserving evolved-skill gains. The dashed line is full skill loading without TTE from Table 2 (46.50% Vrf). Both
routers stay above this reference for most budgets while using fewer tokens. Embedding retrieval peaks at 57.00% Vrf at top_k=3. The selected LLM graph router reaches 55.50% Vrf with a 41.6% context reduction. We use it because it is
competitive, token efficient, and exploits the TTE dependency topology without a separate embedding model.
This paper studies three limitations of existing skill self-evolution methods for LLM agents: single-trace bias, unvalidated merging, and inference-time context overload. SkillCAT addresses them by extracting same-task contrastive evidence with CCE, filtering candidate patches through source-task replay with AAE, and loading only task-relevant skill content through TTE. To assess the effectiveness of SkillCAT, we conducted evaluations on standard agent benchmarks, such as SpreadsheetBench, WikiTableQuestions, and DocVQA, while also investigating its cross-model and out-of-distribution generalization capabilities. Under these conditions, SkillCAT outperformed comparable baselines by increasing the average score by as much as 40.40%, while ablations and analyses confirm the contribution of each module.