Skills

A skill is an expert playbook the model can pull in when it matters: pruning technique, pest identification, frost protection. Each skill costs one line in the system prompt until the model decides it is relevant and reads the full body through an auto-provided read_skill tool.

agent = Mistri.agent("claude-opus-4-8", skills: "app/skills")

Writing one

A skill is a SKILL.md (or a flat .md) with frontmatter:

app/skills/pruning/SKILL.md
---
name: pruning
description: When and how to prune common garden plants.
---
Roses: prune in late winter to an outward-facing bud. Hydrangeas depend on
the type, so confirm which one before cutting...

From your database

Skills do not have to be files. Build them from rows and pass the array:

skills = GardenGuide.published.map do |row|
Mistri::Skill.new(name: row.slug, description: row.summary,
body: row.body)
end
agent = Mistri.agent("claude-opus-4-8", skills: skills)

The point is cost: ten skills add ten lines to every request, not ten documents, and the model reads at most the ones it needs.