---
title: 'Ctx2Skill: Context-to-Skill Framework'
url: https://www.emergentmind.com/topics/ctx2skill
type: topic
---

# Ctx2Skill: Context-to-Skill Framework

Searching arXiv for recent papers on Ctx2Skill and closely related context-to-skill methods.
Ctx2Skill is a self-evolving, inference-time skill construction framework for context learning in which a language model autonomously discovers, refines, and selects context-specific natural-language skills from a complex context \(C\) without human annotation, external feedback, or model-weight updates [2604.27660]. More broadly, the name has become a useful organizing lens for a family of methods that transform task context, trajectories, external knowledge records, or skill documents into reusable procedural assets, including Markdown skill files, structured skill contracts, dynamic skill banks, and even LoRA adapters generated at test time [2604.27660].

## 1. Concept and scope

In the original formulation, “context learning” means learning relevant knowledge directly from a provided context and then using that knowledge to solve tasks whose required information lies outside parametric memory [2604.27660]. Ctx2Skill addresses this by replacing repeated online extraction from a long, technically dense context with inference-time skill augmentation: rules and procedures are distilled into a short Markdown skill file that is prepended to the model prompt [2604.27660].

This framing generalizes naturally to several adjacent research programs. In some systems, the source context is a document or manual; in others it is a pool of trajectories, task metadata, failed interactions, or a repository snapshot. Likewise, the target “skill” varies. Trace-oriented systems produce declarative skill folders or SKILL.md files [2603.25158]; retrieval-conditioned systems synthesize temporary task-specific skills at test time [2605.16986]; memory-oriented systems maintain skill banks with dynamic addition, retrieval, and pruning [2603.28716]; and parametric systems compile textual skills into LoRA adapters so that downstream execution no longer rereads the skill text [2606.30015].

A recurring distinction in this literature is between declarative evidence and procedural guidance. Standard RAG retrieves passages or logs, but leaves the agent to infer procedures repeatedly at inference time. Anything2Skill makes this distinction explicit: the goal is to compile latent procedural knowledge from heterogeneous records into reusable skills, so that retrieval provides declarative evidence while the SkillBank provides executable guidance [2606.09316]. This suggests that Ctx2Skill is best understood not as a single architecture, but as a general conversion problem: transforming context into a durable procedure representation.

## 2. Skill representations

The dominant representation is textual. In Ctx2Skill, the skill set is a short Markdown file prepended to the system prompt [2604.27660]. ParametricSkills defines a skill as a structured textual recipe capturing mature problem-solving experience or procedural knowledge; its appendix specifies a canonical structure with purpose, usage conditions, required inputs, implementation recipe, verification checks, failure modes, and anti-patterns [2606.30015]. Trace2Skill formalizes a skill as \(\mathcal{S}=(M,\mathcal{R})\), where \(M\) is the root markdown document and \(\mathcal{R}\) contains scripts, references, and assets [2603.25158]. SkillAdaptor stores skills as SKILL.md records with fields such as title, principle, applicability, procedure, qualification criteria, and negative example [2606.01311]. XSkill represents a skill as \(k=(\mathcal{M},\mathcal{W},\mathcal{P})\), with metadata, workflow sequence, and reusable tool templates, while experiences are stored separately as compact condition-action items \(e=(c,a,\mathbf{v}_e)\) [2603.12056].

Anything2Skill adopts the most explicit contract view. Its skill object is
\[
s = \langle n, d, a, v, g, \tau, \sigma^{+}, \sigma^{-}, \mathbf{m}, \mathbf{p}, \mathbf{c}, \mathbf{o}, \mathcal{E}, \rho \rangle,
\]
with invocation conditions, contraindications, action moves, workflow steps, constraints, output specifications, supporting evidence, and confidence score [2606.09316]. This contract representation is designed for compilation, reconciliation, versioning, and skill-tree projection rather than mere prompt insertion [2606.09316].

A second representation family is parametric. ParametricSkills converts free-form skill text \(s\) into LoRA parameters through a frozen text encoder and hypernetwork:
\[
z=g(s), \qquad \phi=h_\theta(z), \qquad f_{W_0+\Delta W(\phi)}.
\]
Here \(\phi\) is the flattened skill adapter, reshaped into LoRA factors and merged with a frozen base model, enabling what the paper calls “context-free skill exploitation” [2606.30015]. This shifts the representation from visible text to behavior-modulating weights.

