---
title: Skills
url: https://platform.claude.com/docs/en/api/ruby/skills
---

# Skills

## Create Skill

`skills.create(**kwargs) -> Skill`

**POST** `/v1/skills`

Create Skill

### Parameters

- `files: Array[String]`

  Files to upload for the skill.

  All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.

- `display_name: String`

  Human-readable, single-line label for the Skill. Maximum 255 characters.
  Always set: derived from the SKILL.md frontmatter `name` when omitted at
  creation. Not unique.

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

### Returns

- `class Skill`

  - `type: :skill`

    Object type.

    For Skills, this is always `"skill"`.

  - `id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

  - `created_at: Time`

    ISO 8601 timestamp of when the skill was created.

    format: date-time

  - `display_name: String`

    Human-readable, single-line label for the Skill. Maximum 255 characters.
    Always set: derived from the SKILL.md frontmatter `name` when omitted at
    creation. Not unique.

  - `latest_version_id: String`

    ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version.

  - `source: SkillSource`

    Where the Skill comes from.

    Possible values:

    * `"custom"`: authored by the platform user; private to their workspace
    * `"anthropic"`: published by Anthropic; shared and read-only
    * `"anthropic_example"`: Anthropic-published sample Skill
    * `"plugin"`: resolved from an installed plugin

    - `type: :custom | :anthropic | :anthropic_example | :plugin`

      Where the Skill comes from.

      Possible values:

      * `"custom"`: authored by the platform user; private to their workspace
      * `"anthropic"`: published by Anthropic; shared and read-only
      * `"anthropic_example"`: Anthropic-published sample Skill
      * `"plugin"`: resolved from an installed plugin

      - `:custom`

      - `:anthropic`

      - `:anthropic_example`

      - `:plugin`

  - `updated_at: Time`

    ISO 8601 timestamp of when the skill was last updated.

    format: date-time

### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

skill = anthropic.skills.create(files: [StringIO.new("Example data")])

puts(skill)
```

#### Response (200)

```json
{
  "id": "skill_01JAbcdefghijklmnopqrstuvw",
  "created_at": "2024-10-30T23:58:27.427722Z",
  "display_name": "display_name",
  "latest_version_id": "latest_version_id",
  "source": {
    "type": "custom"
  },
  "type": "skill",
  "updated_at": "2024-10-30T23:58:27.427722Z"
}
```

## List Skills

`skills.list(**kwargs) -> PageCursor<Skill>`

**GET** `/v1/skills`

List Skills

### Parameters

- `limit: Integer` (query parameter)

  Number of results to return per page.

  Ranges from `1` to `1000`. Defaults to `20`.

  minimum: 1, maximum: 1000

- `page: String` (query parameter)

  Pagination token for fetching a specific page of results.

  Pass the value from a previous response's `next_page` field to get the next page of results.

- `source: String` (query parameter)

  Filter skills by source.

  If provided, only skills from the specified source will be returned:

  * `"custom"`: only return user-created skills
  * `"anthropic"`: only return Anthropic-created skills

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

### Returns

- `class Skill`

  - `type: :skill`

    Object type.

    For Skills, this is always `"skill"`.

  - `id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

  - `created_at: Time`

    ISO 8601 timestamp of when the skill was created.

    format: date-time

  - `display_name: String`

    Human-readable, single-line label for the Skill. Maximum 255 characters.
    Always set: derived from the SKILL.md frontmatter `name` when omitted at
    creation. Not unique.

  - `latest_version_id: String`

    ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version.

  - `source: SkillSource`

    Where the Skill comes from.

    Possible values:

    * `"custom"`: authored by the platform user; private to their workspace
    * `"anthropic"`: published by Anthropic; shared and read-only
    * `"anthropic_example"`: Anthropic-published sample Skill
    * `"plugin"`: resolved from an installed plugin

    - `type: :custom | :anthropic | :anthropic_example | :plugin`

      Where the Skill comes from.

      Possible values:

      * `"custom"`: authored by the platform user; private to their workspace
      * `"anthropic"`: published by Anthropic; shared and read-only
      * `"anthropic_example"`: Anthropic-published sample Skill
      * `"plugin"`: resolved from an installed plugin

      - `:custom`

      - `:anthropic`

      - `:anthropic_example`

      - `:plugin`

  - `updated_at: Time`

    ISO 8601 timestamp of when the skill was last updated.

    format: date-time

### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

page = anthropic.skills.list

puts(page)
```

#### Response (200)

```json
{
  "data": [
    {
      "id": "skill_01JAbcdefghijklmnopqrstuvw",
      "created_at": "2024-10-30T23:58:27.427722Z",
      "display_name": "display_name",
      "latest_version_id": "latest_version_id",
      "source": {
        "type": "custom"
      },
      "type": "skill",
      "updated_at": "2024-10-30T23:58:27.427722Z"
    }
  ],
  "next_page": "next_page"
}
```

## Get Skill

`skills.retrieve(skill_id, **kwargs) -> Skill`

**GET** `/v1/skills/{skill_id}`

Get Skill

### Parameters

