Overview

6 Skills

This chapter introduces skills as reusable procedures that let an LLM agent perform multi-step tasks without repeatedly rewriting the same instructions. Whereas tools provide discrete capabilities, skills describe how to combine those capabilities into a repeatable workflow. The chapter positions skills as a natural extension of tool use, especially for tasks that involve the same sequence of actions over and over.

It then explains the Agent Skills open standard, which defines how skills are packaged, discovered, and used across compatible agent systems. A skill is centered on a SKILL.md file containing required frontmatter such as a name and description, plus optional fields like license, compatibility, metadata, and allowed tools. Skills can also bundle supporting resources in adjacent directories for scripts, references, and assets, and these bundles are placed in scope-specific locations so agents can discover them at project or user level.

The implementation section shows how the framework is extended with a new Skill type, validation logic, and discovery routines that scan skill directories, handle malformed bundles gracefully, and load valid skills into a registry. The agent and task handler are updated to discover skills at task start, disclose visible skills to the backbone LLM, and support activation through a dedicated UseSkillTool. The chapter also adds explicit user-invoked skill execution and notes how this design can carry into future multi-agent setups, where skills remain a shared mechanism for shaping agent behavior.

In this chapter, we’ll define a new Skill core type and update our LLMAgent to support skill discovery, activation and execution.
In this chapter, we’ll define a new Skill core type and update our LLMAgent to support skill discovery, activation and execution.
We continue stage 2 of our build plan, enabling our LLM agent to discover and use skills.
We continue stage 2 of our build plan, enabling our LLM agent to discover and use skills.
Depicting the relationship between tools and skills. Tools provide the LLM agent with discrete functionality, while skills teach it how to perform specific tasks.
Depicting the relationship between tools and skills. Tools provide the LLM agent with discrete functionality, while skills teach it how to perform specific tasks.
The Agent Skills open standard defines how skills are created and used by LLM agents, enabling an ecosystem of shareable skills across compatible clients.
The Agent Skills open standard defines how skills are created and used by LLM agents, enabling an ecosystem of shareable skills across compatible clients.
The SKILL.md file with its frontmatter and main content describing the procedural workflow.
The SKILL.md file with its frontmatter and main content describing the procedural workflow.
The three steps for using a skill: discovery, activation, and execution.
The three steps for using a skill: discovery, activation, and execution.
UML class diagrams for our new core type Skill, as well as our new data structures, SkillFrontmatter and SkillScope.
UML class diagrams for our new core type Skill, as well as our new data structures, SkillFrontmatter and SkillScope.
Illustrating where skill discovery fits within the LLMAgent lifecycle and task executions.
Illustrating where skill discovery fits within the LLMAgent lifecycle and task executions.
The updates made to TaskHandler classes to support skills
The updates made to TaskHandler classes to support skills
Revisiting the TaskHandler.run_step() execution diagram first seen in Chapter 4 to illustrate the difference between tools and skills disclosure to the backbone LLM.
Revisiting the TaskHandler.run_step() execution diagram first seen in Chapter 4 to illustrate the difference between tools and skills disclosure to the backbone LLM.
The UML class diagram showing the structural makeup of UseSkillTool, a subclass of BaseTool.
The UML class diagram showing the structural makeup of UseSkillTool, a subclass of BaseTool.

Summary

  • Skills are documented procedural workflows, defined once and reused whenever needed.
  • Agent Skills is the open standard for skills that standardizes how they’re created and supported by LLM agent clients and products.
  • Like MCP tools, an ecosystem of shareable skills and compatible clients is emerging.
  • Skills are specified via a SKILL.md file that contains information about the skill in its frontmatter as well as its documented workflow in the main body.
  • Skills can also use additional resources, such as scripts, references, and assets.
  • A skills bundle is a directory that contains SKILL.md and the subdirectories for its additional resources.
  • The scope of the skill determines what projects can access it: a user-scoped skill is accessible to all projects, whereas a project-scoped skill is limited to the project it’s scoped to.
  • Skill bundles live in skill repositories that are defined by scope as well as the LLM agent application. For our framework, we use the cross-client skills repository .agents/skills.
  • LLM agents use skills in three steps: skill discovery, skill activation, and skill execution.
  • Skill is a new core type in our framework, representing skills that can be discovered and used by an LLM agent.
  • Skill discovery occurs for every task execution, at the creation of the TaskHandler object with every invocation of run().
  • Like tools, skills are disclosed to the backbone LLM (via a skills catalog) so it can decide whether to use a skill to perform the task.
  • If an LLM agent decides to use a skill, it must activate it by disclosing the complete information of the skill to the backbone LLM.
  • The UseSkillTool is a dedicated tool for activating a skill.
  • In addition to skills being invoked by the LLM agent, users can directly invoke skill usage via user-explicit activation. In our framework, this is implemented using a new method, run_with_skill(), attached to the LLMAgent.

FAQ

What are skills in an LLM agent system, and how are they different from tools?Skills are reusable procedures that define how to complete a task step by step, often by using one or more tools. Tools provide discrete capabilities, while skills describe the workflow for using those capabilities to accomplish a task.
Why use a skill instead of repeating the same instruction prompt every time?Skills let you define a procedure once and reuse it whenever needed. This avoids repeatedly writing or copy-pasting the same multi-step instructions and makes complex recurring tasks easier to automate.
What is the Agent Skills open standard?It is an open specification for creating and using skills in a framework-independent way. It defines how skills are structured, discovered, activated, and executed, enabling compatibility across different agent clients and an ecosystem of shareable skills.
What files and information does a skill bundle usually contain?A skill is bundled in a directory containing a required SKILL.md file plus optional resources such as scripts/, references/, and assets/. The SKILL.md file includes frontmatter metadata and the skill’s procedural workflow.
What fields are required in a skill’s frontmatter?The required frontmatter fields are name and description. Optional fields include license, compatibility, metadata, and allowed-tools.
What are the valid locations for skills in project and user scopes?Skills are commonly stored under .agents/skills for both project and user scopes. In the chapter, project scope uses <project-dir>/.agents/skills/ and user scope uses $HOME/.agents/skills/.
How do LLM agents use skills during task execution?They first discover available skills by scanning skill directories, then activate a selected skill by loading its full instructions and resources into context, and finally execute the skill’s workflow to complete the task. Users can also explicitly invoke a skill when supported.
How does skill discovery work in the framework?The framework scans the configured skill scopes, validates each candidate skill directory, and returns a registry of valid skills keyed by name. Invalid bundles are skipped with warnings or errors depending on the issue.
What is the purpose of UseSkillTool?UseSkillTool is a dedicated tool for activating a skill by name. When called with a valid skill name, it returns structured content containing the skill’s full instructions and any bundled resources needed for execution.
What is user-explicit skill activation, and when would you use run_with_skill()?User-explicit activation forces the agent to use a specific skill rather than letting the model choose whether to use one. run_with_skill() is used when you want deterministic skill usage, including for skills marked as explicit-only and hidden from normal skill disclosure.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Build a Multi-Agent System (from Scratch) Build a Multi-Agent System (from Scratch) ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Build a Multi-Agent System (from Scratch) Build a Multi-Agent System (from Scratch) ebook for free