CodingAgent.Skills (CodingAgent v0.1.0)

Copy Markdown View Source

Discovers and holds the set of skills available to an agent session.

Skills live one-per-directory, each containing a SKILL.md:

skills/
  write_tests/SKILL.md
  review_pr/SKILL.md

This mirrors Claude Code's skill layout so existing skill directories can be pointed at directly.

Summary

Functions

Recursively finds every SKILL.md under dir and loads it.

Loads skills from several directories at once, deduped by name (first match wins).

Functions

find(name, skills)

@spec find(String.t(), [CodingAgent.Skill.t()]) :: CodingAgent.Skill.t() | nil

load_dir(dir)

@spec load_dir(String.t()) :: [CodingAgent.Skill.t()]

Recursively finds every SKILL.md under dir and loads it.

Invalid skills are skipped (with a logger warning) rather than failing the whole load, since one malformed skill shouldn't take down a session.

load_dirs(dirs)

@spec load_dirs([String.t()]) :: [CodingAgent.Skill.t()]

Loads skills from several directories at once, deduped by name (first match wins).