Chapter 6: Skills
This introduction explains why reusable procedures complement tools and how an open standard supports sharing skills.
After this chapter you will be able to
- Reusable multistep procedures. Explain why documenting a repeated multistep procedure as a skill complements tools.
- Open standard and sharing. Explain how the open standard supports creating and sharing skills.
- Reusable workflows and tools. Explain how a skill preserves a task procedure for reuse and distinguish it from the tools used during that procedure.
- Standardized skill packaging. Describe how the Agent Skills open standard packages a skill and why the standard is not tied to one framework.
- Skill discovery and activation. Trace the high-level progression from discovering available skills to using one for a task.
- SKILL.md and frontmatter. Describe the structure of SKILL.md and the required information in its frontmatter.
- Skill resources and bundle. Describe how optional resources are organized and used within a skill directory.
- Skill locations and scope. Explain how scope and agent client affect where skill directories are placed, including the location chosen for this framework.
- Skill usage workflow. Trace how an agent discovers, selects, activates, and executes a skill.
- Skill representation and attributes. Describe the Skill core type and the roles of its frontmatter, scope, location, and resources attributes.
- Required frontmatter field validation. Explain how SkillFrontmatter relates to the specified fields and how it validates name and description.
- Skill attributes and resources. Describe how Skill initializes its attributes and exposes bundled resources.
- Skill catalog disclosure. Explain what catalog() prepares for the agent and what information it generally includes.
- Validated skill body reading. Explain what read_body() returns and how it validates the skill file.
- Skill Discovery Paths. Describe where the framework looks for skills and the role of get_skills_path().
- Per-Task Discovery Timing. Explain when skill discovery occurs in this framework and why that timing differs from the Agent Skills standard’s session-start timing.
- Skill Discovery Process. Describe how discover_skills() finds and returns usable skills, including what happens to bundles that fail validation.
- Lenient Bundle Validation. Explain how validate_skill_dir() distinguishes cosmetic problems from fatal errors and what it returns on successful validation.
- Per-task discovery wiring. Explain when TaskHandler discovers skills, where it stores them, and how LLMAgent.run() passes discovery-related parameters to it.
- Skill scope collision precedence. Explain which skill wins when project and user scopes contain skills with the same name, and why.
- Skill catalog disclosure. Explain how TaskHandler discloses discovered skills to the backbone LLM during task execution, and contrast this with tool disclosure.
- Explicit-only skill exclusion. Explain how skills reserved for user-explicit activation are treated during disclosure.
- Skill activation context. Explain what the backbone LLM knows before a selected skill is activated and what activation adds to its context.
- Tool-based skill activation. Trace how a skill is activated through UseSkillTool and what the tool returns.
- Catalog Guided Skill Selection. Explain how UseSkillTool identifies skills the model can activate and guides it toward the disclosed catalog.
- Skill Call Validation and Result. Trace how UseSkillTool validates a requested skill name and returns the activated skill’s content.
- UseSkillTool TaskHandler wiring. Describe how TaskHandler makes UseSkillTool available to the backbone LLM and how the Hailstone example illustrates its use.
- User Explicit Skill Activation. Explain why a user might explicitly activate a skill and how this relates to _explicit_only_skills.
- Explicit Activation Method. Describe how run_with_skill() takes a skill name and uses run() and UseSkillTool to direct activation, including the reason the tool's parameter validation was relaxed.
- Skill Scope and Specialization. Explain how skills can distinguish agents by their responsibilities and how the framework assigns access to skills compared with tools.
- Explicit-Only Skill Restriction. Explain how explicit_only_skills narrows a subagent’s model-initiated use of skills.
What it builds on
- Introducing MCP (chapter 5) · MCP tools extend an agent’s capabilities.
- BaseTool: a blueprint for tools (chapter 2) · Tools provide functionality an agent can invoke.
- Implementing LLMAgent: Part 1 (chapter 4) · The earlier use of templates for LLMAgent.
- LLMAgentBuilder: a dynamic builder of LLMAgent (chapter 5) · Dynamic construction of an LLMAgent with MCP tools.
- Implementing LLMAgent: Part 2 (chapter 4) · TaskHandler performs tasks on behalf of LLMAgent.
- Defining BaseTool (chapter 2) · BaseTool provides the tool superclass.
- Implementing ToolCall and ToolCallResult (chapter 2) · ToolCallResult is the result type used to return tool output.
Section by section
Introduction
This introduction explains why reusable procedures complement tools and how an open standard supports sharing skills.
- Reusable multistep procedures: Explain why documenting a repeated multistep procedure as a skill complements tools.
Why it matters: Skills let an agent repeat a useful workflow without requiring the user to spell it out every time. - Open standard and sharing: Explain how the open standard supports creating and sharing skills.
Why it matters: A shared standard makes it possible to use skills created by others as well as your own.
Key terms: skills, tools, procedures, Agent Skills open standard, discovery, shareable skills
6.1 Introducing Skills
6.1.1 Understanding skills
This section introduces reusable agent skills, their relationship to tools, and how the Agent Skills standard supports their packaging and use.
- Reusable workflows and tools: Explain how a skill preserves a task procedure for reuse and distinguish it from the tools used during that procedure.
Why it matters: This distinction explains how an agent can reuse a procedure while drawing on its existing tools. - Standardized skill packaging: Describe how the Agent Skills open standard packages a skill and why the standard is not tied to one framework.
Why it matters: A shared packaging standard makes skills usable across compatible agent products rather than tying them to one framework. - Skill discovery and activation: Trace the high-level progression from discovering available skills to using one for a task.
Why it matters: This sequence shows how an agent moves from knowing which skills exist to applying one. - Third-party skill compatibility: Explain the potential compatibility issue when obtaining skills from a marketplace.
Why it matters: A marketplace skill may be useful without being immediately compatible with your agent.
Key terms: skills, tools, documented workflow, Agent Skills open standard, SKILL.md, executable scripts, reference texts, discover, progressively disclosed, activating
6.1.2 Specifying skills
This section explains how the Agent Skills standard specifies a skill’s workflow, optional resources, directory bundle, and placement by scope and client.
- SKILL.md and frontmatter: Describe the structure of SKILL.md and the required information in its frontmatter.
Why it matters: This structure makes a skill’s identifying information and workflow available to an agent. - Skill resources and bundle: Describe how optional resources are organized and used within a skill directory.
Why it matters: Bundling the workflow with its resources gives the agent a coherent skill to use. - Skill locations and scope: Explain how scope and agent client affect where skill directories are placed, including the location chosen for this framework.
Why it matters: A skill must be placed where the intended client can find it and with the intended scope.
Key terms: SKILL.md, frontmatter, YAML, name, description, procedural workflow, scripts, references, assets, skill directory
6.1.3 How LLM agents use skills
This section explains how agents discover, activate, and execute skills, including user-explicit invocation.
- Skill usage workflow: Trace how an agent discovers, selects, activates, and executes a skill.
Why it matters: This sequence explains how an agent moves from knowing a skill exists to using its instructions. - User Explicit Invocation: Distinguish user-explicit skill invocation from an agent's own decision to use a skill.
Why it matters: This gives users a way to require a skill rather than leave its selection to the agent.
Key terms: discovery, activation, execution, backbone LLM, SKILL.md, procedural workflow, user-explicit invocation, Agent Skills standard
6.2 Skill: a new core type
This section introduces Skill as the framework’s representation of an Agent Skill and describes its four attributes.
- Skill representation and attributes: Describe the Skill core type and the roles of its frontmatter, scope, location, and resources attributes.
Why it matters: These attributes give the framework a way to represent a skill and locate its files.
Key terms: Skill, SkillFrontmatter, SkillScope, frontmatter, scope, location
6.2.1 Implementing SkillFrontmatter and SkillScope
This section relates SkillFrontmatter and SkillScope to the skill specification and identifies validation for required frontmatter fields.
- Required frontmatter field validation: Explain how SkillFrontmatter relates to the specified fields and how it validates name and description.
Why it matters: This validation ensures that a skill has a usable name and description. - Skill scope enumeration: Describe how SkillScope relates to the specified skill scope options.
Why it matters: SkillScope represents the available scope options in the implementation.
Key terms: SkillFrontmatter, name, description, SkillScope, scope
6.2.2 Implementing Skill
This section implements Skill’s attributes, resource lookup, catalog entry, and validated reading of its workflow.
- Skill attributes and resources: Describe how Skill initializes its attributes and exposes bundled resources.
Why it matters: This establishes what a Skill instance represents and how it exposes its supporting files. - Skill catalog disclosure: Explain what catalog() prepares for the agent and what information it generally includes.
Why it matters: The catalog entry gives the agent standardized information about a skill. - Validated skill body reading: Explain what read_body() returns and how it validates the skill file.
Why it matters: The agent can retrieve a skill’s workflow while detecting an unreadable or invalid skill file.
Key terms: Skill, frontmatter, scope, location, resources, catalog(), system prompt, template, name, description
6.3 Implementing Skill Discovery
6.3.1 Where and when to discover skills
This section identifies where the framework looks for skills and when discovery occurs relative to task execution and MCP tool discovery.
- Skill Discovery Paths: Describe where the framework looks for skills and the role of get_skills_path().
Why it matters: These paths determine where the framework can find skills for each scope. - Per-Task Discovery Timing: Explain when skill discovery occurs in this framework and why that timing differs from the Agent Skills standard’s session-start timing.
Why it matters: Per-task discovery lets each run see the skills available at its start. - Skills and Tools Lifecycle: Distinguish the discovery lifecycle of skills from that of MCP tools and describe the consequence for updates between task runs.
Why it matters: The distinction explains why a skill update can be picked up on the next task without changing the agent’s tool set.
Key terms: .agents/skills, user scope, project scope, get_skills_path(), SkillScope, skill discovery, session startup, task execution, LLMAgent.run(), fresh snapshot
6.3.2 Implementing discover_skills()
This section explains how skill discovery validates bundles from project and user scopes and handles invalid or duplicate skills.
- Skill Discovery Process: Describe how discover_skills() finds and returns usable skills, including what happens to bundles that fail validation.
Why it matters: Discovery makes usable skills available to the agent while reporting bundles it cannot use. - Lenient Bundle Validation: Explain how validate_skill_dir() distinguishes cosmetic problems from fatal errors and what it returns on successful validation.
Why it matters: Lenient validation preserves usable skills without hiding problems that prevent an agent from using them. - Duplicate Skill Name Handling: Describe what discovery does when two skills have the same name.
Why it matters: Name collisions affect which skill remains available under a given name.
Key terms: discover_skills(), SkillScope, Skill, SkillSkippedWarning, validate_skill_dir(), SkillFrontmatter, InvalidFrontmatterError, cosmetic issues, fatal errors, collision
6.3.3 Wiring discovery into LLMAgent and TaskHandler
This section wires skill discovery into task construction and demonstrates how to verify the resulting registry.
- Per-task discovery wiring: Explain when TaskHandler discovers skills, where it stores them, and how LLMAgent.run() passes discovery-related parameters to it.
Why it matters: This wiring gives each task an up-to-date set of discovered skills. - Skill scope collision precedence: Explain which skill wins when project and user scopes contain skills with the same name, and why.
Why it matters: Precedence determines which skill is available when scopes contain duplicate names. - Discovery demonstration and inspection: Describe how the example checks that constructing a TaskHandler discovers the stop-at-one skill.
Why it matters: Inspecting the handler provides a direct check that discovery ran and found the expected skill. - Obfuscated Hailstone skill rationale: Explain why the Hailstone example uses the name stop-at-one and avoids mentioning Hailstone or Collatz in its workflow.
Why it matters: The example is designed to exercise the instructed tool calls rather than let the model simulate the sequence from prior knowledge.
Key terms: TaskHandler, LLMAgent.run(), skills_registry, skills_scopes, explicit_only_skills, project-scoped skills, user-scoped skills, name collisions, Skill, frontmatter
6.3.4 Disclosing discovered skills to the backbone LLM
This section explains how discovered skills are disclosed to the backbone LLM and which skills are excluded from disclosure.
- Skill catalog disclosure: Explain how TaskHandler discloses discovered skills to the backbone LLM during task execution, and contrast this with tool disclosure.
Why it matters: The LLM needs a concise description of available skills before it can decide whether to use one. - Explicit-only skill exclusion: Explain how skills reserved for user-explicit activation are treated during disclosure.
Why it matters: The catalog does not present skills that only the user may explicitly activate as choices for the LLM.
Key terms: backbone LLM, run_step(), _skills_catalog, skills_catalog, <available_skills>, system prompt, _explicit_only_skills, user-explicit activation, skills catalog
6.4 Implementing Skill Activation
This section explains what skill activation adds to the backbone LLM’s context after an agent selects a skill.
- Skill activation context: Explain what the backbone LLM knows before a selected skill is activated and what activation adds to its context.
Why it matters: This explains how the LLM gains the information needed to use a selected skill.
Key terms: skill activation, backbone LLM, skill’s name and description, skills bundle
6.4.1 Activating a skill
This section describes the tool-based pattern chosen for skill activation and why it makes activations explicit.
- Tool-based skill activation: Trace how a skill is activated through UseSkillTool and what the tool returns.
Why it matters: This pattern makes a skill’s content available through the agent’s existing tool-calling interface. - Explicit activation rationale: Explain why the author chose a dedicated tool for skill activation.
Why it matters: Explicit activations make it easier to observe when a skill is used.
Key terms: UseSkillTool, skill activation, TaskHandler, tool-call request, rollout
6.4.2 Implementing UseSkillTool
This section implements UseSkillTool to guide skill selection, validate a requested skill, and return its formatted content.
- Catalog Guided Skill Selection: Explain how UseSkillTool identifies skills the model can activate and guides it toward the disclosed catalog.
Why it matters: The tool’s interface steers the model toward skills it has been told about. - Skill Call Validation and Result: Trace how UseSkillTool validates a requested skill name and returns the activated skill’s content.
Why it matters: These checks and the returned content define what happens when the tool activates a skill. - Schema and Runtime Validation: Distinguish the name enum exposed in the JSON schema from the less strict validation performed by the tool call.
Why it matters: The model-facing schema and runtime checks serve different activation needs.
Key terms: UseSkillTool, BaseTool, skills_registry, explicit_only_skills, skill catalog, parameters_json_schema, __call__, _skills_registry, _build_skill_content, ToolCallResult
6.4.3 Wiring UseSkillTool into TaskHandler
This section wires UseSkillTool into TaskHandler and illustrates autonomous skill activation by an LLM agent.
- UseSkillTool TaskHandler wiring: Describe how TaskHandler makes UseSkillTool available to the backbone LLM and how the Hailstone example illustrates its use.
Why it matters: This wiring makes skill activation available to the agent during task execution.
Key terms: UseSkillTool, TaskHandler, _use_skill_tool, run_step(), backbone LLM
6.4.4 User-explicit activation: run_with_skill()
This section introduces user-explicit skill activation through LLMAgent.run_with_skill() and explains how it directs the agent to invoke the named skill.
- User Explicit Skill Activation: Explain why a user might explicitly activate a skill and how this relates to _explicit_only_skills.
Why it matters: Explicit activation lets users choose a skill directly, including one that requires explicit invocation. - Explicit Activation Method: Describe how run_with_skill() takes a skill name and uses run() and UseSkillTool to direct activation, including the reason the tool's parameter validation was relaxed.
Why it matters: This method connects a user's explicit skill choice to the agent's existing task execution path.
Key terms: user-explicit skill activation, _explicit_only_skills, run_with_skill(), skill_name, prompt, max_steps, run(), UseSkillTool
6.5 Extending to MAS: Skills
This section explains how skills distinguish agents in a multi-agent system and how the framework controls their discovery and model-initiated activation.
- Skill Scope and Specialization: Explain how skills can distinguish agents by their responsibilities and how the framework assigns access to skills compared with tools.
Why it matters: This distinction helps you understand how agents can be specialized and how precisely their skills can be controlled. - Explicit-Only Skill Restriction: Explain how explicit_only_skills narrows a subagent’s model-initiated use of skills.
Why it matters: This gives you a way to limit which discovered skills the model can choose to activate itself.
Key terms: Skills, tools, scope, PROJECT scope, subagent, explicit_only_skills, run(), backbone LLM, activation
6.6 Summary
Where this is used later
- What memory is (and isn’t) (chapter 7) · Skills as instructions for performing tasks, which some broader definitions call procedural memory.
- Specialization and repeatability (chapter 9) · Skills provide a way to document specialized workflows.
- Chaining (chapter 9) · Skills as a way to provide instructions to an agent.
- Introducing the LLM Agent Inspector for supervised task executions (chapter 8) · Skills are discovered at the start of task execution.
- Updating LLMAgent and TaskHandler (chapter 9) · Skills are discovered at the start of each task run.
- SubAgentSpec: a core type for specifying a subagent (chapter 9) · Skills are disclosed to the backbone LLM.
- Updating the LLMAgent and TaskHandler classes (chapter 7) · Skill activation
Concepts explained in this chapter
- agent skillA skill is a reusable workflow packaged for discovery, activation, and execution by an LLM agent.
- skill discoverySkill discovery is the process by which an LLM agent identifies available skills and determines whether one is relevant to a task.
- agent skillsAgent Skills is an open standard for packaging reusable workflows that compliant LLM agent clients can discover, activate, and execute.
- SKILL.mdSKILL.md is the required Markdown file in an Agent Skills bundle that contains the skill's metadata and instructions.
- skill resourceA skill resource is an auxiliary file that a skill's workflow can use, categorized as a script, reference, or asset.
- skill activationSkill activation is the process of loading a skill's procedural workflow into the LLM's context so the workflow can be executed.
- useskilltoolUseSkillTool is the example framework's tool class for activating a skill and returning its formatted content.
- skill directoryA skill repository is a storage location for skill bundles, defined according to an agent application's and skill's scope.
- TaskHandlerTaskHandler is a framework helper class that orchestrates task execution across the processing loop and resolves to a TaskResult.
- frontmatterFrontmatter is metadata placed at the beginning of a structured document and separated from its main content.
- run_with_skill()run_with_skill() is the example framework's LLMAgent method for explicitly invoking a named skill with an optional prompt and step limit.
- multi-agent systemA multi-agent system is a system composed of multiple interacting agents that cooperate, coordinate, or compete to achieve goals.
- skillscopeSkillScope is a book-specific enumeration representing the scope options available to an agent skill.
- Skill.catalog()Skill.catalog() produces an informational string containing the skill's name, description, and location.
- toolA tool is an externally executable capability that an LLM agent can invoke to perform an operation or obtain information.
- run()run() is an LLMAgent method that accepts a user task, initiates its processing loop, and returns an awaitable that resolves to a TaskResult.
- subagentA subagent is an agent dispatched by another agent to work on a subtask contributing to an overall task.
- __call__() methodThe __call__() method is a Python special method that defines how an object behaves when invoked with function-call syntax.
- tool useToolCall is a data structure representing a requested tool invocation and its arguments.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
