HyperAIHyperAI

Command Palette

Search for a command to run...

Fundierte Skill-Synthese aus Code im großen Maßstab für agentische Intelligenz

Yongqi Tong Pan Wang Hang Wang Jianshe Li Xin Zhang Jiang-Ming Yang Wei Wu

Zusammenfassung

Wiederverwendbare Skills verleihen agentischen Systemen übertragbares prozedurales Wissen, wodurch skalierbare Skill-Akquisition unerlässlich ist, um Agenten über ihre angesammelte Erfahrung hinaus zu erweitern. Bestehende Methoden zur Skill-Synthese haben zwei wesentliche Einschränkungen: Trajektorienbasierte Skill-Synthese ist inhärent an die Umgebungen gekoppelt, während aus Dokumenten gewonnene Erzeugnisse möglicherweise keine Evidenzunterstützung und Verifikation aufweisen. Quellcode bietet einen anderen Weg – er erfordert keine vorherige Erfahrung, bewahrt aber ausführbare Evidenz für die spätere Fundierung von Abstraktionen. Daher stellen wir Code2Skill vor, eine vollständig automatisierte Pipeline, die ausgewählte Code-Einheiten in implementierungsverankerte Skill-Datensätze für atomare Operationen, zusammengesetzte Workflows und wiederkehrende Muster überführt und sie durch eine Rekonstruktion ohne Kenntnis des Quelltextkörpers mit anschließendem quelltextbewusstem Vergleich verifiziert. Die Anwendung von Code2Skill auf 19.769 populäre und aktiv gepflegte GitHub-Repositories ergibt unsere CodeSkillBank, eine fundierte Skill-Bank mit 1.006.822 akzeptierten Datensätzen samt Metadaten zu Workflow, Grenzen, Provenienz und Quellenevidenz. Über 72 protokollabgestimmte Evaluationen hinweg, die neun Modelleinstellungen und acht Benchmarks umfassen, erzielen Modelle, die mit abgerufenen CodeSkillBank-Skills angereichert wurden, eine durchschnittliche Leistungssteigerung von 11,7 % gegenüber ihren entsprechenden Baselines und übertreffen diese in 57 Fällen. Unter einer einheitlichen nachgelagerten Schnittstelle übertrifft Code2Skill zudem die verglichenen trajektorienabgeleiteten Skill-Banken auf allen sieben gemeinsam genutzten Benchmarks, was zeigt, dass repositoryabgeleitete Skills effektives prozedurales Wissen bereitstellen können, bevor Agenten durch eigene Interaktionen ausreichend Erfahrung sammeln. Darüber hinaus zeigen umfangreiche Analysen, dass aus getestetem KI-generiertem Code synthetisierte Skills eine Bestehensrate von 93,50 % erreichen, verglichen mit 93,00 % für solche aus menschengeschriebenem Code. Dies liefert erste Belege dafür, dass dieselbe Pipeline die CodeSkillBank weiter ausbauen kann, da KI-generierter Code zunehmend verbreitet ist. Insgesamt bietet Code2Skill ein neues Paradigma für die Wiederverwendung menschlichen prozeduralen Wissens in agentischen Systemen, indem es in Software-Repositories eingebettetes Fachwissen in fundierte, verifizierbare und übertragbare Skills transformiert.

One-sentence Summary

Researchers at Ant International propose Code2Skill, a fully automated pipeline that lifts selected code units into implementation-anchored atomic-operation, composite-workflow, and recurring-pattern skill records verified through source-body-blind reconstruction and source-aware comparison, and applying it to 19,769 GitHub repositories yields CodeSkillBank with 1,006,822 records and an average performance gain of 11.7% across 72 evaluations.

Key Contributions

  • Code2Skill is a fully automated pipeline that lifts selected source-code units into implementation-anchored atomic-operation, composite-workflow, and recurring-pattern skill records, and verifies them through source-body-blind reconstruction followed by source-aware comparison.
  • Applying Code2Skill to 19,769 popular and actively maintained GitHub repositories yields CodeSkillBank, a grounded skill bank containing 1,006,822 accepted records with workflow, boundary, provenance, and source-evidence metadata.
  • In evaluations spanning nine model settings and eight benchmarks, retrieved CodeSkillBank skills achieve an average performance gain of 11.7% over matched baselines, with gains in 57 of 72 protocol-matched evaluations. Under a unified downstream interface, repository-derived skills also outperform compared trajectory-derived skill banks on all seven shared benchmarks.

Introduction

