> ## Documentation Index
> Fetch the complete documentation index at: https://docs.danubeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Skill

> Create a new skill

## Overview

Creates a new skill with SKILL.md content, optional scripts, reference files, and assets. Private skills are created immediately. Public skills require the `/skill-submissions` review flow.

**Auth:** Accepts either JWT or API key (`danube-api-key` header).

## Body Parameters

<ParamField body="name" type="string" required>
  Skill name (e.g. "pdf-processing")
</ParamField>

<ParamField body="skill_md_content" type="string" required>
  The SKILL.md markdown content with instructions. Should include YAML frontmatter with a `description` field.
</ParamField>

<ParamField body="scripts" type="array" default={[]}>
  Executable script files

  <Expandable title="Script file object">
    <ParamField body="name" type="string" required>
      File name (e.g. "process.py")
    </ParamField>

    <ParamField body="content" type="string" required>
      File content
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="reference_files" type="array" default={[]}>
  Reference documentation files

  <Expandable title="Reference file object">
    <ParamField body="name" type="string" required>
      File name
    </ParamField>

    <ParamField body="content" type="string" required>
      File content
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="assets" type="array" default={[]}>
  Asset files (templates, resources)

  <Expandable title="Asset file object">
    <ParamField body="name" type="string" required>
      File name
    </ParamField>

    <ParamField body="content" type="string" required>
      File content
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="visibility" type="string" default="private">
  `"private"` only via this endpoint. Public skills require `/skill-submissions`.
</ParamField>

<ParamField body="service_id" type="string">
  Optional service UUID to associate the skill with
</ParamField>

## Response

<ResponseField name="id" type="string">
  Created skill UUID
</ResponseField>

<ResponseField name="name" type="string">
  Skill name
</ResponseField>

<ResponseField name="description" type="string">
  Description extracted from SKILL.md frontmatter
</ResponseField>

<ResponseField name="skill_md" type="string">
  The SKILL.md content
</ResponseField>

<ResponseField name="scripts" type="array">
  Script files
</ResponseField>

<ResponseField name="references" type="array">
  Reference files
</ResponseField>

<ResponseField name="assets" type="array">
  Asset files
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.danubeai.com/v1/skills" \
    -H "danube-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "pdf-processing",
      "skill_md_content": "---\ndescription: Extract and process PDF documents\n---\n\n# PDF Processing\n\n## Steps\n1. Parse the PDF file\n2. Extract text content\n3. Return structured data",
      "scripts": [
        {"name": "extract.py", "content": "import fitz\n\ndef extract(path):\n    doc = fitz.open(path)\n    return [p.get_text() for p in doc]"}
      ],
      "visibility": "private"
    }'
  ```

  ```python Python SDK theme={null}
  from danube import DanubeClient

  with DanubeClient(api_key="dk_...") as client:
      skill = client.skills.create(
          name="pdf-processing",
          skill_md_content="---\ndescription: Extract and process PDF documents\n---\n\n# PDF Processing\n...",
          scripts=[{"name": "extract.py", "content": "..."}],
          visibility="private",
      )
      print(f"Created: {skill.id}")
  ```

  ```typescript TypeScript SDK theme={null}
  import { DanubeClient } from 'danube';

  const client = new DanubeClient({ apiKey: 'dk_...' });
  const skill = await client.skills.create({
    name: 'pdf-processing',
    skillMdContent: '---\ndescription: Extract and process PDF documents\n---\n...',
    scripts: [{ name: 'extract.py', content: '...' }],
    visibility: 'private',
  });
  console.log(`Created: ${skill.id}`);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "skill_abc123",
    "name": "pdf-processing",
    "description": "Extract and process PDF documents",
    "skill_md": "---\ndescription: Extract and process PDF documents\n---\n\n# PDF Processing\n...",
    "scripts": [
      {"name": "extract.py", "content": "..."}
    ],
    "references": [],
    "assets": [],
    "visibility": "private",
    "created_at": "2026-02-24T12:00:00Z"
  }
  ```
</ResponseExample>

## MCP Tool

This endpoint is also available as the `create_skill` MCP tool:

```python theme={null}
result = await mcp.call_tool("create_skill", {
    "name": "pdf-processing",
    "skill_md_content": "---\ndescription: Extract PDFs\n---\n\n# PDF Processing\n...",
    "visibility": "private"
})
```
