ExAgent. Skill
(ExAgent v2.2.2)
View Source
A skill: instructions for one kind of task, loaded by the model when needed.
Skills follow the Agent Skills layout used by other
agent harnesses: a directory named after the skill containing a SKILL.md
with YAML frontmatter (name, description) and a Markdown body, plus
optional files such as references/ or scripts/. The same directory can
therefore serve ExAgent and coding agents.
Only the name and description are advertised up front. The body is returned
when the model calls load_skill, and other files when it reads them. See
ExAgent.Skills for how skills are attached to an agent.
Fields:
:name— 1–64 characters: lowercase ASCII letters, digits and single hyphens, not starting or ending with a hyphen. Unique per agent.:description— non-empty, at most 1024 characters. Say what the skill does and when to use it; the model decides from this text alone.:content— the instructions. Whennil, they are read fromSKILL.mdunder:patheach time the skill is loaded, so edits apply without rebuilding the agent.:path— the skill directory. Enablesread_skill_filefor its files.:tools—ExAgent.Tools offered to the model only after this skill is loaded in the conversation.:frontmatter— every frontmatter field, best effort and informational. Keys are strings; values are strings, lists or maps of strings, and a value outside the supported YAML subset is kept as its raw text. Onlynameanddescriptionare interpreted. Fields such asallowed-toolsgrant nothing: ExAgent does not take permissions from skill files.
Skill files are trusted host content, like :instructions. ExAgent never
executes their scripts; expose execution through your own tools.
Summary
Functions
Read a skill directory containing a SKILL.md.
Return the skill's current instructions: :content, or the body of its
SKILL.md read now.
Build a skill in code. Raises ArgumentError when it is invalid.
Parse the text of a SKILL.md into a skill whose :content is its body.
Check a skill's fields. Returns :ok or {:error, reason}.
Types
Functions
Read a skill directory containing a SKILL.md.
The frontmatter name identifies the skill. The Agent Skills format expects it
to match the directory name; skills published for other harnesses do not always
follow that, so a mismatch is accepted.
The body is not kept: :content is nil, so the current file is read each
time the model loads the skill. Option :tools attaches gated tools.
Return the skill's current instructions: :content, or the body of its
SKILL.md read now.
Build a skill in code. Raises ArgumentError when it is invalid.
ExAgent.Skill.new(
name: "release-notes",
description: "Write release notes. Use when asked to summarise a release.",
content: "1. List user-visible changes first..."
)Either :content or :path is required.
Parse the text of a SKILL.md into a skill whose :content is its body.
Options: :path and :tools are copied into the skill.
Check a skill's fields. Returns :ok or {:error, reason}.