The authors address a practical bottleneck in agentic AI: large foundation models can reason well, but complex long-horizon tasks require reusable procedural knowledge that lives outside model parameters, often encoded as skills in an agent harness. Skills matter because they can be updated, versioned, and deployed independently, offering a scalable way to add domain-specific expertise. Prior skill synthesis is limited: trajectory-based methods distill skills from an agent’s own execution traces, so their quality is bounded by the generating agent and they may become outdated when models, tools, or task distributions change; document-based methods avoid this coupling but lack executable grounding and verification. The authors introduce Code2Skill, a fully automated pipeline that mines large-scale source code repositories, abstracts useful implementations into typed skill records, and verifies grounding by reconstructing the original implementation from the skill alone. Applied to 19,769 GitHub repositories, it produces CodeSkillBank, a skill base with 1,006,822 accepted records, and improves downstream agent performance across software engineering, reasoning, and system interaction benchmarks.

Dataset

Dataset sources and scale

  • The authors build CodeSkillBank from GitHub repositories available by April 14, 2026 with more than 500 stars.
  • The source pool contains 19,769 repositories.
  • The repository pool is concentrated in actively maintained public projects:
    • Median: 3,133 stars and 82 merged pull requests.
    • 78.3% have at least 1,000 stars.
    • 46.9% have at least 100 merged pull requests.
    • 66.0% were pushed within the previous year.
  • The pool covers major programming languages and software ecosystems.

Dataset composition

  • CodeSkillBank consists of typed skill records at three granularities:
    • Atomic skills: a single well-defined operation within one function or method.
    • Composite skills: ordered workflows coordinating multiple operations.
    • Recurring-pattern skills: higher-level implementations beyond a single localized operation or workflow.
  • Each record separates operational guidance from execution constraints and supporting evidence.
  • Records include fields such as:
    • Problem captured
    • When to use
    • Control rule
    • Workflow
    • Invariants and failures
    • Anti-goals
    • Source evidence
    • Provenance and construction metadata

Processing and filtering

  • The pipeline parses functions, methods, command-line entry points, and file-level components from each repository.
  • An LLM tagger selects units with reusable intent, operational structure, and visible execution constraints.
  • Trivial, project-local, and unsupported traces are rejected.
  • The extractor maps selected units to typed, task-facing candidates.
  • A source-body-blind reconstructor regenerates code using only the record.
  • A source-aware judge accepts sufficiently consistent reconstructions and routes remaining cases to an adjudicator.
  • Accepted records retain final status, rationale, reconstruction outcome, and provenance at repository, file, symbol, and source-span levels.

Quality and use

  • Human annotation of sampled pipeline outcomes reports:
    • 92% of final skill descriptions are judged accurate.
    • 80% of final records are judged worth retaining.
    • 84% of directly accepted records support correct reconstruction.
  • The rejection sample is weaker: 32% description accuracy, 28% retention value, and no correct reconstructions.
  • The paper uses CodeSkillBank as a large-scale skill base for procedural knowledge. The provided excerpt does not give explicit training split or mixture ratios.

Method

The authors formalize skill construction as a mapping from a source-code unit, such as a function, method, command-line entry point, or file-level component, together with its repository context, to a candidate skill record. A valid record should specify when the procedure applies, which behavior to reproduce, which preconditions and invariants govern execution, how failures should be handled, and which source spans support these claims. The formulation imposes three requirements. A record must be grounded, meaning recoverable implementation spans support its procedural claims and are challenged through source-body-blind reconstruction. It must be transferable, meaning project-specific identifiers and integration details are abstracted away while reusable preconditions, steps, invariants, and failure-handling strategies are preserved. It must also be maintainable, retaining provenance, supporting source spans, record type, and construction status so the record can be inspected, invalidated, or regenerated as the code evolves.

The pipeline begins by selecting candidate procedural evidence. Code2Skill scans GitHub repositories and retains higher-quality projects, then parses functions, methods, command-line entry points, and file-level components. An LLM tagger selects units with reusable intent, operational structure, and visible execution constraints. Trivial, project-local, and unsupported traces are rejected. Selected units remain candidates until extraction assigns a record type and reconstruction and adjudication determine acceptance.

Skill record generation maps each selected source unit and its structural context to a typed, task-facing candidate. The authors use three record granularities because procedural knowledge appears at different source scopes. Atomic skills capture a single well-defined operation within one function or method. Composite skills capture ordered workflows that coordinate multiple operations. Recurring-pattern skills capture higher-level implementations beyond a single localized operation or workflow. Each record separates operational guidance from execution constraints and supporting evidence while retaining provenance and construction metadata. The schema includes problem captured, when to use, control rule, workflow, invariants and failures, anti-goals, and source evidence. These fields preserve procedural steps, decision boundaries, transferable control rules, invariants, and provenance beyond a conventional code summary.

