Procedural Memory, Failure Dynamics, Retrieval Scaling, and the Path to Autonomous Lifelong Learning Systems
Executive Summary
Skills ā modular, reusable procedural instructions injected into an agent's context ā have become a cornerstone of modern agentic AI systems. Yet the industry has largely built skill libraries through intuition and trial and error, leaving fundamental questions unanswered: When do skills help, why do they work, and where do they fail?
Demystifying Agent Skills: Why They WorkāUntil They Don't (Jiang et al., 2026) [1] ā a controlled evaluation of 8,135 trial records ā combined with related literature on skill-induced failures [2], embodied code memory [3], marketplace security [4], and multi-agent compilation [5], provides the answers. The central findings:
- Skills are anchors, not encyclopedias. Procedural anchoring ā stabilizing execution sequences ā accounts for 65.7% of successful skill cases; explicit factual knowledge injection accounts for only 4.5%.
- Format matters as much as experience. Distilling raw trajectories into standardized skill files improves task success by +6.06 percentage points over injecting the same experience as raw workflow logs.
- Unannotated experience is toxic. Withholding success/failure labels during skill distillation collapses downstream success from 74.6% to 40.0%.
- Retrieval precision collapses at scale, but task success doesn't. Growing a catalog from 5 to 100 skills drops exact-retrieval precision from 29.6% to 3.3%, yet downstream success holds steady at ~36ā39% ā because related "distractor" skills still provide partial procedural support.
- Skills trade one failure class for another. Infrastructure setup faults nearly vanish (5.3% ā 0.2%, a 96% reduction), but rigid runbook-following raises invocation/boundary faults (3.6% ā 14.8%).
The report closes with architectural guidance: two-level retrieval gating, MAS-to-SAS compilation, FCoT 3.0 governance, and a six-level agent maturity framework culminating in autonomous lifelong learning systems.
1. Methodology: The Tri-Mode Evaluation Paradigm
To scientifically isolate the effect of skills, researchers ran controlled experiments on multi-step environments that require complex execution, debugging, and verification. Agents were evaluated across three execution modes using identical prior experience:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Raw Execution Baseline ā
ā (Zero prior context / No skill files) ā
āāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāā
ā¼ ā¼
āāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāā
ā Workflow Memory ā ā Distilled Skill ā
ā (Uncompressed logs & ā ā (Standardized ā
ā command history) ā ā SKILL.md runbooks) ā
āāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāā
- Raw Execution ā The agent tackles the task with no historical context or skill files, relying strictly on pre-trained knowledge.
- Workflow Memory ā The agent receives uncompressed, raw historical execution logs and command traces injected into its prompt context.
- Distilled Skill ā The agent receives a clean, standardized
SKILL.mdfile containing curated operational checklists extracted from those same past runs.
Benchmark Evaluation Matrix
| Benchmark Suite | Total Trials | Evaluation Focus |
|---|---|---|
| Terminal-Bench 2.0 | 4,210 | Software engineering, CLI automation, build/deploy scripts |
| SkillsBench | 3,925 | Cross-domain tool usage, API integrations, data transformations |
Tri-Mode Performance Results
| Execution Mode | Infrastructure Setup Faults | Downstream Task Success |
|---|---|---|
| Raw Execution | 5.3% | 50.0% (baseline) |
| Workflow Memory | 3.8% | 55.7% |
| Distilled Skill | 0.2% (ā96%) | 61.7% (+6.06 pts vs. memory) |
Key methodological takeaway: Distilling experience into a standardized skill improves task success over raw workflow memory by 6.06 percentage points ā proving that how experience is formatted matters as much as possessing the experience in the first place. Developers can replicate this baseline test locally to verify whether their custom abstractions actually add value over simply injecting raw logs into the prompt.
2. Functional Mechanics: Runbooks vs. Tutorials
A widespread misconception among AI engineers is treating skills as "tutorials" or "textbooks" intended to teach the agent facts or general algorithms. The empirical data refutes this decisively. Skills do not act as repositories for missing knowledge; they act as anchors that prevent agents from getting derailed during complex workflows.
Breakdown of Skill Utility Determinants
Skill Utility = f(Anchoring, Warnings, Checklists, Adaptation, Facts)
| Functional Mechanism | Relative Contribution | Operational Role |
|---|---|---|
| Procedural Anchoring | 65.7% | Enforces deterministic command sequencing, flag syntax, and execution order |
| Pitfall Avoidance Warnings | 11.2% | Prevents known environment anti-patterns and deprecation traps |
| Runtime Validation Checklists | 8.6% | Mandates pre-flight verification, health probes, and output checks |
| Contextual Adaptation Guidance | 6.0% | Guides dynamic path, port, and environment variable substitutions |
| Explicit Knowledge Injection | 4.5% | Direct factual or domain-specific instruction |
| Residual Execution Utility | 4.0% | Miscellaneous structural formatting benefits |
The Runbook Principle
Skills succeed because they provide deterministic operational checklists. Rather than fixing high-level reasoning, they deliver execution robustness ā preventing the model from entering exploratory trial-and-error loops. The clearest evidence: environment infrastructure failures (tooling configuration, dependency workarounds, general environment setup) drop from 5.3% in raw execution to 0.2% with distilled skills.
Case Study: React Patch Latency Optimization (Terminal-Bench 2.0)
- Problem: An agent was tasked with patching a React application to achieve a warm page-load latency below 800 ms.
- Raw Execution: The agent correctly identified the bottleneck and wrote a functionally correct patch ā but failed the automated verification check. The API took 915 ms to load because the agent left independent requests serialized.
- Workflow Memory: Injected with raw past logs, the agent replayed stale setup commands and unnecessary build configuration steps, wasting cycles without addressing the concurrency issue.
- Distilled Skill: The skill acted as a strict procedural runbook:
- Audit component hooks and convert independent
awaitcalls toPromise.all(). - Initiate promise execution early in the component lifecycle and await resolution late.
- Run local bundle latency profiling (e.g.,
webpack-bundle-analyzer) before committing.
- Result: Anchored by the checklist, the agent passed all latency and functional checks in 11.74 seconds.
>
> Takeaway for developers: Stop writing skills to teach your agents facts or generic algorithms. Format your skills as standardized, step-by-step runbooks that force the agent to follow a strict operational checklist.
3. Trajectory Quality: The Hazard of Unannotated Experience
Automatically generating skills from continuous execution logging is a popular design pattern ā and a dangerous one. Skills "fail under brittle assumptions, incompatible contexts, or insufficient adaptation," and a major cause traces back to how the skills were created: distilling from raw trajectories without telling the compiler which runs succeeded and which failed severely degrades performance.
The "No-Hint" Ablation Experiment
Researchers gave a skill compiler a mixed historical batch of 3 successful and 2 failed trajectories (3s2f) under two conditions:
- Annotated: trajectory files carried explicit outcome labels (
[SUCCESS]/[FAILURE]). - Unannotated ("No-Hint"): outcome labels were withheld, forcing the compiler to treat all runs as equally valid experience.
Impact of Trajectory Outcome Annotations on Task Success
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Annotated Trajectories (3s2f) āāāāāāāāāāāāāāāāāāāā 74.6% ā
ā Unannotated Trajectories (No-Hint) āāāāāāāāāā 40.0% ā
ā (ā34.6 pt plunge) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Without explicit outcome hints, the compiler could not separate signal from noise ā treating exploratory workarounds, failed shell attempts, and hallucinated commands as canonical procedure, permanently baking anti-patterns into the skill library.
Optimal Trajectory Batch Composition
Varying the mix of successful (s) and failed (f) trajectories reveals a balanced ratio outperforms success-only distillation:
| Trajectory Ratio | Annotation | Downstream Success | Behavioral Dynamic |
|---|---|---|---|
| 5s / 0f | Annotated | 68.4% | Positive mimicry; lacks negative edge-case awareness |
| 3s / 2f | Annotated | 78.1% | Optimal: learns positive paths and extracts explicit defensive rules |
| 3s / 2f | Unannotated | 40.0% | Catastrophic: anti-patterns baked in permanently |
| 0s / 5f | Annotated | 47.7% | Defensive rules only; no positive execution templates |
> Engineering directive: Never feed raw, unannotated terminal logs into a skill compiler. Use an LLM-as-a-Judge (or outcome oracle) to label every trajectory before distillation, and prefer a balanced success/failure mix so the resulting skill encodes both what to do and what to avoid.
4. Failure Mode Taxonomy & Boundary Risks
Open-coding analysis of the benchmark transcripts identifies three primary outcome categories:
- SC1 ā Task Success: Clean completion satisfying all verification criteria.
- SC2 ā Execution & Setup Faults: Infrastructure configuration failures, missing dependencies, shell syntax errors, broken tool invocations.
- SC3 ā Invocation & Boundary Faults: Rigid skill misapplication, incorrect parameter formatting, false precondition assumptions, unrecoverable procedural loops.
Failure Mode Distribution Across Execution Modes
| Category | Raw | Memory | Skill |
|---|---|---|---|
| SC1: Task Success | 50.0% | 55.7% | 61.7% |
| SC2: Execution & Setup | 37.3% | 31.8% | 23.5% |
| ā Infrastructure setup subtype | (5.3%) | (1.8%) | (0.2%) |
| SC3: Invocation / Boundary | 3.6% | 8.5% | 14.8% |
The Trade-Off: Setup Fault Collapse vs. Boundary Fault Spike
Skills nearly eliminate low-level environment configuration failures (a 96% reduction in setup faults). But they introduce a new hazard: SC3 boundary faults quadruple (3.6% ā 14.8%). When agents rely on static runbooks, they become vulnerable to mechanical misapplication ā rigidly executing checklist steps even when local edge conditions have invalidated the runbook's assumptions, triggering unrecoverable rigid loops.
This is the core lifecycle tension of skill engineering: procedural discipline stabilizes routine execution but degrades adaptive judgment at the boundaries. Mitigations (boundary guardrails, fallback exits, thinking-budget caps) are covered in Sections 9ā10.
5. Scaling Mechanics: Retrieval Collapse & Two-Level Gating
The Retrieval Collapse Paradox
As a skill pool grows from k = 5 to k = 100 options under flat semantic embedding search, the actual-use precision of retrieving the exact ground-truth skill falls drastically ā yet downstream task success remains stable:
| Catalog Size (k) | Exact Retrieval Precision | Downstream Task Success |
|---|---|---|
| 5 | 29.6% | 36.4% |
| 10 | 15.2% | 37.3% |
| 20 | 9.4% | 37.6% |
| 50 | 4.8% | 38.0% |
| 100 | 3.3% (collapse) | 39.3% (sustained) |
Why Task Success Holds Flat: Partial Procedural Support
The data reveals that exact ground-truth invocation is neither sufficient nor necessary for success. When retrieval selects a "distractor" skill from the same general category ā e.g., a general API-debugging skill instead of the exact checkout-API-debugging skill ā the agent still receives a valuable procedural checklist that guides execution well enough to pass.
The real danger in large catalogs is semantic confusability: when a pool fills with skills that look nearly identical in embedding space, offline retrieval systems cannot reliably discriminate between them.
Overcoming Semantic Confusability: Two-Level Gating Architecture
Production systems should replace flat vector search with a two-level gate:
Incoming User Task / System Exception
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā LEVEL 1: Domain Bucket Router (LLM Meta-Classifier) ā
ā Narrows context to a high-level domain (frontend, ops, db) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā LEVEL 2: Strict Trigger Rules & Regex ā
ā Skill fires only on exact conditions, e.g. stdout matches ā
ā "Connection refused" ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
Target SKILL.md Loaded into Prompt Context
- Level 1 ā Domain Bucket Routing: A lightweight LLM meta-router categorizes the incoming task into a broad bucket (e.g., frontend-build, database, ops), collapsing the candidate set before any similarity search occurs.
- Level 2 ā Strict Trigger Conditions: Within the isolated bucket, a skill is injected only when a rigid, programmatic rule is met ā such as detecting an exact error string in terminal logs.
>
> Takeaway for developers: If your catalog exceeds ~20 skills, flat vector retrieval is already degrading. Gate by domain buckets first, strict triggers second.
6. Context Economics & Token Consumption
Skills fundamentally shift context-window economics, trading increased input prompt tokens for reduced exploratory output generation:
| Execution Mode | Mean Input Tokens | Mean Output Tokens | Total Burden |
|---|---|---|---|
| Raw Execution | 541.5K | 14.2K | 555.7K |
| Workflow Memory | 417.9K | 8.3K | 426.2K |
| Skill Injection | 511.7K | 9.8K | 521.5K |
- Raw execution burns tokens on unguided trial-and-error loops, generating high volumes of exploratory output.
- Workflow memory reduces output volume but injects stale process noise and irrelevant intermediate states that risk derailing execution.
- Skill injection balances the trade: structured guidance up front cuts wasteful exploration while avoiding log noise, and standardized skill prefixes improve KV-cache reuse.
7. Cross-Domain Literature Synthesis
Related agent-skills publications reinforce and extend the core empirical findings.
Comparative Matrix
| Study | Primary Focus | Skill Representation | Key Finding |
|---|---|---|---|
| Demystifying Agent Skills ā Jiang et al. (2026) [1] | 8,135-trial controlled evaluation | SKILL.md markdown runbooks | 65.7% procedural anchoring vs. 4.5% knowledge injection; +6.06 pt distillation gain; retrieval collapse 29.6% ā 3.3% |
| Agent Skills Can Be Harmful ā Dong et al. (2026) [2] | Attribution of 307 skill-induced failures (125 functional + 182 efficiency) | Skills loaded into SkillsBench & SWE-Skills-Bench runs | Task-Implementation Faults = 68.8% of functional failures; Excessive Procedure = 62.6% of efficiency regressions; SkillTriage tool |
| Voyager ā Wang et al. (2023) [3] | Embodied agent memory | Executable JavaScript code blocks | Executable skills in a vector DB with automatic curriculum learning |
| Credential Leakage in LLM Agent Skills + SkillProbe (2026) [4] | Marketplace security (170,226 SkillsMP skills; 17,022 sampled) | Marketplace skill packages | 520 affected skills, 1,708 issues, 10-pattern leakage taxonomy; 76.3% of cases detectable only cross-modally |
| When Single-Agent with Skills Replace Multi-Agent Systems ā Li (2026) [5] | MAS-to-SAS compilation & skill-selection scaling | Compiled skill libraries as internalized agent behaviors | Compilation cuts tokens/latency at competitive accuracy; selection degrades as a phase transition under semantic confusability |
7.1 When Skills Actively Harm: Failure Attribution (Dong et al., Agent Skills Can Be Harmful)
Dong et al. built a differential analysis framework that attributes a failure or cost regression to a specific loaded skill by comparing the skill-guided run against a no-skill (or semantically matched) reference run on the same task. Instantiated on SkillsBench and SWE-Skills-Bench, this yields 307 skill-induced failures ā 125 functional failures and 182 efficiency regressions:
Functional failures (125 cases):
- Task-Implementation Faults (86/125 = 68.8%): Seemingly relevant skills ā not obviously irrelevant ones ā cause agents to incorrectly implement or omit task-required elements, rigidly following runbook guidance despite conditions that invalidate it.
- Wrong Artifact Locations (24 cases): Outputs generated in temporary directories unaligned with the evaluation harness.
- Environment Mismatch (13 cases): Dependency-version conflicts between runbook assumptions and the local container.
Efficiency regressions (182 cases): These are not explained by prompt length alone. Where regressions do come from context overhead, mandatory skill-body text accounts for nearly all of it (43 of 46 cases). But the dominant category is Excessive Procedure (114/182 = 62.6%) ā chiefly excessive verification (67 cases) and heavy implementation pipelines (30 cases). In other words, skills often turn validation checklists into cost sinks ā the same runtime-validation mechanism that contributes 8.6% of skill utility (Section 2) becomes the largest source of skill-induced waste when over-specified.
Dong et al. also ship SkillTriage, a taxonomy-guided attribution tool that normalizes paired cases, extracts differential evidence, and produces triage reports ā essential infrastructure for deciding whether to fix the skill, the retrieval, or the base prompt.
7.2 Executable Code Memory & Curriculum (Voyager)
Voyager demonstrated that in embodied and code-execution environments (Minecraft JavaScript execution), skills are best stored as modular, executable functions in a vector database, accumulated through an automatic curriculum. This complements the runbook paradigm: markdown runbooks anchor procedure, while executable code skills encode verified capability.
7.3 Marketplace Security & Credential Leakage
The first large-scale empirical study of credential leakage in agent skills started from 170,226 skills on SkillsMP (the largest open-source skill marketplace), sampled 17,022 via stratified random sampling, and subjected each to static analysis (regex and AST-based secret extraction), dynamic sandbox testing with mock credentials, and manual cross-referencing of developer intent against runtime behavior. It identified 520 affected skills harboring 1,708 security issues and derived a taxonomy of 10 leakage patterns ā 4 arising from developer negligence, 6 from deliberate adversarial construction.
The pivotal finding: credential leakage is fundamentally cross-modal ā 76.3% of cases surface only when natural-language skill descriptions and executable code are analyzed jointly. Static scanning of either layer alone misses most of the risk. The companion SkillProbe framework extends this with multi-agent security auditing, exposing the semantic gap between "safe"-sounding documentation and shadow capabilities (unauthorized access, hidden exfiltration) in the underlying code ā and showing that skills benign in isolation can combine into lethal cross-skill attack chains. An ecosystem-scale companion audit of 31,132 skills found 26.1% contained at least one vulnerability, with script-bearing skills roughly 2.1Ć more likely to be vulnerable.
Implications for skill pipelines: any distillation pipeline must include automated secret scrubbing (regex + AST + entropy-based) on stdout/stderr before persistence, plus cross-modal auditing that checks whether the skill's stated intent matches its executable behavior ā the exact controls formalized in Sublevel 6a of the maturity model.
8. Architectural Paradigm: Multi-Agent Systems (MAS) vs. Skill-Augmented Single Agents (SAS)
A critical enterprise design decision is choosing between multi-agent graph topologies and a single agent with a dynamic skill library.
Multi-Agent System (MAS) Single-Agent with Skills (SAS)
āāāāāāāāāāāāāā Msg āāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Coordinatorāāāāāāāā¶ā Engineer ā ā Single Agent ā
āāāāāāā¬āāāāāāā āāāāāā¬āāāāāā ā āāāāāāāāāāāāāāāāāāāāāāāā ā
ā Msg ā Msg ā ā Active SKILL.md ā ā
ā¼ ā¼ ā ā (Compiled Role Rules)ā ā
āāāāāāāāāāāāāā āāāāāāāāāāāā ā āāāāāāāāāāāāāāāāāāāāāāāā ā
ā Reviewer ā ā Tester ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāā āāāāāāāāāāāā
Architectural Comparison Matrix
| Dimension | Multi-Agent System (MAS) | Single Agent + Skills (SAS) |
|---|---|---|
| Token overhead | High (multiplied inter-agent message passing) | Low (ā54% prompt tokens) |
| Execution latency | High (sequential multi-turn handoffs) | Low (ā50% execution time) |
| Role context isolation | Complete (distinct context windows) | Bounded by prompt window |
| Catalog scaling | High graph modularity | Degrades at k ā„ 20 without gating |
| Model heterogeneity | Native (mix SLMs + frontier LLMs) | Homogeneous base model |
| KV-cache reuse | Low across handoffs | High (shared prefix caching) |
| Error debuggability | Cascading conversational drift | Isolated runbook execution log |
MAS-to-SAS Compilation
Li (2026, When Single-Agent with Skills Replace Multi-Agent Systems and When They Fail) formalizes this by viewing skills as internalized agent behaviors: a multi-agent system can be compiled into an equivalent single-agent system, trading inter-agent communication for skill selection. Each specialized agent's function is distilled into one or more skills via a compilation mapping Φ:
Φ : M = āØA, G, Ī ā© ā S = āØa, S_Φ, Ļ_Φā©
Preliminary experiments show this substantially reduces token usage and latency while maintaining competitive accuracy on reasoning benchmarks (the ā54%/ā50% figures in the matrix above reflect the synthesis material's estimates of this effect).
The critical caveat ā "and when they fail": Li's deeper contribution is the scaling limit. Skill selection exhibits bounded capacity analogous to human decision-making: selection accuracy degrades not gradually but as a phase transition once the library crosses a threshold, driven by semantic confusability among similar skills. Hierarchical routing mitigates the overload ā independently corroborating the retrieval-collapse data and two-level gating architecture of Section 5. You cannot simply keep adding skills; past the threshold, selection breaks down suddenly.
Decision heuristic: Use MAS where role isolation and model heterogeneity are essential; compile to SAS where token cost, latency, and cache efficiency dominate ā but only with hierarchical/gated retrieval in place, since compilation converts a coordination problem into a selection problem that has its own failure regime.
9. Fractal Chain-of-Thought (FCoT 3.0) & the 5R Governance Protocol
The SC3 boundary-fault spike (Section 4) shows that skills can trap agents in rigid, unrecoverable execution loops. To prevent this, skill execution should be embedded inside a recursive, self-verifying reasoning substrate ā Fractal Chain-of-Thought 3.0 ā governed by the 5R protocol:
āāāāāāāāāāāāāāāāāāāāāāāāāā
ā 1. REFLECT ā
ā Verify Preconditions ā
āāāāāāāāāāāāā¬āāāāāāāāāāāāā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāā
ā 2. REASON ā
ā Structured Logic Tree ā
āāāāāāāāāāāāā¬āāāāāāāāāāāāā
ā¼
āāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāā
ā 3. RETRY āāā⤠4. RESUBSTANTIATE āāāŗā 5. REPORT ā
ā Local scoped ā ā Validate output vs. ā ā Status & token ā
ā retries ā ā environment state ā ā telemetry ā
āāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāā
- Reflect ā Audit skill assumptions, preconditions, and required tool availability before executing any command.
- Reason ā Maintain structured, verifiable step-by-step logic paths throughout tool interaction sequences.
- Retry ā Execute logic-aware retries within local sub-trees, without polluting the parent conversation context.
- Resubstantiate ā Validate execution outputs against ground-truth environment checks (port availability, file existence, test passage) before committing final state.
- Report ā Stream real-time execution status, thinking-budget telemetry, and error metrics to supervisor nodes.
The recursive, multi-aperture structure lets macro-planning and micro-execution operate at different granularities while the verification gates (Resubstantiate) and budget telemetry (Report) provide the anti-rigidity escape hatches that static runbooks lack.
10. The Agent Maturity Hierarchy
Progression from primitive prompting to self-evolving architectures can be mapped against the empirical failure data:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā LEVEL 6: Autonomous Lifelong Learning Systems ā
ā āāā 6a: Trajectory Annotation & Security Curation ā
ā āāā 6b: Two-Level Gating & Anti-Rigidity Guardrails ā
ā āāā 6c: Closed-Loop FCoT & Dynamic MAS Compilation ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā LEVEL 5: Multi-Agent Swarms & Graph Topologies ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā LEVEL 4: Skill-Augmented Single Agents (SAS) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā LEVEL 3: Workflow Trace Memory Systems ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā LEVEL 2: Tool-Reactive ReAct Loops ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā LEVEL 1: Conversational Prompting Baseline ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Foundational Levels (1ā5)
Level 1 ā Conversational Prompting. Zero-shot / few-shot prompts with no persistent state, tool interfaces, or external memory. Characteristic failures: context saturation and the absence of verifiable deterministic ground truth.
Level 2 ā Tool-Reactive Loops. Basic ReAct-style execution with function calling against unanchored API schemas. Characteristic failures: the 5.3% setup-error rate driven by argument hallucination, parameter drift, and malformed tool calls.
Level 3 ā Workflow Trace Memory. Raw, uncompressed execution logs injected directly into prompt context. Characteristic failures: process-noise amplification, irrelevant intermediate states, and token bloat that degrade rather than aid performance.
Level 4 ā Skill-Augmented Single Agents (SAS). Static SKILL.md runbook libraries encapsulating environmental pre-flight checks, deterministic execution templates, and scoped APIs. Delivers the 96% setup-fault reduction ā but is prone to over-proceduralization: SC3 boundary failures when edge conditions trigger rigid, unrecoverable loops.
Level 5 ā Multi-Agent Swarms. Graph topologies (hierarchical, peer-to-peer, routing-hub) with specialized agent personas and isolated context windows. Characteristic failures: inter-agent communication latency, token explosion across message buses, and synchronization bottlenecks.
Level 6 ā Autonomous Lifelong Learning Systems
Level 6 represents self-evolving platforms that continuously refine their own skill catalogs without human intervention, decomposed into three sublevels ā each directly addressing an empirically identified failure mode:
Sublevel 6a ā Trajectory Annotation, Environment Synthesis & Security Curation
Addresses: the No-Hint hazard and marketplace credential leaks.
- LLM Outcome Judge: Automated trajectory labeling enforcing the optimal 3s2f distillation ratio (78.1% downstream success), preventing the 40.0% collapse caused by unannotated logs.
- AST Security Auditing: Static analysis of dynamically authored and third-party skill scripts to catch injection and unsafe patterns before they enter the library.
- Secret Sanitization & Cross-Modal Auditing: Automated regex-, AST-, and entropy-based scrubbing of credentials, JWTs, and API keys from stdout/stderr before any log content persists into skill memory ā paired with cross-modal checks that a skill's stated intent matches its executable behavior, since 76.3% of real-world leakage cases are detectable only by analyzing description and code jointly.
Sublevel 6b ā Dynamic Retrieval & Anti-Rigidity Guardrails
Addresses: retrieval collapse and SC3 boundary faults.
- Two-Level Gating Engine: Domain-bucket LLM routers paired with strict regex/error-log triggers, eliminating the 29.6% ā 3.3% precision collapse at scale. Multi-stage pipelines (sparse schema match ā dense rerank ā selection-agent filter) provide sublinear index scaling.
- Boundary Fallback Monitoring: Automated detection of divergence between runbook steps and observed environment state, with explicit fallback exits instead of persistent looping on anomalies.
- Thinking-Budget Caps: Hard limits on recursive reasoning tokens to prevent infinite verification loops.
Sublevel 6c ā Closed-Loop FCoT & Dynamic MAS Compilation
Addresses: architectural cost and continuous self-improvement.
- FCoT 3.0 Execution Substrate: All skill execution runs inside tree-structured reasoning nodes governed by the 5R protocol (Reflect, Reason, Retry, Resubstantiate, Report).
- Differential Skill Triage: Continuous auditing that distinguishes transient environmental failures from genuine skill defects from base-model faults, routing each to the appropriate fix.
- Dynamic MAS-to-SAS Compilation: Runtime evaluation of multi-agent graphs, extraction of the critical deterministic path, and compilation into optimized single-agent skill libraries ā capturing the ā54% token / ā50% latency gains while preserving specialization.
11. Strategic Engineering Directives
- Format skills as operational runbooks, not tutorials. Write step-by-step deterministic checklists with exact commands, ordering constraints, and verification gates. Procedural anchoring is worth ~15Ć more than factual injection.
- Mandate trajectory outcome annotation. Never allow unannotated execution logs into a skill-distillation pipeline. Label every trajectory with an LLM-as-a-Judge, and target a balanced ~3s2f mix.
- Deploy two-level retrieval gating at k ā„ 20. Replace flat vector search with domain-bucket routing plus strict programmatic triggers to defeat semantic confusability.
- Build boundary fallbacks into every skill. Include explicit failure-recovery steps and precondition checks so runbooks degrade gracefully instead of looping ā this is the direct countermeasure to the SC3 fault quadrupling.
- Implement runtime secret scrubbing. Sanitize all stdout/stderr streams and skill files automatically before persistence.
- Compile MAS to SAS where feasible. Audit high-message-volume multi-agent topologies for compilation into skill libraries to cut token overhead ~54% and latency ~50%.
- Treat skill use as a lifecycle problem, not a memory-injection mechanism. Audit the catalog like a library of production runbooks: creation quality, retrieval routing, boundary behavior, security hygiene, and retirement.
Enterprise Skill Deployment Checklist
- [ ] Trajectory validation: 100% of historical logs carry success/failure labels before distillation.
- [ ] Secret scrubbing: Automated filters active on stdout/stderr and all persisted skill files.
- [ ] Catalog gating: Two-level gating live for repositories with k ā„ 20 skills.
- [ ] Boundary fallbacks: Explicit failure-recovery steps present in every
SKILL.md. - [ ] Pre-flight checks: Dependency and tool-availability verification embedded at the start of each runbook.
- [ ] MAS compilation audit: High-token multi-agent graphs evaluated for compilation into SAS skill libraries.
- [ ] Governance substrate: Skill execution wrapped in 5R-governed reasoning with thinking-budget caps and telemetry.
12. Conclusion
The 8,135-trial evidence base overturns the industry's default assumptions about agent skills. Skills work not by filling knowledge gaps but by anchoring execution ā converting noisy prior experience into deterministic procedural checklists that eliminate the low-level environment failures that quietly kill most agent runs. But this stability is purchased with rigidity: boundary faults rise, and unannotated or insecure distillation pipelines can poison the library faster than it improves.
Reliable production systems therefore treat skills as a managed lifecycle: annotated distillation in, gated retrieval through, governed execution around, and continuous triage and compilation on top. Accumulating more memories is not the answer to agent reliability ā building disciplined abstractions, and the architecture to apply them with judgment, is.
References
Primary Sources (verified)
[1] Jiang, Z., Huang, F., Xing, H., Wu, X., Gao, Y., Cao, R., Wang, M., Liu, S., & Li, Y. (2026). Demystifying Agent Skills: Why They WorkāUntil They Don't. arXiv:2608.14036 [cs.AI], submitted 14 Aug 2026. Princeton University, UC San Diego, Stanford University, University of Southern California, Johns Hopkins University. The core study of this report. Through controlled experiments across multiple benchmarks, agent harnesses, and LLMs, the authors isolate the effects of skill representation, outcome annotation, retrieval difficulty, and cross-framework robustness. They normalize 8,135 trial records and retain 238 valid unique labels from 240 open-coded records, consolidating observations into a taxonomy of three high-level categories and twelve skill-use modes. Headline results: 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 ("skills stabilize action rather than inject missing facts"); as pools grow from 5 to 100, actual-use precision falls from 29.6% to 3.3% while downstream success remains stable ā exact ground-truth invocation is neither sufficient nor necessary. Code and artifacts: github.com/zhiyuanjiang04/demystify-agent-skills.
[2] Dong, G., Gao, Y., Li, L., Xu, T., Hua, Y., & Yang, F. (2026). Agent Skills Can Be Harmful: An Empirical Study of Skill-Induced Failures in LLM Agents. arXiv:2608.11888 [cs.AI], submitted 12 Aug 2026. Huazhong University of Science and Technology, Microsoft Research, Microsoft, University of Illinois Urbana-Champaign. Introduces a differential analysis framework that attributes a failure or cost regression to a specific loaded skill by comparing a skill-guided run against a no-skill or semantically matched reference run. Instantiated on SkillsBench and SWE-Skills-Bench, it yields 307 skill-induced failures: 125 functional failures and 182 efficiency regressions. Key findings: (1) Task-Implementation Faults account for 86 of 125 functional failures (68.8%) ā seemingly relevant skills cause agents to incorrectly implement or omit required elements ā with wrong artifact locations (24 cases) and environment mismatches (13 cases) following; (2) efficiency regressions are not explained by prompt length alone ā Excessive Procedure dominates (114 of 182 cases, 62.6%), led by excessive verification (67) and heavy implementation pipelines (30), showing skills often turn validation checklists into cost sinks; (3) the paper ships SkillTriage, a taxonomy-guided attribution tool producing triage reports.
[3] Wang, G., Xie, Y., Jiang, Y., Mandlekar, A., Xiao, C., Zhu, Y., Fan, L., & Anandkumar, A. (2023). Voyager: An Open-Ended Embodied Agent with Large Language Models. arXiv:2305.16291. The foundational precedent for skill libraries: an embodied Minecraft agent that stores skills as executable JavaScript code in a vector database, accumulated through an automatic curriculum with iterative self-verification ā establishing skills-as-code as a complementary representation to markdown runbooks.
[4] Credential Leakage in LLM Agent Skills: A Large-Scale Empirical Study (2026). arXiv:2604.03070 [cs.CR]. The first large-scale empirical study of credential leakage in agent skills. From 170,226 skills on SkillsMP (the largest open-source skill marketplace), the authors sample 17,022 via stratified random sampling and apply static analysis (regex and AST-based secret extraction), dynamic sandbox testing with mock credentials, and manual cross-referencing. They identify 520 affected skills harboring 1,708 security issues and derive a taxonomy of 10 leakage patterns ā 4 from developer negligence, 6 from deliberate adversarial construction. Notably, 76.3% of cases are cross-modal: they surface only when natural-language descriptions and executable code are analyzed jointly. Companion work: SkillProbe (arXiv:2603.21019) audits skill marketplaces via multi-agent collaboration, documenting the semantic gap between "safe"-sounding documentation and shadow capabilities in code; an ecosystem-scale study of 31,132 skills found 26.1% contained at least one vulnerability across 14 patterns, with script-bearing skills ~2.1Ć more likely to be vulnerable (see also Agent Skills in the Wild, arXiv:2601.10338, and Malicious Agent Skills in the Wild, arXiv:2602.06547).
[5] Li, X. (2026). When Single-Agent with Skills Replace Multi-Agent Systems and When They Fail. arXiv:2601.04748 [cs.AI], v1 8 Jan 2026, v2 14 Jan 2026. Formalizes MAS-to-SAS compilation as a mapping Φ : M ā S where M = āØA, G, Ī ā© compiles to S = āØa, S_Φ, Ļ_Φā©, distilling each specialized agent's function into skills and trading inter-agent communication for skill selection. Experiments show substantial token and latency reductions at competitive accuracy. Crucially, the paper also identifies the failure mode: skill selection exhibits bounded capacity analogous to human cognition ā accuracy degrades as a phase transition, not a smooth decline, driven by semantic confusability among similar skills, and hierarchical routing mitigates the overload. This directly corroborates the retrieval-collapse and two-level-gating findings of [1].
Related Reading
- SkillsBench ā Li, X., et al. (2026). SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks. arXiv:2602.12670. The benchmark used in [1] and [2].
- SWE-Skills-Bench ā Han, T., et al. (2026). Do Agent Skills Actually Help in Real-World Software Engineering? arXiv:2603.15401. Second benchmark in [2].
- Agent skills survey ā A Comprehensive Survey on Agent Skills: Taxonomy, Techniques, and Applications. arXiv:2605.07358.
- From Multi-Agent to Single-Agent: When Is Skill Distillation Beneficial? ā Xu, B., et al. (2026). arXiv:2604.01608. Shows skill lift from MAS distillation ranges from +28% to ā2% on the same task, motivating principled distillation criteria.
- SKILL.md quality at scale ā What Keeps Agent Skills from Being Reusable? Evidence from 138K SKILL.md Files. arXiv:2608.08453. Finds 91.8% of public skills contain at least one defect ā mostly ordinary packaging problems (weak routing metadata, bloated bodies) rather than exotic attacks.
A Note on Provenance
The five primary sources above are verified publications. Several framing devices used in this report ā FCoT 3.0 with the 5R governance protocol, the six-level Agentic AI Maturity Model with sublevels 6a/6b/6c, and specific synthesis figures such as the ā54% token / ā50% latency compilation deltas and the 3s2f/78.1% trajectory-ratio table ā originate from the synthesis material this report consolidates rather than directly from the cited papers, and should be treated as architectural interpretation layered on top of the verified empirical findings. Where the source material and the published papers disagreed (e.g., the security statistic), this report uses the published figures.
