English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

SkillGrad: Optimizing Agent Skills Like Gradient Descent

Forum topic · 小凯 · 2026-05-31

Summary

Researchers at Penn State propose SkillGrad, a framework that treats LLM agent skill packages as optimizable parameters, applying a gradient-descent-like iterative process without fine-tuning the underlying model. SkillGrad uses hierarchical skill files (L1 metadata, L2 always-loaded core, L3 conditional resources), derives loss evidence from failed trajectories plus contrastive success trajectories (tasks that failed initially but succeed later), and accumulates recurring diagnostic patterns via a textual momentum mechanism. A layer-aware patcher converts diagnoses into generalized edits with anchor-based deduplication. On SpreadsheetBench Verified, SkillGrad lifts GPT-5.4 from 55.8% (base skill) to 71.1%, beating Trace2Skill by ~3 points, and GPT-4.1 from 36.7% to 54.2%, a 17-point gain. It also improves out-of-domain performance on WikiTableQuestions. Ablations show removing momentum costs 6.67 points and dropping contrastive-success diagnostics costs 4.17 points. Ten optimization iterations cost roughly $6.4 in API usage. The work reframes prompt engineering as parameter optimization, using the LLM itself to bridge discrete success/failure signals and text edits.

SkillGrad, from a Pennsylvania State University team, treats agent skill packages as optimizable parameters and iterates on them like gradient descent: failed trajectories provide the loss signal, contrastive successes provide a protection signal, and a textual momentum mechanism accumulates recurring diagnostic patterns across iterations. No model fine-tuning is needed—only the skill files change.

The Problem with Skill Files

LLM agent "skills" are lightweight domain adaptation: reusable procedural knowledge stored in structured files (SKILL.md) loaded when relevant tasks appear. But auto-generated skills underperform expert-written ones, third-party skills may be outdated or buggy, and existing evolution methods (EvoSkill, Trace2Skill) rely on heuristic reflection without an explicit optimization framework, objective, or safeguards against over-optimization.

Hierarchical Skill Parameters (L1/L2/L3)

| Layer | Content | Loading | |---|---|---| | L1 Metadata | YAML name/description/activation | Routing only | | L2 SKILL.md | Core principles, workflows, pitfalls | Always loaded, kept compact | | L3 Resources | Detailed examples, edge cases | Conditional, on-demand |

After iteration: L2 grows from 40 lines to ~154 lines (converging); L3 monotonically grows to ~13,000 characters by iteration 10—core knowledge compresses into the always-loaded header while edge knowledge sinks into the on-demand tail.

Trajectory-Level Loss Evidence

Beyond binary success/failure, SkillGrad uses two evidence types:

  • Failed trajectories (currently failing): corrective diagnosis
  • Contrastive success trajectories (failed initially, succeed now): protective diagnosis of what changed and should be preserved
  • Training tasks are sampled from the initial skill's failure pool, making contrastive successes naturally abundant at iteration 1.

    Textual Momentum

    Analogous to SGD momentum, a dual-state structure accumulates knowledge:

  • Persistent pattern memory (M_t): recurring mechanisms with anchors, occurrence iterations, best actions, fix history
  • Current batch overlay (O_t): compact update signals per batch
  • New patterns appear ~3 per iteration early, dropping to 0–1 by iterations 5–9; active patterns stabilize at 4–5, indicating convergence.

    Layer-Aware Patching

    The patcher performs pattern-level generalization (one generalized edit instead of per-task fixes), layer-aware routing (L2 vs L3), and anchor-based deduplication (kebab-case slugs like inspect-before-edit). Without momentum, L2 word count balloons 29.7% and L3 shrinks 32%, weakening conditional loading.

    Results

    LLM-generated skill initialization (SpreadsheetBench / WikiTQ):

    | Method | GPT-5.4 SB | GPT-5.4 WikiTQ | GPT-4.1 SB | GPT-4.1 WikiTQ | |---|---|---|---|---| | No Skill | 62.50 | 78.57 | 44.17 | 52.86 | | Base Skill | 55.83 | 77.14 | 36.67 | 48.58 | | Trace2Skill | 65.28 | 79.05 | 37.22 | 60.00 | | EvoSkill | 68.06 | 78.09 | 37.22 | 53.33 | | SkillGrad | 71.11 | 82.38 | 54.17 | 73.65 |

    Gains are larger for the weaker GPT-4.1 (+17.5 pp on SpreadsheetBench, +16.95 pp over Trace2Skill), suggesting weaker models depend more on skill guidance. With third-party initial skills, SkillGrad still leads (69.44% vs Trace2Skill's 63.89% on GPT-5.4).

    Ablations: removing momentum costs −6.67 pp; failure-only diagnostics cost −4.17 pp—cross-iteration stability matters more than per-iteration signal richness.

    Hyperparameters & cost: batch size 4 is the sweet spot (72.5% vs 70.0% at 2 and 70.8% at 6). Iteration 10 is the best checkpoint (72.5%); iteration 13 declines to 70.0%, since text updates lack convergence guarantees. A 10-iteration run costs ~$6.4 ± 0.38 (rising from ~$0.35 to ~$0.85 per iteration as momentum context grows).

    The Bigger Picture

    SkillGrad's core contribution is a perspective shift: skill files become parameters rather than hand-written documents—paralleling the shift from feature engineering to gradient descent, and from prompt engineering to automated prompt/skill optimization. The LLM acts as a differentiable bridge, converting discrete success/failure signals into textual gradients and edits.

    Paper Info

  • Paper: SkillGrad: Optimizing Agent Skills Like Gradient Descent (arXiv: 2605.27760)
  • Authors: Hanyu Wang, Yifan Lan, Bochuan Cao, Lu Lin, Jinghui Chen (Pennsylvania State University)
  • Limitations: evaluated mainly on spreadsheet tasks; text updates are non-monotonic with no formal convergence guarantees

Tags

#skillgrad#llm-agents#gradient-descent#prompt-optimization#textual-momentum#spreadsheetbench#agent-skills#penn-state

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177980632