K-文化的一切——从回归到 K-美妆,发送到您的邮箱订阅邮件

METAL MEDIA

Demystifying Agent Skills: Why They Work-Until They Don't

arXiv:2608.140362026-08-13

AI智能体使用的“技能”文档之所以有效,不是因为告诉它新知识,而是因为让它的操作行为更稳定

这项研究通过8,135条实验记录和对240条轨迹的人工编码分析,系统考察了给LLM智能体的SKILL.md之类“技能”文档在何时、为何、以及在哪些情况下真正起作用。核心发现是:技能之所以有效,主要是因为它把重复出现的环境配置、工具调用、校验步骤固化成稳定的“程序性锚点”,而不是补充智能体缺失的事实性知识。同时研究还发现,随着候选技能库变大,真正被正确检索并使用的精确度会急剧下降,但下游任务成功率却没有同步大幅下滑。

METAL MEDIA 解读图

Skill vs Workflow Memory vs Raw:同样的经验,不同的呈现方式

证据状态已报告实测结果

  1. 1. 收集原始执行轨迹在固定的Docker环境中为同一任务收集成功与失败的执行记录,构建均衡的共享轨迹池
  2. 2. 蒸馏成三种表现形式同一轨迹池分别保持未处理(Raw)、整理为流程记录(Workflow Memory)、或压缩为标准化SKILL.md(Skill)
  3. 3. 在相同条件下重新执行三种条件在相同任务和协议下重新运行,收集成功率与执行轨迹
  4. 4. 对照分类标注分析对三种方式的配对结果(paired triple)由人工与LLM共同标注为12种细粒度模式,揭示具体发生了什么变化
  5. 5. 检索难度实验通过改变候选池规模和干扰项类型,分别用嵌入检索、显式选择、真实执行三种方式测量检索与执行的关系