- `skill_id: String` (path parameter)

  Unique identifier for the skill.

  The format and length of IDs may change over time.

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

### Returns

- `class Skill`

  - `type: :skill`

    Object type.

    For Skills, this is always `"skill"`.

  - `id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

  - `created_at: Time`

    ISO 8601 timestamp of when the skill was created.

    format: date-time

  - `display_name: String`

    Human-readable, single-line label for the Skill. Maximum 255 characters.
    Always set: derived from the SKILL.md frontmatter `name` when omitted at
    creation. Not unique.

  - `latest_version_id: String`

    ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version.

  - `source: SkillSource`

    Where the Skill comes from.

    Possible values:

    * `"custom"`: authored by the platform user; private to their workspace
    * `"anthropic"`: published by Anthropic; shared and read-only
    * `"anthropic_example"`: Anthropic-published sample Skill
    * `"plugin"`: resolved from an installed plugin

    - `type: :custom | :anthropic | :anthropic_example | :plugin`

      Where the Skill comes from.

      Possible values:

      * `"custom"`: authored by the platform user; private to their workspace
      * `"anthropic"`: published by Anthropic; shared and read-only
      * `"anthropic_example"`: Anthropic-published sample Skill
      * `"plugin"`: resolved from an installed plugin

      - `:custom`

      - `:anthropic`

      - `:anthropic_example`

      - `:plugin`

  - `updated_at: Time`

    ISO 8601 timestamp of when the skill was last updated.

    format: date-time

### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

skill = anthropic.skills.retrieve("skill_id")

puts(skill)
```

#### Response (200)

```json
{
  "id": "skill_01JAbcdefghijklmnopqrstuvw",
  "created_at": "2024-10-30T23:58:27.427722Z",
  "display_name": "display_name",
  "latest_version_id": "latest_version_id",
  "source": {
    "type": "custom"
  },
  "type": "skill",
  "updated_at": "2024-10-30T23:58:27.427722Z"
}
```

## Delete Skill

`skills.delete(skill_id, **kwargs) -> DeletedSkill`

**DELETE** `/v1/skills/{skill_id}`

Delete Skill

### Parameters

- `skill_id: String` (path parameter)

  Unique identifier for the skill.

  The format and length of IDs may change over time.

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

### Returns

- `class DeletedSkill`

  - `type: :skill_deleted`

    Deleted object type.

    For Skills, this is always `"skill_deleted"`.

  - `id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

deleted_skill = anthropic.skills.delete("skill_id")

puts(deleted_skill)
```

#### Response (200)

```json
{
  "id": "skill_01JAbcdefghijklmnopqrstuvw",
  "type": "skill_deleted"
}
```

## Domain types

### Deleted Skill

- `class DeletedSkill`

  - `type: :skill_deleted`

    Deleted object type.

    For Skills, this is always `"skill_deleted"`.

  - `id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

### Skill

- `class Skill`

  - `type: :skill`

    Object type.

    For Skills, this is always `"skill"`.

  - `id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

  - `created_at: Time`

    ISO 8601 timestamp of when the skill was created.

    format: date-time

  - `display_name: String`

    Human-readable, single-line label for the Skill. Maximum 255 characters.
    Always set: derived from the SKILL.md frontmatter `name` when omitted at
    creation. Not unique.

  - `latest_version_id: String`

    ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version.

  - `source: SkillSource`

    Where the Skill comes from.

    Possible values:

    * `"custom"`: authored by the platform user; private to their workspace
    * `"anthropic"`: published by Anthropic; shared and read-only
    * `"anthropic_example"`: Anthropic-published sample Skill
    * `"plugin"`: resolved from an installed plugin

    - `type: :custom | :anthropic | :anthropic_example | :plugin`

      Where the Skill comes from.

      Possible values:

      * `"custom"`: authored by the platform user; private to their workspace
      * `"anthropic"`: published by Anthropic; shared and read-only
      * `"anthropic_example"`: Anthropic-published sample Skill
      * `"plugin"`: resolved from an installed plugin

      - `:custom`

      - `:anthropic`

      - `:anthropic_example`

      - `:plugin`

  - `updated_at: Time`

    ISO 8601 timestamp of when the skill was last updated.

    format: date-time

### Skill Source

- `class SkillSource`

  - `type: :custom | :anthropic | :anthropic_example | :plugin`

    Where the Skill comes from.

    Possible values:

    * `"custom"`: authored by the platform user; private to their workspace
    * `"anthropic"`: published by Anthropic; shared and read-only
    * `"anthropic_example"`: Anthropic-published sample Skill
    * `"plugin"`: resolved from an installed plugin

    - `:custom`

    - `:anthropic`

    - `:anthropic_example`

    - `:plugin`

## Skills › Versions

### Create Skill Version

`skills.versions.create(skill_id, **kwargs) -> SkillVersion`

**POST** `/v1/skills/{skill_id}/versions`

Create Skill Version

#### Parameters

- `skill_id: String` (path parameter)

  Unique identifier for the skill.

  The format and length of IDs may change over time.

