cs.AIApr 26, 2026

ClawTrace: Cost-Aware Tracing for LLM Agent Skill Distillation

Authors: Boqin YuanYue SuRenchu SongSen YangJing Qin

Organizations: University of California San Diego · San Diego, CA · Carnegie Mellon University · Pittsburgh, PA · Epsilla · Union City, NJ

Abstract

Skill-distillation pipelines learn reusable rules from LLM agent trajectories, but they lack a key signal: how much each step costs. Without per-step cost, a pipeline cannot distinguish adding a missing step to fix a bug from removing an expensive step that never affected the outcome. We use the cost-attribution gap to ask whether the rule types inside a distilled skill transfer the same way to new tasks. ClawTrace records cost-attributed agent traces and compiles each session into a TraceCard; CostCraft reads TraceCards and writes three kinds of skill patches: preserve, prune, and repair. We find a pattern aggregate metrics hide. On 30 held-out SpreadsheetBench tasks across two seeds, removing prune patches roughly tripled the quality-regression count without lowering median cost. Across the full 84-task SkillsBench transfer, CostCraft saves no aggregate cost. All three quality regressions trace to the preserve lane, and both quality wins trace to the prune lane: prune patches act as quality guardrails while preserve patches drive regressions. We argue that reusable agent skills should be evaluated at the rule-type level, not as monolithic instruction packages. To support this, we release ClawTrace, the TraceCard schema, and the full set of typed skills.

Explore similar work

CardsList
  1. SkillTrace: Multi-Trace Provenance Auditing for LLM-Agent Skill Reuse

    Aug 5, 2026Jialuo Chen, Minghe Wang, Lingqi Jiang +7Reuse