---
title: Compositional Skill Routing
url: https://www.emergentmind.com/topics/compositional-skill-routing
type: topic
---

# Compositional Skill Routing

Compositional skill routing denotes a family of methods that represent reusable skills as explicit modules, embeddings, workflows, or library entries and then route states, queries, or action sequences through those units so that larger behaviors emerge from their composition rather than from a single monolithic policy. In the literature represented here, the term spans differentiable policy composition in reinforcement learning, query-conditional routing over large skill libraries for LLM agents, mode- and cost-aware orchestration in compound AI systems, semantically structured expert routing in robotic manipulation, and governance of skill updates in compositional robot policies [1711.11289], [2602.19672], [2605.23477], [2603.22455], [2604.26689].

## 1. Conceptual scope and problem formulations

A common misconception is that skill routing reduces either to document retrieval or to selecting one option at a time. The literature rejects both simplifications. "Learning to Compose Skills" formulates composition as a differentiable mapping from multiple skill-state embeddings to a composed-task embedding, with the resulting policy interpreted as the policy for the composed task; this is explicitly contrasted with classic HRL and options, which usually choose one option at a time in sequence [1711.11289]. "Skill Is Not Document" argues that skill retrieval differs fundamentally from traditional document retrieval because top-\(K\) joint correctness depends not only on independent query-skill relevance but also on whether the retrieved skills can collaborate under the given query, which it formalizes through a query-conditional skill compatibility term \(C(q,S_q^*)\) [2606.03565]. "Generative Skill Composition for LLM Agents" formalizes structured skill composition as a joint decision over which skills, how many, and in what order, implemented as task-conditioned skill sequence prediction [2606.32025].

This breadth yields several distinct but related optimization problems. In ComposeNet, the central object is a composition function
\[
C : \langle \iota_e^{(1)}(S), \dots, \iota_e^{(n)}(S) \rangle \to \iota_c(S),
\]
where skill-state embeddings are combined into a new embedding consumed by a shared policy head [1711.11289]. In SkillOrchestra, the orchestrator controls a multi-turn process and optimizes a performance-cost trade-off
\[
\max_\pi J(\tau)=\mathbb{E}_{\tau\sim\pi}\left[R(\tau)-\lambda\sum_{t=0}^{T} C(A_t,z_t)\right],
\]
with routing factorized into a mode policy and an agent-routing policy [2602.19672]. In SkillComposer, the output is an executable skill plan
\[
\hat{\mathbf{z}}=(\hat z_1,\hat z_2,\ldots,\hat z_{\hat n},STOP),
\]
so subset, count, and order emerge jointly from a single decoding pass [2606.32025].

| Regime | Skill unit | Routing target |
|---|---|---|
| ComposeNet | skill-state embedding | composed policy |
| SkillOrchestra | mode-specific skill set | agent under cost |
| SMoDP | semantic skill phase | expert subset |
| SkillComposer | skill identifier | ordered skill plan |
| W2S | workflow-bearing skill | node/branch/tool path |

This suggests that compositional skill routing is best understood not as a single architecture but as a problem class: selecting, combining, sequencing, or recursively reusing skill-bearing units under structural constraints that are task-dependent and often state-dependent.

## 2. Skill representations and interfaces

The viability of routing depends on how skills are represented. ComposeNet uses a particularly explicit interface: each skill \(k\) has its own trunk \(f_k\) producing a skill-state embedding
\[
\iota_e^{(k)}(s)=f_k(s)\in\mathbb{R}^d,
\]
while all skills share a single final policy layer \(\pi\). This creates a common semantic space that the policy head can interpret regardless of whether the embedding came from a primitive skill or from a composition layer [1711.11289].

SkillOrchestra inserts an intermediate abstraction layer between tasks and agents. A skill is defined as
\[
\sigma \triangleq \langle \mathcal{D}, \mathcal{I} \rangle,
\]
where \(\mathcal{D}\) is a natural-language capability description and \(\mathcal{I}\) is a set of contextual indicators. These skills are organized in a Skill Handbook graph
\[
\mathcal{H}=\mathcal{G}_{\mathcal{H}}=(\mathcal{V},\mathcal{E}),
\]
with mode nodes, skill nodes, and agent-profile nodes, so that routing can reason jointly about mode, skill demand, and agent competence [2602.19672].

Robotic formulations tend to align skill representations with temporal phases and language semantics. SMoDP segments demonstrations into verb-noun skills such as \(\langle\text{pick up},\text{red cup}\rangle\), embeds those labels with a frozen text encoder, and trains a lightweight predictor \(\mathcal{P}_\phi\) to map multimodal context into the same embedding space. Routing is therefore conditioned not on raw latent statistics alone but on a continuous semantic skill embedding [2605.23477]. SCE similarly builds a persistent skill base \(\mathcal{B}\) by decomposing demonstrations with state-based rules and grounding segments to reusable skills with a VLM, then uses the resulting skill identity as supervision for runtime routing [2606.15685].