这是 METAL MEDIA 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 研究者把同一批原始执行轨迹分别蒸馏成三种形式——未处理的Raw、整理过的Workflow Memory、标准化的SKILL.md文档——并在相同任务上评测,以此单独分离“表现形式”本身的影响
  2. 对240条抽样轨迹进行人工开放式编码,提炼出238个有效唯一标签,并归纳为3个大类、12种细粒度技能使用模式的分类体系,经人工独立复核后与LLM判定的一致率达95.8%(Cohen's κ=0.952)
  3. 同一实验协议在不同智能体框架和模型组合上重复运行,包括Codex + GPT-5.3-Codex以及Gemini CLI + Gemini-3.1-Pro-Preview,以检验结论是否局限于单一模型
  4. 通过嵌入检索排序、无需执行的显式智能体选择、以及真实完整执行三种独立方式,在候选池规模从5到100变化、并混入不同类型干扰项的条件下,分别测量技能检索质量与下游任务表现的关系
Figure 1: Experimental pipelines. Top: skill versus procedural memory. We execute each task in a fixed Docker environment, collect successful and failed trajectories, and form a fixed-budget composition grid. The same trace pool is distilled either into Workflow Memory or into a reusable SKILL.md, which are then evaluated on matched tasks under the same protocol. Bottom: skill retrieval. Each task is paired with a candidate pool containing its ground-truth skill and k−1 real distractors (random, similar, or dissimilar). Matched pools are evaluated independently in three procedures: (A) embedding-based ranking without task execution, (B) explicit agent selection without Docker execution or verification, and (C) full-pool real execution with skill-use parsing after task verification. Outputs from (A) and (B) are not passed to (C).
Figure 1: Experimental pipelines. Top: skill versus procedural memory. We execute each task in a fixed Docker environment, collect successful and failed trajectories, and form a fixed-budget composition grid. The same trace pool is distilled either into Workflow Memory or into a reusable SKILL.md, which are then evaluated on matched tasks under the same protocol. Bottom: skill retrieval. Each task is paired with a candidate pool containing its ground-truth skill and k−1 real distractors (random, similar, or dissimilar). Matched pools are evaluated independently in three procedures: (A) embedding-based ranking without task execution, (B) explicit agent selection without Docker execution or verification, and (C) full-pool real execution with skill-use parsing after task verification. Outputs from (A) and (B) are not passed to (C).
Table 1: Task success rates for Workflow Memory and Skill injection across trajectory mixtures. Gray rows denote Raw baselines. Green, red, and unshaded cells indicate values above, below, and equal to the corresponding Raw baseline, respectively; bold marks the row-wise maximum across mixture settings. Mixture labels denote the numbers of successful (s) and failed (f) source trajectories. Terminal-Bench-Pro rates use 130 trials per condition, with infrastructure or verifier errors counted as failures.
Agent + ModelTrajectory MixTerminal-Bench-2SkillsBenchTerminal-Bench-Pro
WorkflowSkillWorkflowSkillWorkflowSkill
Codex + GPT-5.3-Codex Raw0.59350.50830.5394
Codex GPT-5.3-Codex5s0f0.44520.75480.52500.72500.73330.7455
4s1f0.40000.72900.56670.61670.73330.7939
3s2f0.41940.78060.64170.62500.69700.7333
2s3f0.36770.68390.60830.70830.66670.6667
1s4f0.27100.70970.51670.61670.61210.5818
0s5f0.28390.51610.58330.45000.47880.4303
Gemini CLI + Gemini-3.1-Pro-Preview Raw0.50000.47620.5615
Gemini CLI Gemini-3.1-Pro-Preview5s0f0.62310.79230.55240.74290.53080.6692
4s1f0.53080.76150.52380.61900.69230.6308
3s2f0.64620.74620.56190.66670.64620.5462
2s3f0.60000.70000.55240.67620.68460.5077
1s4f0.58460.69230.48570.60000.59230.5692
0s5f0.52310.47690.42860.40950.47690.4615
(b) Three-experiment skill-retrieval evaluation.
(b) Three-experiment skill-retrieval evaluation.
Table 2: Mechanism labels used to characterize how injected prior experience affects execution.
MechanismMeaning
procedural_anchorThe artifact gives a usable procedure, ordering, checklist, tool sequence, or verification plan.
knowledge_ injectionThe artifact supplies concrete domain knowledge that the agent otherwise lacked.
failure_warningThe artifact warns about a pitfall that the agent avoids.
noneThe artifact is not used in a meaningful way.
counterproductiveThe artifact misleads the agent or makes the run worse.
Figure 2: Taxonomy label distribution across trajectory mixtures and experimental arms. Stacked bars show trajectory-level labels for Raw, Workflow Memory, and Skill across the six source-trajectory mixtures from 5​s​0​f to 0​s​5​f. Labels are grouped into three high-level categories; per-mode percentages are reported in Appendix Table 11.
Figure 2: Taxonomy label distribution across trajectory mixtures and experimental arms. Stacked bars show trajectory-level labels for Raw, Workflow Memory, and Skill across the six source-trajectory mixtures from 5​s​0​f to 0​s​5​f. Labels are grouped into three high-level categories; per-mode percentages are reported in Appendix Table 11.
Table 3: Human validation of the taxonomy construction pipeline. The first stage checks whether raw labels are supported by their source trajectories; the second independently maps those labels to the 12 canonical modes.
Validation stageEvaluation unitsResult
Trajectory grounding714 checks (238 labels × 3 trajectories)All labels confirmed
Taxonomy aggregation238 valid unique labels95.8% exact; Cohen’s κ=0.952
Figure 3: Skill retrieval and execution-time skill use on SkillsBench. Left: precision for the two offline diagnostics. Right: parsed actual-use precision (solid lines) and downstream success (dashed lines) for Arm 3. Curves average over random, similar, and dissimilar pool regimes; outputs are not passed between experiments.
Figure 3: Skill retrieval and execution-time skill use on SkillsBench. Left: precision for the two offline diagnostics. Right: parsed actual-use precision (solid lines) and downstream success (dashed lines) for Arm 3. Curves average over random, similar, and dissimilar pool regimes; outputs are not passed between experiments.
Table 4: Effect of pool composition and size on SkillsBench. Entries report percentages for the indicated retrieval arm, pool composition, and pool size. Arms 2 and 3 are arithmetic means over the reported agent–model pairings. Full recall and F1 values are given in Appendix Table 15.
Pool / metricSkill-pool size k
5102050100
RandomArm 1 P97.795.595.592.084.1
Arm 2 P78.177.982.176.569.8
Arm 3 P25.923.219.58.64.4
Arm 3 Succ.31.836.840.136.341.9
SimilarArm 1 P70.563.660.256.853.4
Arm 2 P53.152.947.148.643.7
Arm 3 P34.522.315.77.33.7
Arm 3 Succ.41.739.639.239.539.6
DissimilarArm 1 P96.696.696.694.393.2
Arm 2 P78.981.682.678.477.8
Arm 3 P28.619.29.04.41.7
Arm 3 Succ.35.736.933.738.836.4
(b) Arm 3 skill-use precision and downstream success.
(b) Arm 3 skill-use precision and downstream success.
Table 5: Experimental arms in the contrastive trajectory analysis.
ArmInjected prior experiencePurpose
RawNo injected prior trajectory or skillBaseline behavior of the agent on the task.
Workflow memoryCleaned prior workflows are appended as procedural memoryTests whether direct trajectory-like procedural memory improves execution.
SkillThe same prior workflows are distilled into a standardized reusable skillTests whether compact skill representation improves over direct workflow memory.
Figure 4: Cross-framework transfer of procedural experience. Prior-experience artifacts constructed in one agent framework are evaluated in another. Dashed lines indicate the target framework’s Raw baseline.
Figure 4: Cross-framework transfer of procedural experience. Prior-experience artifacts constructed in one agent framework are evaluated in another. Dashed lines indicate the target framework’s Raw baseline.
Table 6: Input artifacts used by the taxonomy pipeline.
ArtifactRole in the analysis
Trial result metadataStores task identity, reward, verifier result, exception type, timestamps, token usage, and execution phase durations.
Agent trajectory transcriptStores the terminal/tool-use trajectory and the agent’s reasoning-visible interaction record.
Task instructionDefines the task objective and, for workflow-memory arms, may include injected workflow content.
Skill artifactStores the injected skill used in the skill arm.
Task-side filesUsed only as contextual artifacts when present; the main taxonomy labels are based on execution trajectories and verifier outcomes.
Figure 5: Effect of outcome labels during skill creation. Panels compare skills created with outcome labels visible (normal) or withheld (no-hint) across trajectory mixtures and benchmarks. Dashed lines indicate the corresponding Raw baselines. Terminal-Bench-Pro entries use 130 trials per condition; missing or infrastructure-error trials count as failures.
Figure 5: Effect of outcome labels during skill creation. Panels compare skills created with outcome labels visible (normal) or withheld (no-hint) across trajectory mixtures and benchmarks. Dashed lines indicate the corresponding Raw baselines. Terminal-Bench-Pro entries use 130 trials per condition; missing or infrastructure-error trials count as failures.
Table 7: Coverage statistics after manifest construction and artifact linking.
DimensionCount
Terminal-Bench 2.0 trials3,254
Terminal-Bench-Pro trials2,993
SkillsBench trials1,888
Raw-arm trials1,883
Workflow-memory trials2,658
Skill-arm trials3,594
Successful trials4,541
Failed trials3,594
Records with available agent transcript7,837
Records with available task instruction6,210
Skill-arm records with linked skill artifact3,570
Table 8: Paired triple sample used for contrastive taxonomy labeling.
SplitCount
SkillsBench triples144
Terminal-Bench 2.0 triples186
Terminal-Bench-Pro triples198
Triples per mixture setting88
Total triples528
Table 9: Oracle-status success rates across the three execution arms.
ArmSuccess / totalSuccess rate
Raw312 / 52859.1%
Workflow memory295 / 52855.9%
Skill327 / 52861.9%
Table 10: Paired success-rate deltas between execution arms.
ComparisonMean paired delta95% bootstrap CI
WM vs Raw−0.0322[−0.0814,+0.0208]
Skill vs Raw+0.0284[−0.0227,+0.0795]
Skill vs WM+0.0606[+0.0076,+0.1136]
Table 11: Contrastive skill-use taxonomy over 528 paired triples. SC abbreviates Skill-use Category, the top-level taxonomy label assigned to a trajectory; each SC groups the fine-grained modes listed in the table. Percentages are computed within each arm over the same paired-triple sample. SC1 denotes successful procedural anchoring, SC2 execution-layer and verification failures, and SC3 invocation, applicability, and boundary failures.
SCModeRawWFSkill
SC1skill_guided_success10.4%0.4%61.6%
SC1workflow_guided_success0.0%54.5%0.0%
SC1autonomous_clean_success48.7%0.8%0.2%
SC2environment_infrastructure_failure5.3%1.7%0.2%
SC2output_format_schema_mismatch7.4%3.8%3.2%
SC2background_service_lifecycle_failure2.7%2.5%0.8%
SC2shell_code_corruption1.1%1.9%0.2%
SC2algorithmic_logic_error8.3%11.0%7.4%
SC2static_verification_without_runtime12.5%12.5%11.7%
SC3timeout_budget_exhaustion1.7%10.6%4.4%
SC3skill_guidance_misapplied_or_ignored0.8%0.4%10.0%
SC3capability_or_safety_limit1.1%0.0%0.4%
Table 12: Lightweight compact procedural baselines on selected Terminal-Bench-2 tasks. Entries report downstream success for Raw, short-plan, test-first, Workflow Memory, and Skill conditions over 26 tasks with five trials per task.
ConditionSourceSuccess / totalSuccess rate
RawNone65 / 13050.0%
Short planTask instruction62 / 13047.7%
Test-first templateWorkflow77 / 13059.2%
Workflow MemoryWorkflow81 / 13062.3%
SkillWorkflow103 / 13079.2%
Table 13: Matched success and token-cost comparison. Entries are computed on the 83-task intersection with equal task weighting. Token counts are per-task averages reported in thousands (K); “pp” denotes percentage points.
Absolute metrics on the matched 83-task intersection
RepresentationSuccessInputOutputTotalΔ succ. vs RawCost profile
Raw trajectories64.1%541.5K14.2K555.7KFull prior traces provide broad evidence but carry the largest context load.
Workflow Memory64.8%417.9K8.3K426.2K+0.7 ppMost token-efficient representation after cleaning trajectory noise.
Skill69.6%511.7K9.8K521.5K+5.5 ppHighest success rate, with lower token use than Raw but higher token use than Workflow Memory.
Pairwise trade-offs
ComparisonΔ successΔ inputΔ outputΔ totalDirectionInterpretation
Workflow Memory vs Raw+0.7 pp-123.6K-5.9K-129.5KcheaperWorkflow Memory substantially reduces token cost with nearly unchanged success.
Skill vs Raw+5.5 pp-29.8K-4.4K-34.2Kbetter and cheaperSkill improves success while still reducing token use relative to Raw trajectories.
Skill vs Workflow Memory+4.8 pp+93.8K+1.5K+95.3Kbetter but costlierSkill trades additional context for stronger execution performance.
Table 14: Complete Arm 1 embedding-retrieval results on SkillsBench. Entries report ranking metrics from Qwen3-Embedding-0.6B using task–skill-description similarity. Top-5 is omitted for k=5 because it covers the full candidate pool.
PoolkTop-1Top-3Top-5
PPRF1PRF1
Random597.733.098.949.4
1095.532.697.748.919.597.732.6
2095.532.296.648.319.597.732.6
5092.032.296.648.319.597.732.6
10084.130.792.046.019.195.531.8
Similar570.531.895.547.7
1063.629.287.543.819.396.632.2
2060.226.980.740.317.587.529.2
5056.824.272.736.416.481.827.3
10053.422.768.234.115.778.426.1
Dissimilar596.633.098.949.4
1096.632.296.648.319.898.933.0
2096.632.296.648.319.597.732.6
5094.332.296.648.319.597.732.6
10093.232.296.648.319.396.632.2
Table 15: Complete Arm 2 and Arm 3 retrieval results on SkillsBench. Rows correspond to agent–model, distractor regime, and pool size. Arm 2 reports explicit-selection precision, recall, and F1; Arm 3 reports parsed actual-use precision, recall, F1, and downstream success. Dashes indicate excluded entries.
Agent / ModelPoolkArm 2: Agent SelectionArm 3: Real Execution
PRF1PRF1Succ.
Gemini CLI Gemini-3.1-Pro-PreviewRandom574.475.074.718.669.429.339.2
Random1072.772.772.77.166.412.938.1
Random2080.181.881.03.666.06.839.2
Random5081.284.182.61.465.82.837.6
Random10077.483.080.10.766.01.439.0
Similar554.369.360.917.670.128.138.8
Similar1061.379.569.27.067.312.638.5
Similar2058.477.366.63.766.26.934.0
Similar5059.376.166.71.466.22.736.7
Similar10055.473.963.30.766.71.436.1
Dissimilar574.476.175.314.663.223.734.0
Dissimilar1080.181.881.08.766.015.338.8
Dissimilar2082.483.082.75.165.59.535.6
Dissimilar5079.380.780.01.664.43.138.1
Dissimilar10083.584.183.80.761.61.534.5
Codex GPT-5.4Random581.884.182.933.141.636.824.3
Random1083.086.484.639.259.747.335.5
Random2084.187.585.835.369.346.840.9
Random5071.787.578.815.863.525.435.0
Random10062.285.271.98.173.614.644.8
Similar551.981.863.551.372.460.044.5
Similar1044.483.057.837.566.047.940.7
Similar2035.877.348.927.766.139.144.3
Similar5037.876.150.513.161.821.642.3
Similar10031.970.543.96.754.311.943.0
Dissimilar583.385.284.342.563.050.737.3
Dissimilar1083.085.284.129.761.340.035.0
Dissimilar2082.885.284.012.760.521.031.8
Dissimilar5077.585.281.27.265.112.939.5
Table 16: Complete numerical results for the outcome-annotation ablation. Entries report downstream success for skills constructed under the indicated trajectory mixture. normal exposes source-trajectory outcomes during construction; no-hint withholds them. Terminal-Bench-Pro entries use 130 trials per condition, with missing or infrastructure-error trials counted as failures.
Agent + ModelBenchmarkCreator5s0f4s1f3s2f2s3f1s4f0s5f
Codex GPT-5.3-CodexTB2normal0.75480.72900.78060.68390.70970.5161
no-hint0.76770.73550.58710.49680.55480.3871
SBnormal0.72500.61670.62500.70830.61670.4500
no-hint0.66670.64170.55830.50000.50830.3500
TB-Pronormal0.74550.79390.73330.66670.58180.4303
no-hint0.83640.66060.57580.51520.48480.3758
Gemini CLI Gemini-3.1-Pro-PreviewTB2normal0.79230.76150.74620.70000.69230.4769
no-hint0.42310.49230.40000.36920.52310.4308
SBnormal0.74290.61900.66670.67620.60000.4095
no-hint0.61900.51430.40950.41900.40950.4000
TB-Pronormal0.66920.63080.54620.50770.56920.4615
no-hint0.61540.57690.63850.59230.56920.5154

研究结果

  • 在匹配比较中,Skill的成功率比Workflow Memory高6.06个百分点(95%置信区间为[+0.76, +11.36])
  • 在技能起作用的机制中,程序性锚定(procedural_anchor)占65.7%,而显式知识注入(knowledge_injection)仅占4.5%
  • 候选技能池规模从5扩大到100时,实际执行中被正确使用的技能精确度从29.6%骤降到3.3%
  • 容易混淆的干扰技能会降低离线识别的准确度,但下游任务的成功率基本保持稳定
  • 三种执行方式下的Oracle状态成功率分别为Skill 61.9%、Raw 59.1%、Workflow Memory 55.9%;执行层与验证失败(SC2)的比例从Raw的37.3%、Workflow的33.3%降到Skill的23.5%,但调用与适用边界失败(SC3)相较Raw明显增多(78/528对19/528)

可应用场景

  • 为处理编程或终端操作任务的LLM智能体设计可复用的SKILL.md操作指南时,可以参考本研究中哪些内容真正让技能起效
  • 在构建能够从经验中自我改进的智能体系统时,可以考虑将原始记录蒸馏为标准化程序性文档,而不只是简单积累执行痕迹
  • 在维护不断扩大的技能库时,可将检索质量与执行质量分开评估,以应对本研究观察到的检索精确度随池规模增大而下降的问题

局限与待验证事项

  • 实验主要基于Terminal-Bench、Terminal-Bench-Pro、SkillsBench等终端与软件工程类基准,以及Codex + GPT-5.3-Codex、Gemini CLI + Gemini-3.1-Pro-Preview等特定智能体-模型组合,结论能否推广到其他领域尚未验证
  • RQ4实验因可用性原因改用GPT-5.4而非GPT-5.3-Codex,因此其结果只能作为该组内部的对比来解读,不能与RQ1-RQ3的结果在绝对数值上直接比较
  • 算法逻辑错误(algorithmic_logic_error)和缺乏运行时验证(static_verification_without_runtime)等失败模式在Raw、Workflow Memory、Skill三种条件下都持续存在,说明技能并不能自动修正错误逻辑或替代更强的运行时校验
  • 技能引入了一种新的失败类型(SC3:调用、适用性与边界失败),表现为指导被误用、过度套用或被忽略,采用技能时需要单独关注这一问题

为什么重要

以往对技能的评估大多只看聚合任务成功率,掩盖了技能起作用或失效背后的具体机制,这项研究把这个黑箱拆解成了可观察的行为层面的证据。对于正在构建可自我进化的智能体或维护技能库的从业者来说,这些结果提供了判断技能何时真正有用、何时会带来新问题的实证依据。

本文术语

  • 技能(Skill) · 把“做什么、检查什么、避免什么陷阱”蒸馏成标准化格式(SKILL.md)的紧凑操作指南文档
  • Workflow Memory · 对过往执行轨迹进行清理但仍保留其流程细节的记忆形式,比技能更接近原始轨迹
  • 程序性锚定(Procedural anchoring) · 技能起作用的主要机制,即通过固定配置步骤、工具调用顺序、检查项等行为本身来稳定执行过程,而非提供新的事实信息
  • 开放式编码(Open coding) · 一种定性分析方法,由人工阅读执行轨迹并自由描述观察到的成功或失败模式,再进行归类
  • Oracle状态成功率(Oracle-status success rate) · 以基准测试的验证器(verifier)判定结果为准计算的任务成功率

论文原文摘要(英文)

Skills have emerged as a practical and effective approach for enhancing LLM agents at inference time through structured packages of knowledge. However, existing evaluations largely measure whether skills improve aggregated task success, leaving a more fundamental question underexplored: \textbf{When do skills help, why do they work, and where do they fail?} Through controlled experiments across various benchmarks, agent harnesses and LLMs, we isolate the effects of representation, outcome annotation, retrieval difficulty, and cross-framework robustness of skills. To further answer this question, we design a contrastive study that combines controlled quantitative experiments with paired trajectory analysis. We normalize 8,135 trial records from controlled experiments and retain 238 valid unique labels from 240 open-coded records. We consolidate these observations into a taxonomy of three high-level categories and twelve skill-use modes: skills work when noisy trajectories become procedural anchors that stabilize execution. Skills improve over Workflow Memory by 6.06 points in matched comparisons. Procedural anchoring accounts for 65.7\% of skill cases, versus 4.5\% for explicit knowledge injection, showing that skills stabilize action rather than inject missing facts. Retrieval is a separate bottleneck: as pools grow from 5 to 100, actual-use precision falls from 29.6\% to 3.3\%. Confusable distractors impair offline identification, yet downstream success remains stable; exact ground-truth invocation is neither sufficient nor necessary. Skills fail under brittle assumptions, incompatible contexts, or insufficient adaptation. These findings move evaluation beyond aggregate success rates and guide reliable self-evolving agents.

作者 · Zhiyuan Jiang

在 arXiv 阅读

最新论文

全部论文 →

METAL MEDIA 最新报道

图片来源: Zhiyuan Jiang et al., arXiv:2608.14036, arxiv-nonexclusive