arXiv(opens in a new tab)cs.LGSep 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2609.15982

The Router Within: Eliciting Native Skill Routing from a Frozen LLM

Ruishuo Chen, Xun Wang, Yu Chen, Zhuoran Li, Longbo Huang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Ruishuo Chen 1^{1}, Xun Wang 1^{1}, Yu Chen 1^{1}, Zhuoran Li 1^{1}, and Longbo Huang 1^{1}

1^{1}Institute for Interdisciplinary Information Sciences, Tsinghua University

Correspondence: longbohuang@tsinghua.edu.cn

Abstract. Skills extend an LLM agent beyond its parametric knowledge, and the gain they promise rests on picking the right one. Deployed harnesses route by preloading every skill's metadata into the context, which disperses the agent's attention and caps the library size. Retrieval pipelines move the selection out of the context, but also out of the agent's capability. We show that the frozen agent LLM already carries the routing signal in its own forward passes, and that two linear maps suffice to read it out with no skill text in the context. GAVEL (Glance And Verdict from a frozen LLM) reads it in two steps. A glance projects the task's and each skill's mid-layer states through the two maps, the only parameters trained, and scores the full library against compact per-skill banks that one forward pass builds at installation. A verdict then resumes the shortlisted skills' forward passes and reads the model's own likelihood and yes/no judgment, fused with the glance as a product of experts. Trained once, GAVEL transfers zero-shot to three public benchmarks and SkillTraj, our new benchmark of 372 simulated agent trajectories. On Qwen3-32B it outperforms progressive disclosure and retrieve-and-rerank pipelines that add 1.2B to 16B external parameters, by up to 13.4 points on written tasks and up to 21.9 when the need for a skill arises mid-rollout. Routing accuracy improves as the backbone does, and in a bash-agent harness the same 32B triggers the correct skill on Skill-Use more often than far larger frontier models running in Codex.

1. Introduction

Skills have become the standard way to extend an LLM agent beyond its parametric knowledge (Anthropic, 2025; Xu & Yan, 2026). A skill packages instructions, scripts, and reference files in a SKILL.md document that the agent loads into its context when a task calls for it. A well-chosen skill improves task performance, while an ill-suited one leaves it worse off than no skill at all (Li et al., 2026), and the choice grows harder as public libraries reach tens of thousands of entries (OpenAI, 2026a; Gao et al., 2026). Selecting the right skill from such a library is therefore the central problem, and current systems take one of two routes.

Deployed agents, Claude Code and Codex among them, route by progressive disclosure (Anthropic, 2025; OpenAI, 2026a): they preload every installed skill's name and description into the system prompt and let the agent LLM itself decide which to read in full. The metadata, however, crowds the context in proportion to the library, degrading the agent's work on the task (Liu et al., 2024; Modarressi et al., 2025). Codex therefore caps skill metadata at 2% of the context window and drops the rest (OpenAI, 2026a), confining a deployment to a small library, where routing accuracy still decays logarithmically with the number of skills (Chen et al., 2026a). The cost is intrinsic, since routing inside the context spreads the agent's attention thin over every skill it considers and weighs

(a) Progressive disclosure

Figure

✗ metadata crowds the context

✓ the agent itself selects

✓ no extra model

(b) Retrieve-and-rerank

✓ context stays clean

✗ selection outside the agent

✗ extra models beside the agent

(c) GAVEL (ours)

✓ context stays clean

✓ the agent itself selects

✓ only two linear projections

Figure 1 | Three designs for skill routing. (a) Progressive disclosure preloads every skill's metadata into the prompt, crowding the context. (b) Retrieve-and-rerank keeps the context clean but hands selection to external models that never see the rollout. (c) GAVEL routes with the frozen agent LLM itself: a glance over the whole library, read from one mid-layer state through two trained linear maps, then a verdict in which the same model examines the top candidates in full.

only the summaries that fit, which omit much of what selection depends on (Zheng et al., 2026).