LLM-agent work often treats the skill itself as a structured artifact. SkillComposer defines
\[
s_i=(m_i,C_i,\pi_i,T_i,R_i),
\]
with metadata, applicability condition, procedural policy, termination condition, and optional resources; only compact metadata is needed for discovery, while the full procedure is loaded after selection [2606.32025]. W2S makes this decomposition even more explicit:
\[
\mathrm{Skill}=(R,\;W+S+A),
\]
where \(R\) is a routing header, \(W=(N,E)\) is a workflow backbone, \(S\) is node-level operational semantics, and \(A\) is the attachment set. Under this view, routing exists both between skills and within a skill’s internal control-flow graph [2606.06893].

These representations differ in modality and granularity, but they share a design invariant: a skill must expose a routable interface whose semantics are stable enough to support reuse under new task combinations.

## 3. Routing mechanisms and architectural families

One architectural family learns composition as dense differentiable fusion. ComposeNet concatenates two embeddings and applies a fully connected composition layer,
\[
\iota_c(s)=\sigma\!\left(W_c[\iota_e^{(i)}(s);\iota_e^{(j)}(s)]+b_c\right),
\]
after which the same shared policy head used for primitive skills produces the action distribution. Because the policy layer is agnostic to the origin of the embedding, the output of one composition can be fed into another, yielding recursive composition trees and shallow hierarchies [1711.11289].

A second family uses explicit discrete or sparse routing. "Routing Networks and the Challenges of Modular and Compositional Computation" treats a module library \(F=\{f_1,\dots,f_K\}\) as reusable skills and introduces a router \(\pi_\phi(a_t\mid h_t,m)\) that chooses which module to apply next or whether to terminate. The resulting computation is a path through module space, but joint learning of modules and routes introduces module collapse, non-stationarity, difficult credit assignment, and an exploration–interference trade-off; value-based RL was found to outperform policy-gradient and reparameterization methods in this setting [1904.12774]. "Block-Operations: Using Modular Routing to Improve Compositional Generalization" addresses a related issue by splitting activations into fixed-size blocks and routing them with a Multiplexer,
\[
y^{(j)}=\sum_{i=1}^{M}\alpha_{ij}x^{(i)},
\]
so that whole blocks can be copied, permuted, or modified with low representational distortion [2408.00508].

A third family emphasizes parse-tree structure. "Learning Compositional Structures for Deep Learning: Why Routing-by-agreement is Necessary" interprets capsule networks as implementing an And–Or grammar in which routing coefficients act as probabilities over OR-rules. The key control variable is the entropy of the routing coefficients:
\[
H_i^l(g)=-\sum_j c_{ij}^l(g)\log c_{ij}^l(g).
\]
Low-entropy routing makes each lower-level capsule effectively choose one parent, approximating a tree; high-entropy routing resembles the distributed sharing of CNNs and degrades sensitivity to changes in compositional structure [2010.01488].

Robotic MoE systems instantiate routing at the temporal-phase level. SMoDP predicts a semantic skill embedding, projects it to a skill token, replaces the action tokens in the router input with that skill token, and broadcasts the resulting logits to all action tokens in the current chunk, so that routing is chunk-consistent. Top-\(k\) gating then activates a sparse expert subset for the full action chunk [2605.23477]. SCE splits decoder adaptation into an Execution Expert Branch and a Transition Expert Branch: the dominant skill is selected by hard routing
\[
\hat{k}=\arg\max_k p_k,\qquad \Delta\mathbf{y}^{\mathrm{exe}}=E_{\hat{k}}(\mathbf{y}),
\]
while transitions are modeled by a soft mixture
\[
\Delta\mathbf{y}^{\mathrm{tr}}=\sum_{j=1}^{N}u_j\,G_j(\mathbf{y}),
\]
and an adaptive coefficient \(\alpha\) fuses the two [2606.15685].

These mechanisms differ in whether they are dense or sparse, recursive or stepwise, and explicit or implicit in their structure. What they share is the attempt to convert reusable local competence into globally coherent behavior by making routing itself a learnable object rather than an external rule system.

## 4. Agentic orchestration, retrieval, and workflow routing

