CODESKILL: Learning Self-Evolving Skills for Coding Agents
CODESKILL is a reinforcement learning-based framework that learns to extract, evolve, and maintain a compact bank of multi-granularity procedural skills from coding agent trajectories, significantly improving downstream task performance on benchmarks like SWE-Bench Verified compared to existing prompt-based or memory approaches.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are teaching a very smart robot assistant how to fix software bugs. Every time the robot tries to fix a problem, it goes through a long process: it looks at the code, tries a command, sees an error, tries again, and eventually (hopefully) fixes it. This entire journey is called a "trajectory."
The problem is that if you just let the robot keep a diary of every single thing it ever did, the diary would become a messy, overwhelming mountain of paper. Most of it is just specific details about one particular bug that won't help with the next one.
CODESKILL is a new system designed to turn that messy mountain of paper into a sleek, organized instruction manual that the robot can actually use.
Here is how it works, broken down into simple concepts:
1. The Problem: Too Much Noise, Not Enough Signal
Currently, when robots try to learn from their past mistakes, they often rely on rigid rules or fixed prompts (like a teacher who says, "Always do X when you see Y"). But software engineering is complex. Sometimes the robot succeeds by accident, and sometimes it fails for a weird reason. It's hard to tell what is a reusable skill (like "how to fix a broken internet connection") versus just a one-time fluke (like "how to fix the specific typo in this file").
Existing methods are like a librarian who just stacks books on the floor without organizing them. They don't know which books are actually useful for the next reader.
2. The Solution: The "Self-Evolving Librarian"
CODESKILL acts as a smart librarian that manages the robot's knowledge base (called a Skill Bank). Instead of just storing raw stories, it:
- Extracts Skills: It reads the robot's past journeys and pulls out the "golden nuggets"—the general rules that apply to many situations.
- Evolves Skills: If the robot tries a skill and it fails, the librarian doesn't just throw the skill away. It updates the instruction manual to say, "Oh, this rule works, unless you see this specific error message."
- Maintains the Library: It constantly checks the library. If two books say the same thing, it merges them. If a book is too specific or useless, it throws it out. This keeps the library small and efficient.
3. How It Learns: The "Coach and the Athlete"
The most unique part of CODESKILL is how it learns to be a good librarian. It doesn't just guess; it gets feedback from a "frozen" athlete (the coding robot).
- The Athlete: This is the coding robot that solves the actual problems. It doesn't change its brain; it just tries to solve tasks.
- The Coach (CODESKILL): This is the system that manages the skills.
- The Training Loop:
- The Coach creates a new rule based on past experience.
- The Coach gives this rule to the Athlete.
- The Test: Does the Athlete solve the problem faster or better with this new rule?
- The Reward: If the Athlete succeeds, the Coach gets a high score. If the Athlete fails, the Coach gets a low score.
- The Coach uses this score to learn: "Okay, I need to write better rules next time."
The paper calls this Reinforcement Learning. It's like training a dog: you don't just tell the dog what to do; you give it a treat when it gets it right, so it learns to repeat the behavior that earns the treat.
4. Two Types of Skills
CODESKILL organizes knowledge into two types of instructions, like a cookbook with two sections:
- Task-Level Skills (The Big Picture): These are high-level strategies. Example: "When you see a Java build fail, first check your internet connection, then check your dependencies."
- Event-Driven Skills (The Quick Fixes): These are reactions to specific moments. Example: "If you see an error saying 'File Not Found,' immediately check if the file path has a typo."
5. The Results: A Smarter, Faster Robot
The researchers tested CODESKILL on three different "exam rooms" (benchmarks) where coding robots have to solve real-world software problems.
- The Baseline: A robot with no instruction manual (just raw intelligence).
- The Competition: Robots using older methods of remembering past tasks (like just reading a diary or using fixed prompts).
- CODESKILL: The robot using the self-evolving skill library.
The Outcome:
CODESKILL's robot solved significantly more problems than the others.
- It improved the success rate by about 9.7% compared to having no skills at all.
- It beat the strongest existing "memory" methods by about 4%.
- It also solved problems faster, taking fewer steps to reach the solution because it had better instructions to follow.
The Bottom Line
CODESKILL is a framework that teaches a coding robot how to learn how to learn. Instead of just memorizing every single thing that happened, it learns to distill those experiences into a compact, evolving set of rules. It acts like a coach that constantly refines the playbook based on whether the team actually wins the game, ensuring the robot gets better and more efficient over time without needing to be reprogrammed from scratch.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.