Agentic.Skill.CoreSkills (agentic v0.2.2)

Copy Markdown

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)

Summary

Functions

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

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

Ensure core skills are installed in the workspace.

Get a core skill by its trigger event name.

List all bundled core skills with parsed metadata.

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

Read a specific core skill by name.

Functions

always_loaded()

@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?(name)

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

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

ensure_installed(workspace_root, opts \\ [])

@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(event)

@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()

@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()

@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(name)

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

Read a specific core skill by name.