# `LedgerUI.Skill`
[🔗](https://github.com/devaction-labs/ledger_ui/blob/v0.2.0/lib/ledger_ui/skill.ex#L1)

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.

# `default_path`

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

The default folder of the skill in a host app.

# `files`

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

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

# `installed_version`

```elixir
@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`

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

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

# `pointer`

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

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

# `version`

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

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

# `write!`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