A third axis concerns granularity. D2Skill separates task skills from step skills, arguing that trajectory-level guidance is too coarse for local error correction [2603.28716]. XSkill similarly separates experiences, which are action-level and tactical, from skills, which are task-level and structured [2603.12056]. This suggests that “skill” in Ctx2Skill research is not a single ontological category; it can denote a plan, a reusable subroutine, a local correction heuristic, or a parameterized adapter, provided it mediates between context and later behavior.

## 3. Conversion mechanisms

The original Ctx2Skill framework uses a five-agent self-play loop with Challenger, Reasoner, Judge, Proposer, and Generator, all instantiated with frozen language models [2604.27660]. The Challenger generates task-rubric pairs from context \(C\); the Reasoner answers them using an evolving Reasoner skill set \(S_i^R\); the Judge returns binary rubric verdicts; and dedicated Proposer/Generator pairs update either the Reasoner or Challenger skills depending on whether tasks were failed or solved [2604.27660]. To prevent adversarial collapse, the framework introduces Cross-Time Replay. It stores hard and easy probe sets, evaluates all candidate Reasoner skill sets on both, and selects
\[
S_* = S_{i^*}^R, \qquad i^* = \arg\max_i \left(\rho^h(i)\rho^e(i)\right),
\]
where \(\rho^h\) and \(\rho^e\) are Laplace-smoothed solving rates on hard and easy probes [2604.27660].

Other systems instantiate different conversion pathways. SkillTTA retrieves a small set of trajectories relevant to a test task \(q\), then synthesizes a temporary textual skill
\[
s_q = G_{\theta}(x_q, m_q, R_q)
\]
from target task context and retrieved evidence, with a fixed downstream solver [2605.16986]. Trace2Skill converts a corpus of agent trajectories into a single reusable skill directory by parallel per-trajectory patch proposal and hierarchical conflict-free consolidation, explicitly treating trajectory-local lessons as raw evidence rather than as final memory [2603.25158]. Anything2Skill decomposes heterogeneous records into evidence windows \(w_{ij}\), performs plan-and-expand extraction
\[
\mathcal{P}_{ij}=P_{\theta}(w_{ij},\mathcal{T},K), \qquad \tilde{s}_{ijk}=E_{\theta}(w_{ij},p_{ijk},\mathcal{T}),
\]
filters for procedural validity, compiles document-local drafts into canonical skills, and then reconciles them against a persistent registry [2606.09316].

A distinct path is trajectory-driven maintenance. SkillAdaptor begins from failed trajectories \(\tau=\{(a_t,o_t)\}_{t=1}^{T}\), localizes the first actionable fault step
\[
(t^\ast,\pi)=\operatorname{Localize}(q,\tau,S_q),
\]
links blame to the actually injected skill subset \(S_q\),
\[
\{(s_j,w_j)\}=\operatorname{Link}(q,\tau,t^\ast,S_q),
\]
then either revises the highest-weighted skill or generates a new skill, with acceptance gated by re-execution [2606.01311]. SkillEvolver adopts a related but deployment-centered perspective: a meta-skill authors an initial domain skill from contrastive trajectory evidence, deploys that skill to fresh agents, and refines it from the failures those agents encounter while using the skill rather than from exploratory traces alone [2605.10500].

These mechanisms differ in supervision and timing, but they converge on a common principle: extraction quality depends on moving beyond direct summarization of raw context. Ctx2Skill uses adversarial self-play [2604.27660], SkillTTA uses retrieval-conditioned synthesis [2605.16986], Trace2Skill uses prevalence-based hierarchical consolidation [2603.25158], Anything2Skill uses taxonomy-guided compilation [2606.09316], and ParametricSkills adds exploitation-trajectory supervision so that the compiled object encodes not only content but also how the skill should be used [2606.30015].

## 4. Retrieval, invocation, and execution control

Once a skill exists, the next problem is deciding how it is retrieved, invoked, or composed with ongoing inference. SkillTTA retrieves top-\(k\) trajectories by cosine similarity over stable task metadata, with default \(k=3\), and emphasizes that the target task context is authoritative while retrieved evidence is non-binding [2605.16986]. XSkill first decomposes the current multimodal task into 2–3 abstract subtasks, uses those to retrieve experiences by embedding similarity, rewrites retrieved experiences to fit the current task and images, and then adapts the global skill document using the rewritten experiences and the current visual context [2603.12056]. D2Skill performs dual-granularity retrieval with semantic similarity plus utility-aware exploration,
\[
\mathrm{score}(m)=\alpha \widehat{\mathrm{sim}}(m,q)+(1-\alpha)\left(u_m+\eta\sqrt{\frac{\log(1+N_r)}{1+n_m}}\right),
\]
and prunes low-value skills when the bank exceeds capacity [2603.28716].

