arXiv:2610.35616cs.CLOct 2026

Manuscript Offprint

arXiv:2610.35616

Hierarchical Skill Evolution for Coding Agent

Jun Gao, Yun Peng, Changhai Zhou, Yuhan Zhu, Xiangyu Zeng, Shiyang Zhang Yuhua Zhou, Luozheng Qin, Qian Qiao, Xiaoteng Ma, Baian Chen Weiyi Shang, Zhen Ming Jack Jiang, Lizhi Liao, Xiaoxue Ren

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

ABSTRACT

Skills provide agents with reusable experience to guide future decisions without modifying the underlying model. However, coding trajectories are often entangled with task- and repository-specific contexts, making it challenging to distill procedural skills that generalize across diverse coding environments. To address this challenge, we present Hierarchical Skill Evolution (HSE), which progressively distills procedural knowledge from coding trajectories through hierarchical evidence aggregation. HSE first extracts task-level evidence from individual trajectories, then aggregates recurring evidence within the same repository to form repository-specific skill candidates, and finally consolidates consistent patterns across repositories into transferable skills across repositories. The evolution is driven by an external writer-evaluator loop that generates and assesses skills while keeping the underlying coding model frozen. The loop externally updates the writer and evaluator policies to improve subsequent skill generation and assessment. This hierarchy progressively filters task-specific details while preserving procedures that generalize across diverse coding environments. Successful trajectories yield reusable guidance for future tasks, while failed trajectories reveal recurring failure modes that guide avoidance and recovery. We evaluate HSE on SWE-bench Verified and DeepSWE, using GLM-5.2 across Pi and Claude Code harnesses and GPT-5.5 and Opus 4.8 with Pi. Across both benchmarks, 10 skills evolved solely from SWE-Gym improve coding performance across all evaluated settings, demonstrating transfer across benchmarks, coding models, and agent harnesses. We further evolve the skill library from target-benchmark trajectories without verifier feedback, relying solely on the learned evaluator for candidate assessment and achieving additional gains through benchmark-tailored skills.

1 INTRODUCTION

Skills allow coding agents to reuse experience from previous tasks without modifying the underlying model (Wang et al., 2023; Zhao et al., 2024; Wang et al., 2024; Ouyang et al., 2026b). This is particularly attractive for repository-level coding, where every attempt produces a rich trajectory of searches, code inspection, edits, tests, and recovery actions (Yang et al., 2024; Wang et al., 2025). Reusing these trajectories could prevent an agent from repeatedly rediscovering the same repair strategies. A trajectory, however, is not yet a reusable skill. It is entangled with a particular issue, repository structure, file paths, and patch, whereas a useful skill should guide future decisions without assuming that these task-specific details transfer.

Existing forms of agent experience expose both sides of this problem. Raw trajectory retrieval preserves concrete evidence but can encourage agents to copy solutions that are specific to a previous task or repository (Chen et al., 2025). SWESkillsBench provides broadly applicable domain knowledge, but this guidance may not tell an agent how to localize a particular bug, constrain a patch, validate the affected behavior, or recover after an incorrect edit (Han et al., 2026). Methods that synthesize or optimize skills from trajectories demonstrate that experience can be converted into reusable instructions (Zhao et al., 2024; Wang et al., 2024; Ouyang et al., 2026b; Ni et al., 2026; Yang et al., 2026a; Agrawal et al., 2026), but a central challenge remains: at what level should evidence be aggregated so that task-specific details are removed without also discarding the procedure that made the experience useful?