# Capability-Driven Skill Generation with LLMs: A RAG-Based Approach for Reusing Existing Libraries and Interfaces

arXiv: https://arxiv.org/abs/2505.03295 · HTML: https://mlsanity.com/paper/2505.03295/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 7 of its 15 references that are in the map.
- First posted on arXiv 6 May 2025.

## Builds on (most cited first, 7 of 7)

- [LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluation](https://mlsanity.com/paper/2404.10100/) (2024)
- [Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agents](https://mlsanity.com/paper/2410.14209/) (2024)
- [LLM4PLC: Harnessing Large Language Models for Verifiable Programming of PLCs in Industrial Control Systems](https://mlsanity.com/paper/2401.05443/) (2024)
- [A Reference Model for Common Understanding of Capabilities and Skills in Manufacturing](https://mlsanity.com/paper/2209.09632/) (2022)
- [ChatGPT for PLC/DCS Control Logic Generation](https://mlsanity.com/paper/2305.15809/) (2023)
- [LLM-Generated Microservice Implementations from RESTful API Definitions](https://mlsanity.com/paper/2502.09766/) (2025)
- [Toward a Method to Generate Capability Ontologies from Natural Language Descriptions](https://mlsanity.com/paper/2406.07962/) (2024)

## Built on by (most cited first, 2 of 2)

- [Beyond Formal Semantics for Capabilities and Skills: Model Context Protocol in Manufacturing](https://mlsanity.com/paper/2506.11180/) (2025)
- [KG-First, LLM-Fallback: A Hybrid Microservice for Grounded Skill Search and Explanation](https://mlsanity.com/paper/2605.01582/) (2026)

## Abstract (arXiv)

Modern automation systems increasingly rely on modular architectures, with capabilities and skills as one solution approach. Capabilities define the functions of resources in a machine-readable form and skills provide the concrete implementations that realize those capabilities. However, the development of a skill implementation conforming to a corresponding capability remains a time-consuming and challenging task. In this paper, we present a method that treats capabilities as contracts for skill implementations and leverages large language models to generate executable code based on natural language user input. A key feature of our approach is the integration of existing software libraries and interface technologies, enabling the generation of skill implementations across different target languages. We introduce a framework that allows users to incorporate their own libraries and resource interfaces into the code generation process through a retrieval-augmented generation architecture. The proposed method is evaluated using an autonomous mobile robot controlled via Python and ROS 2, demonstrating the feasibility and flexibility of the approach.
