Anatomy of a production SKILL.md folder
Structure YAML frontmatter, instructions, and optional references/
A production skill folder holds SKILL.md (YAML frontmatter with name and clear trigger description, followed by concise step-by-step instructions) plus optional references/ checklists and scripts/ helpers loaded only when needed.
Example
import tempfile
from pathlib import Path
from praisonai import Agent, SkillsConfig
with tempfile.TemporaryDirectory() as tmp:
skill_dir = Path(tmp) / 'pr-review'
skill_dir.mkdir()
(skill_dir / 'SKILL.md').write_text(
'---\nname: pr-review\ndescription: Review Python diffs for input validation and missing tests.\n---\n'
'# PR Review\n1. Check input validation.\n2. Flag missing edge-case unit tests.\n'
)
agent = Agent(
name='SkillReviewer',
instructions='Follow active skills concisely in 2 short bullets.',
skills=SkillsConfig(paths=[str(skill_dir)], auto_discover=False),
output='silent',
)
print('Loaded skill:', agent.skill_manager.get_skill('pr-review').properties.name)
print(agent.start('Review: def parse_age(s): return int(s)'))Example explained
- YAML frontmatter (name + description) — Drives automatic skill matching so agents load the skill only on relevant prompts.
- SkillsConfig(paths=[…]) — Points the agent at explicit skill folders cleanly.
Progressive disclosure keeps token usage low
At startup, PraisonAI reads only the short name and description from frontmatter. The full SKILL.md body and references/ load only when a prompt matches the trigger.
Common pitfall: vague descriptions that match every prompt
Writing description: 'Helps with general tasks' causes the skill to trigger on unrelated chats and waste context tokens. State exact trigger phrases and exclusions.
Reference: documentation