TL;DR
Evaluating LLM agent "skills" solely by task pass rates creates a massive blind spot, hiding significant behavioral shifts and hidden token costs. This paper introduces Counterfactual Trace Auditing (CTA), a framework that aligns and compares agent trajectories with and without skills to expose exactly how these interventions reshape agent behavior.
What Problem Does This Paper Address?
When building Large Language Model (LLM) agents, developers frequently augment them with "agent skills"—short Markdown documents containing procedural knowledge, templates, or workflows for specific libraries and tools.
Currently, the standard way to evaluate if a skill works is to measure the change in unit test pass rates ($\Delta P$) before and after attaching the skill. However, the authors argue that treating skills as a black box creates two major issues:
- Ceiling Effects: If an agent already achieves a 95% pass rate on a benchmark without the skill, there is virtually no headroom left for $\Delta P$ to register any impact, positive or negative.
- Offsetting Behaviors: A skill might simultaneously help an agent (e.g., finding the right file) and harm it (e.g., writing an unnecessary, broken configuration file). These effects cancel out in the final pass rate, making the skill look inert when it actually drastically altered the agent's behavior.
Methods
The authors introduce Counterfactual Trace Auditing (CTA), a pipeline designed to peer inside the agent's execution trace.
As shown in Figure 1, the CTA framework operates in four main stages:
- M1: Trace Parsing: Raw agent logs are converted into a clean stream of typed events (
READ,WRITE,EXECUTE,SEARCH,THINK). - M2: Phase Segmentation: A finite state machine segments the trace into five goal-directed phases: Orientation, Implementation, Validation, Debugging, and Finalization.
- M3: Counterfactual Alignment & Divergence Detection: The pipeline pairs a "with-skill" trace against a "without-skill" baseline for the exact same task. It uses Dynamic Time Warping (DTW) to align the phases and TF-IDF cosine similarity to align the agent's internal reasoning intents. It then flags structural divergences (mismatched targets, content, or outcomes).
- M4: SIP Detection: Divergences are mapped to a taxonomy of five Skill Influence Patterns (SIPs) using deterministic, rule-based detectors:
- Procedural Scaffolding (PS, constructive): The agent successfully follows the skill's step-by-step instructions.
- Edge-Case Prompting (EP, constructive): The skill acts as a checklist, prompting the agent to add extra defensive guards (like
try/exceptblocks). - Redundant Exploration (RE, neutral): The skill causes the agent to loop through extra implementation/validation cycles to reach the same code it would have written anyway.
- Surface Anchoring (SA, destructive): The agent blindly copies literal strings or templates from the skill document that are incompatible with the project.
- Concept Bleed (CB, destructive): The skill's broad coverage distracts the agent into creating unrequested files or features.
Datasets
The framework was evaluated using SWE-Skills-Bench, a public benchmark built on software engineering tasks. The authors ran experiments using Claude Sonnet 4.5 across 49 distinct paired-trace bundles (each task run once with the skill and once without).
Key Insights and Ideas
- The Evaluation Gap is Real: Looking only at the final pass rate suggests that skills do almost nothing—the average pass rate increased by a meager 0.34 percentage points. However, CTA uncovered 522 instances of Skill Influence Patterns across those same tasks, proving that skills fundamentally reshape agent behavior behind the scenes.
- Behavior Shifts by Baseline Performance: The type of impact a skill has depends heavily on how hard the task is for the baseline model. On easy "ceiling" tasks, the dominant behavior is Surface Anchoring (destructive literal copying). On harder "floor" tasks, Edge-Case Prompting dominates.
- The Token Tax: Skills are not free. On mid-range tasks where skills actually helped improve the pass rate, they did so at a massive cost—requiring an average of 2.77× more tokens than the baseline.
Key Results
The quantitative breakdown highlights how aggregate metrics mask underlying dynamics:
As detailed in Table 1 (Figure 2), 37 out of 49 tasks sat at the "Ceiling" ($\ge 90\%$ baseline pass rate). While their net pass rate change was slightly negative (-0.5 pp), they accounted for the vast majority of behavioral changes, racking up 415 of the 522 total detected SIPs.
Table 2 (Figure 4) illustrates how the composition of these behaviors shifts. Surface Anchoring (SA) dominates ceiling tasks (4.38 instances per task), whereas Edge-Case Prompting (EP) is the most frequent pattern in mid-range and floor tasks.
The authors also documented extreme cases of token overhead. For example, in the gitlab-ci-patterns task, the skill successfully boosted performance but resulted in a staggering 22.24× token multiplier due to the agent repeatedly consulting the skill document during its orientation phase.
Limitations and Future Work
- Single Repetition: Due to the high inference cost of Claude Sonnet 4.5, each condition was run only once ($r=1$), preventing the estimation of within-task variance.
- Benchmark Saturation: Because 37 of the 49 tasks were already at the performance ceiling for Sonnet 4.5, the insights for mid-range ($n=10$) and floor ($n=2$) tasks rely on a relatively small sample size.
- Rule-Based Taxonomy: The SIP detectors rely on hand-crafted, deterministic rules rather than human annotations or LLM-as-a-judge evaluations. The authors noted at least one failure mode ("Premature Closure") that fell entirely outside their current five-class taxonomy, indicating room for future expansion.
Summary updated