- `files: Array[String]`

  Files to upload for the skill.

  All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class SkillVersion`

  - `type: :skill_version`

    Object type.

    For Skill Versions, this is always `"skill_version"`.

  - `id: String`

    Unique identifier for this Skill Version. The id addresses the version in
    paths and pins it in references.

  - `created_at: Time`

    ISO 8601 timestamp of when the skill was created.

    format: date-time

  - `description: String`

    Description of the skill version.

    This is extracted from the SKILL.md file in the skill upload.

  - `name: String`

    The Skill's immutable kebab-case slug, set at creation from the first
    upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
    later upload must resolve to the same value. Also the top-level directory
    of the Skill's mounted files and the base name of a downloaded archive.

  - `skill_id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

#### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

skill_version = anthropic.skills.versions.create("skill_id", files: [StringIO.new("Example data")])

puts(skill_version)
```

##### Response (200)

```json
{
  "id": "id",
  "created_at": "2024-10-30T23:58:27.427722Z",
  "description": "description",
  "name": "name",
  "skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
  "type": "skill_version"
}
```

### List Skill Versions

`skills.versions.list(skill_id, **kwargs) -> PageCursor<SkillVersion>`

**GET** `/v1/skills/{skill_id}/versions`

List Skill Versions

#### Parameters

- `skill_id: String` (path parameter)

  Unique identifier for the skill.

  The format and length of IDs may change over time.

- `limit: Integer` (query parameter)

  Number of results to return per page.

  Ranges from `1` to `1000`. Defaults to `20`.

  minimum: 1, maximum: 1000

- `page: String` (query parameter)

  Optionally set to the `next_page` token from the previous response.

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class SkillVersion`

  - `type: :skill_version`

    Object type.

    For Skill Versions, this is always `"skill_version"`.

  - `id: String`

    Unique identifier for this Skill Version. The id addresses the version in
    paths and pins it in references.

  - `created_at: Time`

    ISO 8601 timestamp of when the skill was created.

    format: date-time

  - `description: String`

    Description of the skill version.

    This is extracted from the SKILL.md file in the skill upload.

  - `name: String`

    The Skill's immutable kebab-case slug, set at creation from the first
    upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
    later upload must resolve to the same value. Also the top-level directory
    of the Skill's mounted files and the base name of a downloaded archive.

  - `skill_id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

#### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

page = anthropic.skills.versions.list("skill_id")

puts(page)
```

##### Response (200)

```json
{
  "data": [
    {
      "id": "id",
      "created_at": "2024-10-30T23:58:27.427722Z",
      "description": "description",
      "name": "name",
      "skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
      "type": "skill_version"
    }
  ],
  "next_page": "next_page"
}
```

### Get Skill Version

`skills.versions.retrieve(version, **kwargs) -> SkillVersion`

**GET** `/v1/skills/{skill_id}/versions/{version}`

Get Skill Version

#### Parameters

- `skill_id: String` (path parameter)

  Unique identifier for the skill.

  The format and length of IDs may change over time.

- `version: String` (path parameter)

  Identifies the skill version: a version ID, or the literal `latest` for the skill's most recent version.

  Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129").

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class SkillVersion`

  - `type: :skill_version`

    Object type.

    For Skill Versions, this is always `"skill_version"`.

  - `id: String`

    Unique identifier for this Skill Version. The id addresses the version in
    paths and pins it in references.

  - `created_at: Time`

    ISO 8601 timestamp of when the skill was created.

    format: date-time

  - `description: String`

    Description of the skill version.

    This is extracted from the SKILL.md file in the skill upload.

  - `name: String`

    The Skill's immutable kebab-case slug, set at creation from the first
    upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
    later upload must resolve to the same value. Also the top-level directory
    of the Skill's mounted files and the base name of a downloaded archive.

  - `skill_id: String`

    Unique identifier for the skill.

    The format and length of IDs may change over time.

#### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

skill_version = anthropic.skills.versions.retrieve("version", skill_id: "skill_id")

puts(skill_version)
```

##### Response (200)

```json
{
  "id": "id",
  "created_at": "2024-10-30T23:58:27.427722Z",
  "description": "description",
  "name": "name",
  "skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
  "type": "skill_version"
}
```

### Delete Skill Version

`skills.versions.delete(version, **kwargs) -> DeletedSkillVersion`

**DELETE** `/v1/skills/{skill_id}/versions/{version}`

Delete Skill Version

#### Parameters

- `skill_id: String` (path parameter)

  Unique identifier for the skill.

  The format and length of IDs may change over time.

- `version: String` (path parameter)

  Identifies the skill version by its version ID.

  Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129").

- `workspace_id: String` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

#### Returns

- `class DeletedSkillVersion`

  - `type: :skill_version_deleted`

    Deleted object type.

    For Skill Versions, this is always `"skill_version_deleted"`.

  - `id: String`

    Unique identifier for this Skill Version. The id addresses the version in
    paths and pins it in references.

#### Example

```ruby
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

deleted_skill_version = anthropic.skills.versions.delete("version", skill_id: "skill_id")

puts(deleted_skill_version)
```

##### Response (200)

```json
{
  "id": "id",
  "type": "skill_version_deleted"
}
```
