cape.agent.skills: Agent skills for the CAPE agent¶
This package collects the agent skills available to the CAPE agent. A skill is a documented workflow that tells the agent how and when to use certain tools and how to chain tool calls together. Skills come from two sources:
Built-in skills are defined in this package, alongside any tools they
provide (see cape.agent.skills.cntlrunner).
User skills are discovered from .agents/skills/<NAME>/SKILL.md
files in the folder in which the user launches the agent (see
cape.agent.skills.skillbase.discover_user_skills()).
Skills are gated by the SkillSet option of the model in use (see
cape.agent.options.modelopts), and activated by the agent using
the use_skill tool (see cape.agent.skills.skilltools).
- class cape.agent.skills.Skill(name: str, description: str, content: str, tools: list | None = None, fname: str | None = None)¶
Definition of an agent skill, from code or a
SKILL.mdfile- Call:
>>> skill = Skill(name, description, content, **kw)
- Inputs:
- Outputs:
- skill:
Skill Definition of one agent skill
- skill:
- cape.agent.skills.discover_user_skills(rootdir: str) dict¶
Discover user skills from an
.agents/skills/folderScans
<rootdir>/.agents/skills/<NAME>/SKILL.mdand reads every valid skill file. Malformed files are skipped with a warning.
- cape.agent.skills.read_skillfile(fname: str) Skill¶
Read an agent skill definition from a
SKILL.mdfileThe file must start with a YAML front matter section delimited by
---lines, containing at least name and description. The remainder of the file is Markdown instructions for the agent.- Call:
>>> skill = read_skillfile(fname)
- Inputs:
- fname:
str Name of
SKILL.mdfile to read
- fname:
- Outputs:
- skill:
Skill Definition of one agent skill
- skill:
- Raises:
ValueErrorIf fname has no valid front matter or is missing a required key
- Versions:
2026-09-01
@ddalle: v1.0
cape.agent.skills.skillbase: Core skill definition and discoverycape.agent.skills.skilltools: Skill activation toolcape.agent.skills.checkcases: Efficient case-status queriescape.agent.skills.cntlrunner: Run whitelistedCntlmethodscape.agent.skills.fileedit: LLM-driven editing of allow-listed filescape.agent.skills.fileread: LLM-driven reading of repo filescape.agent.skills.fixjson: Diagnose and repair invalid JSON filescape.agent.skills.usertools: Discover and run repo scripts