Overview

6 Skills

In this chapter, skills are introduced as reusable procedures that extend an LLM agent beyond isolated tool calls. Unlike tools, which provide discrete capabilities, skills capture multi-step workflows that can be defined once and invoked repeatedly, making them especially useful for recurring tasks. The chapter also emphasizes that skills follow an open standard, which supports interoperability, discoverability, and the possibility of sharing skills across different agent systems and marketplaces.

The implementation begins by defining how skills are represented in the framework. A skill is bundled in a directory containing a required SKILL.md file with YAML frontmatter for metadata such as name, description, and optional fields like license, compatibility, and allowed tools. Skills can also include optional resource directories for scripts, references, and assets. The framework adds new data structures and validation logic to parse these bundles, enforce the standard, surface cosmetic warnings, and reject malformed skills when necessary.

The rest of the chapter shows how the agent discovers, discloses, and activates skills during task execution. Discovery scans user and project skill locations at task startup, while disclosure sends a compact skills catalog to the backbone LLM so it can decide whether a skill is relevant. Activation is handled through a dedicated tool that loads the full skill content, including any bundled resources, and the chapter also adds explicit user-driven activation for forcing a particular skill to run. Together, these pieces let the agent automatically or manually execute skills as part of its reasoning and task-solving process.

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.
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 SKILL.md file with its frontmatter and main content describing the procedural workflow.
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.
Illustrating where skill discovery fits within the LLMAgent lifecycle and task executions.
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.
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 is a skill in the context of an LLM agent, and how is it different from a tool?A skill is a reusable procedural workflow for completing a task, while a tool provides a discrete capability the agent can call during execution. Skills describe the steps to follow and often use one or more tools along the way.
Why use skills instead of rewriting the same prompt every time?Skills let you define a procedure once and reuse it whenever the same kind of task comes up. This avoids repeatedly copy-pasting detailed instructions and makes repeated multi-step tasks easier to run consistently.
What open standard governs skills?Skills are defined by the Agent Skills open standard. It specifies how skills are packaged, discovered, activated, and used by LLM agents across different frameworks and clients.
What goes inside a SKILL.md file?A SKILL.md file contains YAML frontmatter plus the skill’s main procedural workflow. The frontmatter must include at least a name and description, and may also include fields like license, compatibility, metadata, and allowed-tools.
What are the optional resource directories for a skill?A skill may include three optional adjacent resource directories: scripts/ for executable code, references/ for supplemental documentation, and assets/ for images, templates, data files, and similar content.
Where should skill bundles be stored?Skills are bundled in a directory whose name matches the skill name in its frontmatter. For this chapter’s framework, skills are placed under .agents/skills for either project scope or user scope, depending on where you want the skill to be available.
How does an LLM agent discover and use skills?The agent first discovers skills by scanning the configured skills directories. Then it activates a chosen skill by loading its SKILL.md body and any relevant resources into context, and finally executes the workflow.
When does skill discovery happen in this framework?Skill discovery happens at the start of each task execution, so every LLMAgent.run() call gets a fresh snapshot of available skills. This differs from MCP tool discovery, which happens when the agent is created.
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 an XML-formatted skill content block that includes the skill’s instructions and resource information.
How does user-explicit skill activation work?User-explicit activation lets the user force the agent to use a specific skill directly, rather than relying on the model’s judgment. In this framework, that is done through LLMAgent.run_with_skill(), which builds an instruction telling the agent to call UseSkillTool for the chosen skill.

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


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) ebook for free
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) ebook for free