LedgerUI.Skill (LedgerUI v0.2.0)

Copy Markdown View Source

Builds the Claude Code skill that teaches an agent to write Ledger UI markup.

Everything comes from the installed package (LedgerUI.Docs: __components__/0, module and function docs), so the skill describes exactly the version in deps. SKILL.md is a short index with the rules that hold for every component; references/<component>.md holds the attrs, slots and usage of one component, read only when that component is used. It needs nothing outside the compiled modules, so it works from a Hex package.

mix ledger_ui.install writes it, mix ledger_ui.gen.skill refreshes it and the :ledger_ui_skill compiler refreshes it whenever the package version changes.

Summary

Functions

The default folder of the skill in a host app.

The files of the skill, as {relative_path, contents}.

The version a skill folder was generated for, or nil when it has no SKILL.md.

The comment that marks the pointer block in AGENTS.md and CLAUDE.md.

The block AGENTS.md and CLAUDE.md carry to send an agent to the skill.

The version of the installed package, which the generated SKILL.md carries in its heading.

Writes the skill under path, replacing the references of a previous run.

Functions

default_path()

@spec default_path() :: Path.t()

The default folder of the skill in a host app.

files()

@spec files() :: [{String.t(), String.t()}]

The files of the skill, as {relative_path, contents}.

installed_version(path)

@spec installed_version(Path.t()) :: String.t() | nil

The version a skill folder was generated for, or nil when it has no SKILL.md.

marker()

@spec marker() :: String.t()

The comment that marks the pointer block in AGENTS.md and CLAUDE.md.

pointer()

@spec pointer() :: String.t()

The block AGENTS.md and CLAUDE.md carry to send an agent to the skill.

version()

@spec version() :: String.t()

The version of the installed package, which the generated SKILL.md carries in its heading.

write!(path)

@spec write!(Path.t()) :: [{String.t(), String.t()}]

Writes the skill under path, replacing the references of a previous run.