# `Agentic.Skill.CoreSkills`

Manages bundled core skills that ship with every agent.

Core skills live in `priv/core_skills/` and are auto-installed into
workspaces on session start. They cannot be removed by the agent.

## Loading Modes

Core skills declare a `loading` field in their frontmatter:

- `"always"` — full body included in the system prompt
- `"on_demand"` — listed by name only, loaded via `skill_read` when needed
- `"trigger:<event>"` — not listed until triggered (e.g. onboarding)

# `always_loaded`

```elixir
@spec always_loaded() :: {:ok, [Agentic.Skill.Parser.parsed_skill()]}
```

Get all core skills that should be included in the system prompt.

Returns skills with `loading: "always"`.

# `core?`

```elixir
@spec core?(String.t()) :: boolean()
```

Check if a skill name is a core skill (cannot be removed).

# `ensure_installed`

```elixir
@spec ensure_installed(
  String.t(),
  keyword()
) :: :ok
```

Ensure core skills are installed in the workspace.

Copies any missing core skill SKILL.md files into the workspace's
`skills/` directory. Existing workspace skills with the same name
are not overwritten.

# `for_trigger`

```elixir
@spec for_trigger(String.t()) :: {:ok, Agentic.Skill.Parser.parsed_skill()} | :none
```

Get a core skill by its trigger event name.

For skills with `loading: "trigger:<event>"`, returns the skill matching
the given event.

# `list`

```elixir
@spec list() :: {:ok, [Agentic.Skill.Parser.parsed_skill()]}
```

List all bundled core skills with parsed metadata.

Returns `{:ok, [%{meta: ..., body: ...}]}` for all valid core skills.

# `on_demand`

```elixir
@spec on_demand() :: {:ok, [Agentic.Skill.Parser.parsed_skill()]}
```

Get all core skills that should be listed (not loaded) in the prompt.

Returns skills with `loading: "on_demand"`.

# `read`

```elixir
@spec read(String.t()) ::
  {:ok, Agentic.Skill.Parser.parsed_skill()} | {:error, String.t()}
```

Read a specific core skill by name.

---

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