Claudio.Skills (Claudio v0.7.0)
View SourceAnthropic Agent Skills API client (/v1/skills) — manage custom skills
(packaged SKILL.md + files) and their versions.
GA — no beta header.
client = Claudio.Client.new(%{token: "sk-ant-...", version: "2023-06-01"})
{:ok, %{"data" => skills}} = Claudio.Skills.list(client, source: "custom")Without the header, list/2 responses are
%{"data" => [...], "next_page" => cursor | nil} — page by passing
next_page back as :page. The old beta shape also carried "has_more";
callers that depend on it can opt back in:
client = Claudio.Client.with_betas(client, ["skills-2025-10-02"])Returns the raw decoded body ({:ok, map()}); a non-2xx response maps to
{:error, %Claudio.APIError{}}, consistent with Claudio.Admin / Claudio.Models.
Creating skills (multipart)
create/2 and create_version/3 upload multipart/form-data. The exact
form-field names are part of the upload spec; supply a form_multipart-shaped
list (same shape Claudio.Files.upload/3 uses):
form = [file: {File.read!("skill.zip"), filename: "skill.zip", content_type: "application/zip"}]
{:ok, skill} = Claudio.Skills.create(client, form)Prompt-tools (
/v1/experimental/*) are intentionally not implemented — experimental, access-gated, and the beta header is unverified.
Summary
Functions
Creates a skill from a multipart/form-data upload. form is a
form_multipart-shaped list, e.g.
[file: {bytes, filename: "skill.zip", content_type: "application/zip"}].
Creates a new version of an existing skill from a multipart upload.
Deletes a skill by id.
Deletes a specific version of a skill.
Retrieves a single skill by id.
Retrieves a specific version of a skill.
Lists skills. Opts become query params: :limit, :page (the previous
response's "next_page"), :source. Returns %{"data" => _, "next_page" => _}
(no "has_more" unless the client sends skills-2025-10-02).
Lists a skill's versions. Opts become query params.
Types
@type result() :: {:ok, map()} | {:error, Claudio.APIError.t() | term()}
Functions
@spec create( Req.Request.t(), keyword() ) :: result()
Creates a skill from a multipart/form-data upload. form is a
form_multipart-shaped list, e.g.
[file: {bytes, filename: "skill.zip", content_type: "application/zip"}].
@spec create_version(Req.Request.t(), String.t(), keyword()) :: result()
Creates a new version of an existing skill from a multipart upload.
@spec delete(Req.Request.t(), String.t()) :: result()
Deletes a skill by id.
@spec delete_version(Req.Request.t(), String.t(), String.t()) :: result()
Deletes a specific version of a skill.
@spec get(Req.Request.t(), String.t()) :: result()
Retrieves a single skill by id.
@spec get_version(Req.Request.t(), String.t(), String.t()) :: result()
Retrieves a specific version of a skill.
@spec list( Req.Request.t(), keyword() ) :: result()
Lists skills. Opts become query params: :limit, :page (the previous
response's "next_page"), :source. Returns %{"data" => _, "next_page" => _}
(no "has_more" unless the client sends skills-2025-10-02).
@spec list_versions(Req.Request.t(), String.t(), keyword()) :: result()
Lists a skill's versions. Opts become query params.