In LLM-agent systems, routing shifts from internal latent modules to explicit libraries of tools and skills. SkillOrchestra frames orchestration as a retrieve–decide–execute loop over a query-conditional Skill Handbook. At each turn, the orchestrator selects an operational mode \(\psi_t\), infers an active subset of skills \(\Sigma_t\subseteq\Sigma_{\psi_t}\), and chooses the agent that maximizes weighted competence minus cost:
\[
A_t^*=\operatorname*{argmax}_{A\in\mathcal{A}_{\psi_t}}
\left[\sum_{\sigma\in\Sigma_t} w_{t,\sigma}\frac{\alpha_{A,\sigma}}{\alpha_{A,\sigma}+\beta_{A,\sigma}}-\lambda_c\hat C_A(\psi_t)\right].
\]
Because competence is modeled per skill and per agent, routing can vary across turns as task demands evolve [2602.19672].

Retrieval-oriented work makes the front end itself query-conditional and compatibility-aware. R3-Skill argues that skill retrieval is not document retrieval because skills retrieved together must collaborate under the same query, and it formalizes this with a compatibility factor \(C(q,S_q^*)\). Its R3-Embedding + R3-Reranker pipeline uses rejected multi-skill combinations as explicit supervision for what should not be jointly retrieved, with graded listwise reranking improving Set-Compat [2606.03565]. SkillRouter studies routing at a larger scale, over approximately \(80\)K skills, and shows that the full implementation body is the decisive signal: removing it causes 29–44 percentage point degradation across retrieval methods, while cross-encoder attention concentrates 91.7% on the body field [2603.22455].

SkillComposer replaces ranking with sequence generation. It treats skill composition as task-conditioned autoregressive decoding over skill identifiers,
\[
p_\theta(\mathbf{z}\mid x,c,\mathcal{S})=\prod_{t=1}^{n+1} p_\theta(z_t\mid \mathbf{h},\mathbf{z}_{<t}),
\]
so subset, count, and order are predicted jointly rather than by top-\(k\) heuristics [2606.32025]. This is particularly significant because it moves routing from relevance estimation toward executable plan induction.

W2S extends routing inside the skill itself. By reconstructing a workflow graph \(W=(N,E)\), node-local semantics, and attachments from traces, it turns a skill into a routable control-flow object. Branching, looping, verification, approval, rollback, and state-management behaviors are preserved as node semantics and attachments rather than flattened into a text summary, so the runtime can route not only to a skill but through the skill’s internal execution structure [2606.06893].

Together these works make clear that agentic compositional skill routing is layered. One layer selects relevant skills from a large library; another chooses the order or timing of their invocation; a third may traverse workflow nodes and attachments inside a selected skill.

## 5. Transfer, generalization, efficiency, and interpretability

A recurring motivation for compositional routing is that it should improve transfer to unseen combinations. ComposeNet demonstrated this directly on a Pacman-like collect/evade environment. When a composition layer trained on five tasks of the form \(\neg p \,\mathcal{U}\, q\) was applied zero-shot to the held-out task “collect blue while evade green,” the zero-shot reward was 0.45, and analogous zero-shot results were reported for “collect red or blue” (0.79), “evade red and green” (episode length 8.28), and “collect red then green” (0.53). In hierarchical reuse, “collect red or green while evade blue” achieved zero-shot reward \(\sim 0.49\) and improved quickly with training [1711.11289].

SkillOrchestra uses explicit skill modeling to avoid routing collapse and to trade performance against cost. Across ten benchmarks it outperformed SoTA RL-based orchestrators by up to 22.5% with 700x and 300x learning cost reduction compared to Router-R1 and ToolOrchestra, respectively; in FRAMES it reached 84.3% accuracy at \$72.7 versus ToolOrchestra’s 76.3% at \$92.7 [2602.19672]. SkillComposer similarly showed that structured sequence prediction over skill IDs is not merely elegant but operationally effective: on GPT-5.2-Codex and Gemini-3-Pro-Preview it raised pass rate by +23.1 and +18.2 percentage points over the no-skill baseline, while matching the gold-skill retrieval upper bound at lower prompt-token cost [2606.32025].

Robotic results stress both compositional transfer and parameter efficiency. SMoDP’s full model reached 0.970 on LIBERO-90, versus 0.958 without InterCL, 0.957 without IntraCL, and 0.946 without both, indicating that semantic alignment of both skill embeddings and router logits materially improves routing quality. In few-shot transfer with experts frozen, SMoDP reached \(\sim 0.84\) success with 10 demos versus \(\sim 0.51\) for MoDE+LoRA at similar trainable parameter counts [2605.23477]. SCE reported Final SR 83.4, NBT 4.3, and AUC 82.5 on LIBERO-Goal, and Final SR 73.4, NBT 0.5, and AUC 70.0 on LIBERO-Long, substantially outperforming task-level MoE baselines [2606.15685].