A major correction to naïve “retrieve if relevant” logic is provided by SelSkill. It argues that a skill can be semantically relevant yet still be harmful or unnecessary at the current decision point [2606.00510]. In its formulation, the policy
\[
\pi_\theta(a_t \mid h_t, M_{\mathcal{S}})
\]
acts over both ordinary actions and skill invocations, using only visible skill metadata \(M_{\mathcal{S}}\) until invocation time [2606.00510]. Training combines episode-level preference pairs with local invoke/skip counterfactuals \((c_t^+,c_t^- \mid h_t,s)\), constructed from shared prefixes and labeled by downstream success and efficiency [2606.00510]. This reframes context-to-skill not merely as routing toward a skill, but as a context-to-intervention decision.

SkillS is related but narrower. It is a state-conditioned scheduler over pretrained temporally extended skills in reinforcement learning,
\[
\pi_S(z=[i;k]\mid s,\theta),
\]
where the scheduler selects a skill index and duration based on current state, while the final policy is learned separately from replay data [2211.13743]. The paper is explicit that this is not an explicit context-embedding approach; “context” remains implicit in state and reward structure rather than in a separate learned task variable [2211.13743]. It is therefore best viewed as a neighboring approach to context-conditioned sequencing rather than a full Ctx2Skill model.

ParametricSkills pushes execution control into weight space. It supports multi-skill composition via weighted low-rank updates
\[
\Delta_{\mathrm{merge}}=\sum_i w_i \Delta_i = \sum_i w_i A_i B_i,
\]
implemented with rank concatenation and norm-based calibration before merging [2606.30015]. It also introduces a preliminary continual-learning mechanism with an accumulated global adapter \(G_t\), updated by EMA after successful tasks [2606.30015]. This indicates that once context has been compiled into parameters, retrieval, composition, and accumulation can all be performed in adapter space rather than in prompt space.

## 5. Empirical evidence across domains

Ctx2Skill itself is evaluated on CL-bench, a benchmark with 500 contexts, 1,899 tasks, and 31,607 rubrics across Domain Knowledge Reasoning, Rule System Application, Procedural Task Execution, and Empirical Discovery & Simulation [2604.27660]. Base solving rates are low even for frontier models, and the framework improves all three tested backbones: GPT-4.1 from 11.1% to 16.5%, GPT-5.1 from 21.1% to 25.8%, and GPT-5.2 from 18.2% to 21.4% [2604.27660]. The gains are especially pronounced on Procedural Task Execution and Empirical Discovery & Simulation, and removing Cross-Time Replay causes substantial degradation, including a drop from 16.5 to 14.7 on GPT-4.1 [2604.27660].

ParametricSkills provides a complementary result in software engineering. On six SWE subtasks, it achieves average LLM-judge score 64.09 versus 57.65 for in-context skill prompting, a gain of 6.44 points, while also improving BERT and F1 on average by +1.17 and +5.53 percentage points [2606.30015]. In HumanEval self-evolving evaluation, a poor initial generated skill can hurt, but iterative refinement with verification lifts performance from 75.00% for base parametric skill to 84.76%, surpassing the 81.09% no-skill baseline [2606.30015]. In an online continual experiment on a HumanEval subset, online continual merge reaches 16/31 versus 12/31 for independent self-evolution and 9/31 for the base model [2606.30015].

SkillTTA shows that adaptive skill synthesis can outperform static skill libraries while keeping the solver fixed. On SpreadsheetBench, task-specific skills improve Pass@1 from 0.397 to 0.505 over static trajectory-to-skill synthesis with GPT-5.5; on BigCodeBench, Pass@1 improves from 0.517 to 0.651; and on ALFWorld, SkillTTA reaches 0.872–0.879 success while producing the shortest successful trajectories among reported methods, within roughly four points of MemRL’s success rate [2605.16986]. Trace2Skill, in a different setting, reports that skills evolved by Qwen3.5-35B on its own trajectories improved a Qwen3.5-122B agent by up to 57.65 absolute percentage points on WikiTableQuestions, supporting the claim that trajectory-grounded skills can transfer across model scales [2603.25158].