To prevent extraction from omitting critical operational details or introducing unsupported constraints, the pipeline uses source-body-blind reconstruction and consistency checking. A reconstructor regenerates code using only the record, without access to the source body. A source-aware judge directly accepts sufficiently consistent reconstructions and routes the remaining cases to an adjudicator, which distinguishes unsupported skill records from failures of the reconstruction process. The round trip uses LLM-based comparison to check consistency across the record, reconstruction, and source implementation. Accepted records retain their final status, rationale, reconstruction outcome, and repository-, file-, symbol-, and source-span-level provenance to support inspection, source-aware refresh, and traceability.

After acceptance, retrieval-oriented feature tagging creates a task-oriented retrieval view for every accepted record while preserving a one-to-one correspondence. Purpose indexing separately filters low-value candidates, groups records by similar purpose, and selects an existing record as the representative of each group. Both transformations leave the evidence archive intact.

For utilization, each evidence archive supports audit and maintenance because records retain provenance, reconstruction status, and acceptance trace. A downstream utilization interface controls when to query the bank, how much of each retrieved record to show, and at which decision point to provide that context. This covers prompt-level retrieval, planning-time retrieval, post-generation review, verifier-side reward use, and training-time skill conditioning. Given a task and agent or model state hth_tht before decision step, if the interface queries the bank with qtq_tqt, it constructs a rendered skill context and passes it to the recipient's usual policy or model call:

zt={Renderr(TopKk(qt;B)),if a query is issued,,otherwise.atπθ(s)(x,ht,zt).\begin{array}{l} z_{t} = \left\{ \begin{array}{ll} \operatorname{Render}_{r}\big(\operatorname{TopK}_{k}(q_{t}; \mathcal{B})\big), & \text{if a query is issued,} \\[2mm] \varnothing, & \text{otherwise.} \end{array} \right. \\[4mm] a_{t} \sim \pi_{\theta^{(s)}}(\cdot \mid x, h_{t}, z_{t}). \end{array}zt={Renderr(TopKk(qt;B)),,if a query is issued,otherwise.atπθ(s)(x,ht,zt).

Here B\mathcal{B}B denotes the retrieval-facing store available to the current evaluation, and ata_tat denotes the output at that decision point, such as a generation step, plan, review, verifier judgment, or environment action. The no-skill comparator uses the same protocol with zt=z_t = \varnothingzt=. For learning-time settings, the interface also determines which checkpoint θ(s)\theta^{(s)}θ(s) is evaluated. Skills may be visible to a verifier or reward model while remaining hidden from the policy trajectory being judged, whereas inference-only protocols keep model or policy parameters fixed.

Experiment

Across multiple model families and eight benchmarks spanning programming, software engineering, terminal and OS control, and reasoning, the authors evaluate an offline code-derived skill bank inside a draft-review-revision agent loop. The experiments show that code-derived skills consistently improve agent performance over a no-skill control and outperform trajectory-derived skill banks under a shared interface, with planning-time and post-generation review being more reliable insertion points than generation-time prompting. Compact summaries preserve most of the skill utility while sharply reducing context use, and skills remain beneficial when integrated into reinforcement learning, especially through post-generation review. Finally, tested AI-generated implementations yield skills that perform comparably to human-derived skills but produce distinct task-level outcomes, supporting continuous expansion from AI code.

All CodeSkillBank integration interfaces improve resolve rate over the no-skill baseline. Policy prompting and reward reference produce moderate gains, while post-generation review provides the largest improvement. These results come from a single checkpoint and do not establish learning speed, convergence, or final policy performance. Every skill-enabled condition outperforms the no-skill control. Policy and reward-side interfaces yield comparable moderate improvements. Post-generation review produces the largest resolve-rate gain, roughly twice the policy and reward-side gains. The findings reflect a single checkpoint without repeated seeds or learning curves.

The evaluation compares CodeSkillBank integration interfaces against a no-skill baseline on resolve rate. Policy prompting and reward reference provide comparable moderate gains, while post-generation review delivers the largest improvement, roughly twice those gains. These results come from a single checkpoint without repeated seeds or learning curves, so they do not establish learning speed, convergence, or final policy performance.


KI mit KI entwickeln

Von der Idee bis zum Launch – beschleunigen Sie Ihre KI-Entwicklung mit kostenlosem KI-Co-Coding, sofort einsatzbereiter Umgebung und bestem GPU-Preis.

KI-gestütztes kollaboratives Programmieren
Sofort einsatzbereite GPUs
Die besten Preise

HyperAI Newsletters

Abonnieren Sie unsere neuesten Updates
Wir werden die neuesten Updates der Woche in Ihren Posteingang liefern um neun Uhr jeden Montagmorgen
Unterstützt von MailChimp