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.
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.
Build a Multi-Agent System (from Scratch) ebook for free