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
