Grounded Skill Synthesis from Code at Scale for Agentic Intelligence
Organizations: Ant International
Abstract
Reusable skills give agents transferable procedural knowledge, making scalable acquisition essential for extending agents beyond prior experience. Existing methods face two limitations: trajectory-based synthesis requires interactions with specific environments, while document-derived skills may lack executable evidence and verification. Source code offers a complementary path: it requires no prior agent experience yet provides executable evidence for grounding abstractions. We present Code2Skill, a fully automated pipeline that transforms selected code units into implementation-anchored records of atomic operations, composite workflows, and recurring patterns, then verifies each record through source-body-blind reconstruction and source-aware comparison. Applied to 19,769 popular, actively maintained GitHub repositories, Code2Skill produces CodeSkillBank, a grounded bank of 1,006,822 accepted records with workflow, boundary, provenance, and source-evidence metadata. Across 72 protocol-matched evaluations covering nine model settings and eight benchmarks, models augmented with retrieved CodeSkillBank skills improve by 11.7% on average over matched baselines and outperform them in 57 cases. Under a unified downstream interface, Code2Skill also outperforms trajectory-derived skill banks on all seven shared benchmarks, showing that repository-derived skills can provide useful procedural knowledge before agents accumulate sufficient interaction experience. Skills synthesized from tested AI-generated code achieve a 93.50% pass rate, compared with 93.00% for human-written code, providing initial evidence that the pipeline can expand with the growing volume of AI-generated software. Overall, Code2Skill transforms procedural knowledge embedded in repositories into grounded, verifiable, and transferable agent skills.
Figures & tables
| Model | Reasoning Mode | w/ CodeSkill | Avg | Coding | Math/Reasoning | Terminal/System | |||||
| SWE | BigCode | AIME | HMMT | GPQA | Terminal | LongCLI | AgentBench | ||||
| DS4-Flash | No | No | 35.62 | 16.20 | 39.00 | 53.33 | 30.00 | 66.16 | 21.90 | 5.00 | 53.41 |
| Yes (Code2Skill) | 43.01 | 20.40 | 47.00 | 63.33 | 43.33 | 70.20 | 26.40 | 15.00 | 58.42 | ||
| Yes | No | 44.47 | 34.32 | 43.27 | 63.33 | 46.00 | 64.65 | 33.90 | 15.00 | 55.27 | |
| Yes (Code2Skill) | 51.76 | 44.70 | 42.34 | 70.00 | 53.33 | 67.17 | 45.20 | 30.00 | 61.32 | ||
| Qwen3.5 27b | No | No | 32.89 | 6.53 | 8.80 | 63.33 | 30.00 | 79.80 | 19.10 | 0.00 | 55.56 |
| Method | SWE | BigCode | AIME | HMMT | Terminal | LongCLI | AgentBench |
| Trace2Skill | |||||||
| ExpeL | |||||||
| SkillRL-Bank | |||||||
| Code2Skill |
| Interface | CodeSkill placement | Resolve rate |
| No CodeSkill | None | 24% |
| Full prompt | Policy, full records | 32% |
| Summary prompt | Policy, summaries | 31% |
| Reward reference | Verifier | 31% |
| Post-generation review | Reviewer | 38% |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Construction outcome | Skill Description Accuracy | Reconstruction Correctness | Retention Value |
| Removed by value filter | 88% | – | 0% |
| Direct equivalence accept | 96% | 84% | 76% |
| Accepted after adjudication | 88% | 0% | 84% |
| Full-pipeline rejection | 32% | 0% | 28% |
| Accepted-bank summary | 92% | 84% | 80% |
| Vocabulary | Allowed values |
| Task family | aggregation , configuration , dispatch , initialization , io , lookup , orchestration , parsing , recovery , security , state_transition , transformation , troubleshooting , validation , verification , workflow |
| Capability tag | aggregate_results , apply_defaults , branch_on_condition , check_identity , cleanup_resource , collect_inputs , compare_state , config_resolution , constraint_enforcement , deduplicate_items , dispatch_by_type , error_propagation , exception_wrap , fail_fast , fallback_on_empty , filter_items , ground_on_tool_results , initialize_resource , iterate_items , load_from_source , lookup_by_id , normalize_input , parse_input , permission_check , post_action_refresh , precondition_check , rank_or_select , retry_backoff , return_structured_output , state_toggle , status_check , status_refresh , success_verification , tool_invocation , validate_input , validate_output |
| Constraint tag | bounded_refuel , do_not_guess_missing_state , fail_closed , must_recheck_after_mutation , no_destructive_action , no_plan_change , one_tool_call_at_a_time , preserve_output_format , requires_identity_verification , requires_user_confirmation , return_error_on_failure , single_action_then_verify , tool_grounded_only |
| Success tag | goal_satisfied , no_error , output_returned , policy_satisfied , resource_initialized , state_updated , status_verified |
| Interaction pattern | branching_dispatch , multi_step_workflow , observe_act_observe , single_step |