Jido.AI.Skill.Spec (Jido AI v2.4.0)

Copy Markdown View Source

Specification struct for skills, supporting compile-time modules, runtime-loaded SKILL.md files, and host-supplied runtime specs.

Follows the agentskills.io spec with Jido-specific extensions.

Summary

Functions

Validates the strict manifest fields shared by filesystem and runtime specs.

Validates a runtime-provided skill spec for Agent Skills integration.

Types

body_ref()

@type body_ref() :: {:file, String.t()} | {:inline, String.t()} | nil

source()

@type source() :: {:module, module()} | {:file, String.t()}

t()

@type t() :: %Jido.AI.Skill.Spec{
  actions: [module()],
  allowed_tools: [String.t()],
  body_ref: body_ref(),
  compatibility: String.t() | nil,
  description: String.t(),
  diagnostics: Jido.AI.Skill.Diagnostics.t() | nil,
  license: String.t() | nil,
  metadata: map() | nil,
  name: String.t(),
  plugins: [module()],
  source: source() | nil,
  tags: [String.t()],
  vsn: String.t() | nil
}

Functions

validate_manifest(spec)

@spec validate_manifest(t()) :: :ok | {:error, term()}

Validates the strict manifest fields shared by filesystem and runtime specs.

validate_runtime(spec, opts \\ [])

@spec validate_runtime(t(), keyword()) :: {:ok, t()} | {:error, term()}

Validates a runtime-provided skill spec for Agent Skills integration.

Runtime specs must use source: nil and carry their body inline so Agent Skills can preserve the host-provided manifest without discovering, reading, or listing from the filesystem.