To lift this burden from the context, recent skill routers, following tool learning (Qin et al., 2024a; Zheng et al., 2026; Wang et al., 2026), hand the selection to external models. A retrieval pipeline, usually an embedding model and a reranker, picks skills and injects them into the context. The context is relieved, but the selection is also cut off from the agent's capability. A standalone retriever may excel at matching text, but judges what a task needs less reliably than the agent LLM (Shi et al., 2025; Kang et al., 2026), especially amid the noisy context where the need arises mid-rollout (Lumer et al., 2025; Fei et al., 2025), and it does not improve as the agent itself does.

Selection inside the context thus taxes the agent, yet an external model does not understand tasks and skills as well as the agent does. Can a router, then, select with the agent's capability but outside its context? The open question is through what interface, and at what cost, that understanding can be turned to routing. We propose GAVEL (Glance And Verdict from a frozen LLM), the third design in Figure 1, which draws every routing signal from the frozen agent LLM's own forward passes through only two linear projections, and lets no skill text into the context until a skill is chosen.

GAVEL routes in two stages, a glance over the whole library followed by a verdict on its shortlist. As the LLM decodes, its intermediate layers compress the input's semantics (Skean et al., 2025), but entangle them with much that serves only the next token (Queipo-de Llano et al., 2026), so no native read-out ranks a library's skills (Appendix A). The glance therefore grafts a new attention head onto the model. A query map reads each task token's state at a mid layer, a key map each skill token's state at the same layer at installation, both trained contrastively so that a task token's strongest match lands on a skill that serves it. Each task token votes for the skills it matches best, so its few decisive tokens are not averaged away. A new skill thus costs one forward pass and no training.

A factorized head, however, misses subtler inferences routing can turn on. Full attention over skill and task together does not, but it costs one forward pass per candidate, which no library affords, so the verdict spends it on the glance's shortlist alone. For each it resumes the installation pass with the task appended and reads from that forward how strongly the skill primes the model for the task, and its log-odds judgment of whether the skill serves it. Unlike a pipeline's scores, the three signals can each be read as the same log posterior of skill given task, the glance contrastively, the likelihood generatively, the judgment discriminatively, so they fuse as a product of experts (Hinton, 2002).

We instantiate GAVEL with Qwen3-32B as the agent LLM and train its two projections, 7.9M parameters in all, once on the synthetic query–skill pairs of SkillRet (Kang et al., 2026). We then evaluate it on three public skill-selection benchmarks, which depart from that corpus in query author, document genre, and library scale. All three hand the router a written task, whereas a live agent's need often surfaces mid-rollout, so we also build SkillTraj, a benchmark of 372 simulated agent trajectories that scores each router at that moment under four scenarios of noisy multi-turn context. Across all four, GAVEL outperforms both progressive disclosure given a well-chosen shortlist of twenty skills and retrieve-and-rerank pipelines that add 1.2B to 16B external parameters, by 13.4 points over the strongest pipeline on SRA-Bench and by 8.6 to 21.9 points across SkillTraj's four scenarios. Ablations isolate what each stage contributes, and routing improves as the backbone does. In a minimal bash-agent harness, Qwen3-32B triggers the correct skill on Skill-Use (Han et al., 2026) more reliably than far larger open frontier models in Claude Code and Codex.

In summary, our contributions are as follows:

• We propose GAVEL (Glance And Verdict from a frozen LLM), a skill router that elicits routing from the frozen agent LLM's own forward passes and thus improves as the agent does, with no model beside it and no skill text in the context until one is chosen.

• On the technical side, a token-level glance reads a mid layer through two linear maps against skill banks thinned to ε\varepsilon-covers with bounded distortion, and a verdict reads generative and discriminative evidence from a resumed forward pass, fused as a product of experts.

• We build SkillTraj, a benchmark of 372 simulated agent trajectories that scores a router at the moment a skill becomes needed, under four scenarios of noisy multi-turn context.

• Across three public benchmarks and SkillTraj, GAVEL outperforms progressive disclosure and retrieve-and-rerank pipelines that add up to 16B external parameters, by up to 21.9 points, and in a live harness has Qwen3-32B load the correct skill more often than far larger frontier models.

References (30)