Extending LLM Capabilities: Modular Skill Packs vs. Tool Calling
This article explores how large language models extend their capabilities through external mechanisms, specifically comparing tool calling (function calling) with modular skill packs. It details their shared foundational loop, differences in granularity and loading mechanisms, and provides practical guidelines for choosing the right approach and avoiding common pitfalls.
1. Background: Why LLMs Need External Capabilities
Once a large language model (LLM) completes training, its parameters are essentially fixed. It cannot directly access information generated after its training cutoff, nor can it read from or write to enterprise internal databases, file systems, or business systems. To enable models to perform real-world tasks, a common practice is to attach capabilities externally. The model decides when to make a call, an external program executes the specific operation, and the result is returned to the model to continue reasoning.
The industry has various names for this type of mechanism; this article refers to it uniformly as “capability extension.” From an engineering perspective, capability extension must solve three problems: how the model knows what capabilities are available, how the model initiates a request in an agreed-upon format, and how the execution results are safely and controllably returned to the context.
2. The Shared Essence of Both Extension Methods
Both approaches follow the same fundamental loop:
- Place the description of available capabilities into the model’s context.
- The model determines whether a specific capability is needed based on the user’s request and generates a structured call intent.
- The host program validates and executes the call, obtaining the result.
- The result is written back into the context, and the model generates the final answer based on it.
Therefore, the difference between the two lies not in “whether the model is extended,” but in the granularity of how capabilities are encapsulated, the description methods, and the loading mechanisms. Understanding this prevents viewing them as two unrelated technical systems.
3. Tool Calling: Function-Centric Capability Interfaces
Tool calling (function calling) is the most common extension method. Developers provide a name, a functional description, and a parameter structure for each tool. The model outputs parameters that conform to the structure, the program executes it, and the result is returned.
A tool definition typically includes the following elements:
- Name: Short and unique, e.g.,
get_weather; - Description: Explains the tool’s purpose and applicable scenarios; this is the primary basis for the model’s selection;
- Parameter schema: Uses JSON Schema to describe field types, required fields, and value ranges.
Example (generic pseudocode):
{"name": "query_order_status","description": "Query the current status of an order based on the order number; only applicable for paid orders","parameters": {"type": "object","properties": {"order_id": {"type": "string", "description": "Order ID"}},"required": ["order_id"]}}
The advantage of tool calling is its clear boundaries and explicit interfaces, making parameter validation and access control straightforward. Its limitation is that each tool is an isolated unit. When a task requires multiple steps, multiple reference materials, and a fixed workflow, developers must scatter a large amount of business logic between prompts and code, increasing maintenance costs.
4. Modular Skill Packs: Task-Centric Capability Encapsulation
The encapsulation unit for the second approach is the “task.” A skill pack is a folder that can contain:
- Instruction files: Describe the steps, criteria, and output requirements for completing the task;
- Metadata: A brief explanation of the name and applicable scenarios, used to determine whether to activate it;
- Scripts: Handle deterministic work, such as format conversion and data statistics;
- Resources: Static materials like templates, specification documents, and reference tables.
Directory structure example:
weekly-report/├── meta.yaml # Name, applicable scenario description├── instructions.md # Steps and formatting requirements for generating a weekly report├── scripts/│ └── aggregate_tasks.py # Aggregate task progress and hours└── templates/└── report_template.docx
4.1 Progressive Loading
The key mechanism of skill packs is on-demand loading. When the system starts, only the metadata of each skill pack is placed into the context. The model uses this to determine which skill is relevant to the current task. Once relevance is established, it reads the corresponding instruction file. If the instructions reference scripts or templates, those resources are then read. This hierarchical loading keeps context usage within necessary limits while retaining complete task knowledge.
4.2 Division of Labor: Deterministic Operations vs. Flexibility
Scripts are responsible for repeatable, verifiable operations, such as calculating statistics or validating formats. The model is responsible for understanding semantics, organizing language, and handling exceptions. This clear division of labor reduces error rates and makes it easier to audit the results of each step.
5. Core Differences Comparison
| Dimension | Tool Calling | Modular Skill Packs |
|---|---|---|
| Encapsulation Unit | Single function or interface | Complete task workflow |
| Components | Name, description, parameter schema | Instructions, metadata, scripts, resources |
| Loading Timing | Typically provided all at once with the request | Metadata resides persistently; instructions and resources loaded on demand |
| Complexity Handling | Suitable for atomic operations | Suitable for multi-step, standardized tasks |
| Maintenance Method | Modify interface definitions and code | Modify documents and scripts within the folder |
| Typical Scenarios | Clear actions like querying, writing, calculating | Processes like report generation, data analysis, format normalization |
The two are not mutually exclusive. Atomic operations remain suitable for exposure via tool calling, while skill packs can internally call these tools, forming a layered structure.
6. Selection Principles
When choosing an extension method, consider the following questions:
- Can the task be broken down into a single function call? If yes, prioritize tool calling.
- Does the task rely on fixed workflows, reference specifications, or templates? If yes, it is suitable for encapsulation as a skill pack.
- Does the capability need to be reused across a large number of different scenarios? Highly reusable processes are better suited for independent packaging.
- Do non-developers participate in maintenance? Documented skill packs are easier to understand and modify.
7. Practical Example: Automated Weekly Report Generation
Suppose a team needs to aggregate progress from a task management system and generate a weekly report every week.
The tool calling approach requires defining multiple tools—such as querying the task list, querying hours, and generating documents—along with explaining the report format and steps in the system prompt. The model must chain these tools itself, and any change in the workflow requires modifying the prompt or code.
The skill pack approach, on the other hand, writes the formatting specifications into the instruction file, the aggregation logic into a script, and places the template in the resource directory. When the model recognizes a request like “generate a weekly report,” it loads the corresponding instructions, calls the script to complete the statistics, and outputs the content according to the template. Adjusting the format only requires modifying the template and instructions, without needing to alter the calling interface.
8. Common Pitfalls
- Pitfall 1: Assuming skill packs are inherently superior to tool calling. For single-interface scenarios, tool calling is more concise, and additional encapsulation only increases maintenance overhead.
- Pitfall 2: Writing all instructions into the metadata. Metadata should remain concise, with detailed steps placed in instruction files; otherwise, the purpose of on-demand loading is defeated.
- Pitfall 3: Ignoring security boundaries. Regardless of the method, scripts and tools should follow the principle of least privilege, validate inputs, and set confirmation steps for write operations.
- Pitfall 4: Hardcoding sensitive information in scripts. Credentials should be sourced from environment variables or a key management service.
9. Conclusion
Both tool calling and modular skill packs are ways for LLMs to acquire external capabilities. Their essence is the same, but they differ in encapsulation granularity and loading mechanisms. Atomic capabilities are best provided as interfaces, while complete tasks are best organized as skill packs. Developers should make choices based on task complexity, reuse requirements, and maintenance stakeholders, always prioritizing access control and data security.
