Skip to content

Skills

Auto-generated from source docstrings (mkdocstrings). The complete public contract is agentmaker.__all__ plus each subpackage __all__.

Progressive-disclosure loading of Skills (one of the agent capability layers: workflow knowledge).

A Skill is a folder plus a SKILL.md (YAML frontmatter: name + description, then a body). Unlike a Tool (an action), a Skill is knowledge about "how to do something well", and the model decides on its own when to activate it (aligned with the Claude Code / OpenClaw / official format).

- Skill: a single skill (name/description known at startup, body lazy-loaded).
- SkillLoader: discover (directory layer) / catalog (the directory shown to the model) / load
  (read the body on demand).

Skill dataclass

A single skill. name/description are known at startup (directory layer); body is lazy-loaded (read only when used).

Attributes:

Name Type Description
name str

Unique identifier (kebab-case, e.g. daily-planning).

description str

What it does plus when to use it. The model decides whether to activate it from this, so it is the key to triggering.

path str

Path to SKILL.md.

body str

Full body; empty at discover time, populated after load() (progressive disclosure).

SkillLoader

Scans the skills directory, parses SKILL.md, and provides progressive-disclosure discovery and loading.

__init__(skills_dir)

Parameters:

Name Type Description Default
skills_dir str

The skills root directory; each subdirectory containing a SKILL.md is one skill. (The directory is passed in by the caller/app; agentmaker does not hardcode a path.)

required

discover()

Scan the directory, reading only each SKILL.md's frontmatter (name + description), not the body.

Progressive-disclosure layer 1: fetch only the "directory", leaving body empty to be read later on use (load). Reads lines up to the closing ---, so the body never enters memory. Skill names must be unique: a duplicate raises ValueError (otherwise load would take the first and catalog would list a duplicate, a silent ambiguity).

Returns:

Type Description
List[Skill]

List[Skill]: The discovered skills (with empty body), sorted by directory name.

catalog()

Join every skill's name + description into a "directory" text, placed in the system prompt for the model to decide which to use.

Returns:

Name Type Description
str str

Something like "- daily-planning: Organize scattered todos into a plan for the day. Use it when the user says 'plan today'.".

load(name)

Read a skill's full body (SKILL.md body); None if it does not exist.

Progressive-disclosure layer 2: called only when the model decides from the directory to activate a skill, so the body enters the context only at that moment.

Parameters:

Name Type Description Default
name str

The skill name (the name from discover/catalog).

required

Returns:

Type Description
Optional[str]

Optional[str]: The full body; None if not found.