XRepoSkill: Learning Transferable Skills for Software Engineering Agents

Yaoqi Guo, Haoyang Zhou, Jiayi Zhang, Yiran Zhang, Yang Liu, Qiuyuan Chen, Qiang Lin, Hande Dong, Jie M. Zhang, Zhenpeng ChenarXiv 2026

TL;DR

XRepoSkill is a novel framework that teaches AI software engineering agents transferable "skills" by analyzing where their past attempts succeeded or failed. By distilling these experiences into statistically verified, cross-repository rules, it significantly boosts agent performance on complex, unseen coding tasks across multiple programming languages.

What Problem Does This Paper Address?

Large Language Model (LLM) agents are increasingly capable of navigating repositories and fixing bugs. To improve them, researchers often try to extract "skills"—reusable pieces of guidance—from successful past attempts. However, this approach faces a major hurdle: causality vs. correlation.

Just because an agent performed a specific action in a successful run doesn't mean that action caused the success; it might have been an incidental habit or even a lucky fluke. Furthermore, many skills are "brittle," working well in one repository but failing to transfer to others with different conventions. XRepoSkill aims to identify which behaviors are truly responsible for success and ensure they are general enough to work in entirely new environments.

Methods

XRepoSkill moves away from simply summarizing successful trajectories. Instead, it employs a three-stage pipeline:

  1. Divergence-Guided Rule Discovery: The system pairs a successful trajectory with a failed one for the same issue. It identifies the "divergence point"—the exact moment where the two paths split. By focusing on what the successful agent did differently after this point, it extracts candidate rules (e.g., "run the failing test before editing any file").
  2. Rule Verification & Generalization: To ensure a rule isn't just a fluke, XRepoSkill converts it into an executable predicate (a deterministic code-based check). This allows the system to scan thousands of other trajectories to see if that specific behavior consistently leads to better outcomes. Rules that prove effective across multiple different repositories are clustered and consolidated into "transferable rules."
  3. Issue-Adaptive Rule Selection: At inference time, the agent doesn't just get a giant manual. Instead, a selector LLM picks the top three most relevant, high-evidence rules for the specific bug at hand.
Figure 1: Overview of XRepoSkill.

Datasets

The authors used a diverse set of benchmarks to ensure their findings were robust:

  • Skill Learning (Training): Publicly released trajectories from the SWE-bench Verified leaderboard, featuring 500 Python issues and runs from 12 different LLMs.
  • Evaluation:
    • SWE-bench Pro: 200 real-world tasks across Python, Go, JavaScript, and TypeScript.
  • DeepSWE: 113 challenging, long-horizon tasks designed to test the limits of coding agents.
  • Crucially, none of the repositories used for evaluation appeared in the training trajectory pool, strictly testing the "transferability" of the learned skills.

Key Insights and Ideas

  • Failure is a Great Teacher: By contrasting success with failure on the same task, XRepoSkill filters out "noise" (behaviors common to both outcomes) and zeroes in on the "signal" (the actions that actually made the difference).
  • Predicates over Prose: Natural language rules are fuzzy. By using executable predicates, the authors can statistically verify a rule's "Resolution Gain" across a massive dataset without the cost or inconsistency of repeated LLM calls.
  • Engineering Logic is Universal: Perhaps the most surprising finding was cross-language generalization. Even though the skills were learned exclusively from Python repositories, they significantly improved performance on Go and TypeScript tasks. This suggests the system is learning high-level software engineering strategies rather than language-specific syntax.

Key Results

XRepoSkill consistently outperformed the raw agent and three state-of-the-art skill-learning baselines (SkillOpt, STAIR, and Trace2Skill) across all tested LLMs (DeepSeek, GPT, and MiMo).

  • DeepSWE Performance: On this particularly difficult benchmark, XRepoSkill improved the resolution rate by 10.3 percentage points over the base agent and 5.0 points over the strongest baseline.
  • Stability: Repeated runs showed that these gains are stable and not the result of a "lucky" execution.
Table 1: (RQ1) Issue resolution rates (%) of different methods across LLMs on SWE-bench Pro and DeepSWE. Avg. denotes the mean over the three LLMs for each benchmark. The highest rate in each column is shown in bold.

Limitations and Future Work

While highly effective, the authors note a few areas for growth:

  • Action Abstraction: The current system relies on a predefined set of abstract actions (Read, Search, Edit, etc.). Expanding this vocabulary could allow for more nuanced and complex rules.
  • Selection Bottleneck: Currently, only three rules are provided to the agent to avoid "diluting" the prompt. Future work could explore hierarchical rule structures or more sophisticated ways to integrate a larger library of skills.
  • LLM Quality: The initial extraction of rules still depends on the reasoning capabilities of the "skill-learning LLM," meaning improvements in base models will likely lead to even better distilled skills.

Summary updated

BibTeX
@misc{guo2026xreposkill,
  author = {Yaoqi Guo and Haoyang Zhou and Jiayi Zhang and Yiran Zhang and Yang Liu and Qiuyuan Chen and Qiang Lin and Hande Dong and Jie M. Zhang and Zhenpeng Chen},
  title = {{XRepoSkill: Learning Transferable Skills for Software Engineering Agents}},
  year = {2026},
  eprint = {2609.36807},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.36807},
}
Figure