---
type: api
title: Create a skill
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-post-agent-builder-skills
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-post-agent-builder-skills
products:
  - Kibana
---

# Create a skill

Availability:

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/agent_builder/skills`
- `POST` `/s/{space_id}/api/agent_builder/skills`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/authentication#apikeyauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Create a new user-defined skill. To learn more about Agent Builder skills, refer to the [skills documentation](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/skills).<br/><br/>[Required authorization] Route required privileges: agentBuilder:manageSkills.

## Request Body

`application/json`

- `content` (string) — required
  Skill instructions content (markdown).
- `description` (string) — required
  Description of what the skill does.
- `id` (string) — required
  Unique identifier for the skill.
- `name` (string) — required
  Human-readable name for the skill.
- `referenced_content` ([] object · max: 100) — optional
  - `content` (string) — required
    Content of the reference.
  - `name` (string) — required
    Name of the referenced content.
  - `relativePath` (string) — required
    Relative path of the referenced content.
- `tool_ids` ([] string · max: 100 · default: []) — optional
  Tool IDs from the tool registry that this skill references.

## Response

Indicates a successful response

## Code Examples

#### Console

```console
POST kbn:/api/agent_builder/skills
{
  "id": "my-custom-skill",
  "name": "Custom Analysis Skill",
  "description": "A skill for performing custom data analysis.",
  "content": "You are an expert data analyst.",
  "tool_ids": ["platform.core.search"]
}
```

#### curl

```curl
curl \
  -X POST "https://${KIBANA_URL}/api/agent_builder/skills" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "my-custom-skill",
    "name": "Custom Analysis Skill",
    "description": "A skill for performing custom data analysis.",
    "content": "You are an expert data analyst.",
    "tool_ids": ["platform.core.search"]
  }'
```

## Response Examples

#### Create skill response

Example response returning the created skill

```json
{
  "content": "You are an expert data analyst. Use the available tools to query and analyze data.",
  "description": "A skill for performing custom data analysis.",
  "experimental": false,
  "id": "my-custom-skill",
  "name": "Custom Analysis Skill",
  "readonly": false,
  "tool_ids": [
    "platform.core.search"
  ]
}
```

