Anthropic::Skills::API
Skills API client for managing Anthropic Skills.
Skills require the beta header skills-2025-10-02.
All methods automatically inject the required beta header.
Usage
client = Anthropic::Client.new
skills = client.skills.list
skills.data.each { |s| puts s.display_title }
Constants
Constructors
Instance methods
Create a new skill by uploading content as multipart form data.
This is the primary creation method. It uploads a zip archive containing
the skill definition (including SKILL.md and any supporting files) as a
multipart form-data POST.
Parameters:
- request: An UploadSkillRequest containing the file content
- request_options: Optional per-request options
Example:
req = Anthropic::UploadSkillRequest.from_file("my_skill.zip")
skill = client.skills.create(req)
Create a new skill without uploading content (sends an empty JSON body).
This overload sends {} as a JSON POST body instead of multipart upload.
Use this when you want to register a skill placeholder and upload content
later via create_version(skill_id, upload_request).
NOTE: This is a convenience overload. Not all Skills API versions may support creation without content. Consult the Anthropic API documentation for your beta version.
Example:
skill = client.skills.create
req = Anthropic::UploadSkillRequest.from_file("my_skill.zip")
version = client.skills.create_version(skill.id, req)
Create a new version of a skill by uploading content as multipart form data.
This is the primary version creation method. It uploads a zip archive containing the updated skill definition as multipart form-data.
Parameters:
- skill_id: The ID of the skill to create a version for
- request: An UploadSkillRequest containing the file content
- request_options: Optional per-request options
Example:
req = Anthropic::UploadSkillRequest.from_file("my_skill_v2.zip")
version = client.skills.create_version("skill_01ABC123", req)
Create a new version of a skill without uploading content (sends an empty JSON body).
This overload sends {} as a JSON POST body instead of multipart upload.
Use this when the API supports version creation without content, e.g. to
trigger a rebuild from existing server-side content.
NOTE: This is a convenience overload. Not all Skills API versions may support version creation without content. Consult the Anthropic API documentation for your beta version.
Example:
version = client.skills.create_version("skill_01ABC123")
Delete a skill.
Delete a specific version of a skill.
List skills with optional filtering and pagination.
List versions of a skill.
Retrieve a specific skill by ID.