Retrieval-oriented systems expose a different trade-off. R3-Embedding + R3-Reranker achieved Hit@1 \(=0.7714\), NDCG@10 \(=0.8327\), and Set-Compat \(=0.3525\) on R3-Skill, with the largest gains appearing precisely on the set-level metric most aligned with multi-skill composition [2606.03565]. SkillRouter’s retrieve-and-rerank pipeline reached 74.0% top-1 routing accuracy while remaining small enough for consumer hardware [2603.22455].

| System | Reported result | Implication |
|---|---|---|
| ComposeNet | zero-shot reward 0.45 on “collect blue while evade green” | operator transfer across unseen combinations |
| SkillOrchestra | up to 22.5%; 700x and 300x learning cost reduction | explicit skill modeling improves accuracy–cost trade-off |
| SMoDP | 0.970 full vs 0.946 w/o both contrastive losses | semantic routing regularization matters |
| SCE | Final SR 83.4 on LIBERO-Goal | skill-level reuse improves retention |
| R3 | Set-Compat 0.3525 | compatibility-aware retrieval improves joint skill retrieval |
| SkillRouter | 74.0% top-1 routing accuracy | body-aware routing scales to large pools |

Interpretability is another repeated benefit. SkillOrchestra exposes explicit skill analyses and per-agent competence profiles; SMoDP visualizes expert-activation heatmaps by skill phase; W2S preserves branch predicates and tool attachments; and capsule routing can be analyzed directly through routing-coefficient entropy [2602.19672], [2605.23477], [2606.06893], [2010.01488].

## 6. Limitations, robustness, safety, and governance

Compositional skill routing is also a source of fragility. Several systems assume a fixed or slowly changing skill set, known task decomposition, or predefined operator type. ComposeNet assumes a fixed base-skill vocabulary, a known logical form such as while/and/or/then, and shallow hierarchies; SCE relies on state-based segmentation rules and VLM grounding; SkillOrchestra remains sensitive to the quality and granularity of discovered skills [1711.11289], [2606.15685], [2602.19672]. A plausible implication is that routing quality is bottlenecked as much by ontology construction and interface design as by the router itself.

Robustness under dynamic skill libraries is a distinct concern. "Neural model robustness for skill routing in large-scale conversational AI systems" studies a commercial assistant in which the skill router ranks hypotheses generated from a shared ontology and current subscriptions. It shows that dynamic hypothesis insertion is the main source of brittleness and that random skill-injection augmentation during training can drastically improve robustness. Without augmentation, the Bi-LSTM + BCE model suffers a \(-40.72\%\) online-like accuracy drop; with augmentation, all models show no degradation and often slight improvement on the online-like test, with attention-based + BCE + augmentation achieving +1.67% over the baseline on Test\(_2\) [2103.03373].

Safety introduces another dimension: the installed skill set itself can become unsafe even when each skill is individually safe. SkillReact formalizes this as compositional risk in agent skill ecosystems. On 1,520 ClawHub skills, 651 passed individual inspection and formed 211,575 pairs; the static benchmark flagged 22.25% of these as structural candidates, and human-calibrated population-weighted validity was 18.2%, implying about 14K genuine risk memberships in a single registry. Its action-based harness further showed that realization is gated by host-model disposition: on an anchor-conditioned dropper subset, Haiku-4-5 issued the dropper-stage tool call on all 39 direct-prompt trials, Opus-4-7 stopped at the download, and Sonnet-4-6 refused outright [2606.00448]. The implication is that composition-aware install-time checks and capability isolation are necessary complements to per-skill scanning.

Governance becomes especially acute when skills are updated. "Atomic-Probe Governance for Skill Updates in Compositional Robot Policies" introduces a cross-version swap protocol and finds a dominant-skill effect on a dual-arm peg-in-hole task: one reach ECM achieved 86.7% atomic success rate while every other ECM was at or below 26.7%, and whether that dominant ECM entered a composition shifted success rate by up to +50 percentage points. Off-policy behavioral distance metrics failed to identify that dominant ECM. An atomic-only probe achieved 64.6% oracle match at zero per-decision cost, while a Hybrid Selector with \(m=10\) reached 75.0% at 45.8% of full-revalidation cost [2604.26689]. This makes explicit that skill routing in deployed systems is not only about first-time composition; it is also about deciding when updated components may safely replace existing ones.

Across these works, the central unresolved issues are consistent: discovering skill granularity automatically, scaling routing over very large or deeply nested skill sets, handling non-stationary agent competence and pricing, preserving coverage while avoiding compatibility failures, and enforcing safety when compositional capability exceeds per-skill inspection. Compositional skill routing therefore remains both a constructive paradigm for modular intelligence and a governance problem whose difficulty grows with the expressiveness of the skill library.

Source: https://www.emergentmind.com/topics/compositional-skill-routing