Several systems focus on control and maintenance rather than skill synthesis alone. SelSkill improves task success on ALFWorld by 10.9 percentage points and execution precision by 29.1 points with Qwen3-8B, and on BFCL improves success by 5.7 points and execution precision by 29.5 points [2606.00510]. D2Skill reports success-rate gains of 10–20 points over skill-free baselines on ALFWorld and WebShop, with ablations showing that both dual-granularity skill modeling and dynamic skill maintenance are critical [2603.28716]. XSkill consistently improves over tool-only and learning-based baselines across five multimodal benchmarks and shows that skills and experiences influence agent behavior differently: skills reduce syntax and tool-name errors, while experiences shift tool usage toward more targeted strategies [2603.12056]. Anything2Skill, finally, reports that combining compiled skills with RAG yields 98.85% success on qsv and 94.10% on GitHub-CLI, substantially outperforming RAG-only agents [2606.09316].

Taken together, these results indicate that the Ctx2Skill pattern is not confined to one benchmark family. It appears in context learning, software engineering, multimodal agents, long-context EDA, reinforcement learning, and command-line task execution. The common empirical pattern is that explicitly compiled procedures outperform purely declarative retrieval or static prompting when downstream tasks require repeated, structured action.

## 6. Limitations, misconceptions, and open problems

A common misconception is that Ctx2Skill simply means “retrieve a helpful prompt.” The literature is broader. Skills may be short Markdown guides [2604.27660], persistent folder-like artifacts with scripts and references [2603.25158], structured contracts in a SkillBank [2606.09316], or test-time generated LoRA adapters [2606.30015]. Another misconception is that relevance is sufficient for invocation. SelSkill directly disputes this by showing that a relevant skill may still be harmful if invoked before preconditions are met or when current parametric knowledge already suffices [2606.00510].

Another subtle point concerns what skill compilation does not solve. ParametricSkills eliminates the need to reread skill text during execution, but not the need to read task context itself; the method trades token-time retrieval and reasoning over the skill text for one-shot parameter synthesis [2606.30015]. Similarly, Trace2Skill and SkillEvolver externalize experience into reusable artifacts, but they do not remove the need for environment interaction, deployment-time evaluation, or audit mechanisms [2603.25158; 2605.10500].

Several technical limitations recur. Retrieval quality remains critical in context-conditioned synthesis; SkillTTA shows that random or overly large retrieval sets hurt, and that top-3 retrieval is better than top-5 or top-9 in its setting [2605.16986]. Context specificity is also unresolved: Ctx2Skill’s own skills are primarily designed to generalize across tasks over the same context rather than across arbitrary contexts [2604.27660], and XSkill stores a single evolving global skill document whose scalability to open-ended lifelong settings is left open [2603.12056]. In weight-space systems, compression bottlenecks and semantic conflict remain. ParametricSkills notes limited adapter capacity, possible poor compression of rich or inconsistent skill documents, and unresolved interference in multi-skill merging despite Frobenius-norm normalization [2606.30015].

Maintenance and attribution introduce additional cost. SkillAdaptor requires localization, attribution, rewriting, and qualification by re-execution; its gains collapse when either the Localizer/Linker or the qualifier gate is removed [2606.01311]. SkillEvolver depends on repeated deployment to fresh agents and on an audit that can detect leakage, under-abstraction, and silent-bypass failure modes, where a skill appears plausible in content but is never invoked at runtime [2605.10500]. D2Skill’s results likewise show that unmanaged skill accumulation is harmful: removing skill management drops validation success from 72.7 to 57.8 in one ALFWorld setting [2603.28716].

Open problems are therefore structural rather than merely incremental. The field still lacks a unified treatment of skill conflict, long-horizon lifecycle management, cross-context transfer, direct multimodal indexing for skill retrieval, and rigorous compositional generalization benchmarks. The evidence nevertheless suggests a stable conceptual conclusion: the most effective Ctx2Skill systems do not merely summarize context. They convert it into reusable procedure representations, maintain those representations over time, and couple them to downstream behavior through retrieval, adaptation, invocation control, or parameter synthesis [2604.27660].

Source: https://www.emergentmind.com/topics/ctx2skill