Codex.Skills (Codex SDK v0.7.2)

Copy Markdown View Source

Helpers for discovering and loading Codex skills.

Skill discovery is gated by the features.skills flag in configuration.

Summary

Functions

Lists skills through the app-server when features.skills is enabled.

Loads the content of a skill file when features.skills is enabled.

Types

connection()

@type connection() :: Codex.AppServer.connection()

Functions

list(conn, opts \\ [])

@spec list(
  connection(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists skills through the app-server when features.skills is enabled.

Returns {:error, :skills_disabled} when the feature flag is off.

Options

  • :cwds - working directories to scan (forwarded to skills/list)
  • :force_reload - bypass skill cache (forwarded to skills/list)
  • :skills_enabled - override feature flag gate
  • :config - config map override used for gating
  • :codex_home - override CODEX_HOME lookup for gating
  • :cwd - override cwd lookup for gating
  • :app_server - override module used for app-server calls

load(skill_or_path, opts \\ [])

@spec load(
  map() | String.t(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Loads the content of a skill file when features.skills is enabled.

Accepts either a skill metadata map (containing path) or a direct path.