liveBook · Manning

Skill.catalog()

As explained in Build a Multi-Agent System (from Scratch)

Skill.catalog() produces an informational string containing the skill's name, description, and location.

Skill.catalog() formats an informational string for an LLM agent’s system prompt. It uses a shared template to include the skill’s name, description, and location. section 6.2.2

Listing 6.4 Implementing Skill: catalog()
# llm_agents_from_scratch/skills/skill.py
… #A
from .constants import CATALOG_SKILL_TEMPLATE
 
class Skill:
    … #B
 
    def catalog(self) -> str:
        """Returns XML structured string for cataloging skill."""
        return CATALOG_SKILL_TEMPLATE.format(
            name=self.frontmatter.name,
            description=self.frontmatter.description,
            location=self.location.as_posix(),
        )

Inspect the implementation, which formats the three skill fields with CATALOG_SKILL_TEMPLATE. section 6.2.2

How Build a Multi-Agent System (from Scratch) covers it

How deep it goes
Formats the skill’s name, description, and location through a shared template.
Examples
Uses the skill’s name, description, and location as catalog fields.
What you can do after
Apply Skill.catalog() to produce a skill description for an LLM agent’s system prompt.
How it connects
Connects the Skill type to system prompts and LLM agents.

This explainer was generated by Manning's knowledge graph from the text of Build a Multi-Agent System (from Scratch). The section links point to the parts of the book it draws on.