> ## 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.

# Update Skill

> Update an existing skill

## Overview

Updates a skill's name, content, scripts, references, or assets. Only the skill owner can update it.

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

## Path Parameters

<ParamField path="skill_id" type="string" required>
  The UUID of the skill to update
</ParamField>

## Body Parameters

<ParamField body="name" type="string">
  New skill name
</ParamField>

<ParamField body="skill_md_content" type="string">
  New SKILL.md content
</ParamField>

<ParamField body="scripts" type="array">
  Updated script files (replaces all existing scripts)

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

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

<ParamField body="reference_files" type="array">
  Updated reference files (replaces all existing references)
</ParamField>

<ParamField body="assets" type="array">
  Updated asset files (replaces all existing assets)
</ParamField>

<ParamField body="metadata" type="object">
  Updated metadata
</ParamField>

<ParamField body="license" type="string">
  Updated license identifier
</ParamField>

<ParamField body="compatibility" type="string">
  Updated compatibility info
</ParamField>

## Response

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

<ResponseField name="name" type="string">
  Updated skill name
</ResponseField>

<ResponseField name="description" type="string">
  Updated description (re-parsed from frontmatter if skill\_md\_content changed)
</ResponseField>

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

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.danubeai.com/v1/skills/skill_abc123" \
    -H "danube-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "pdf-processing-v2",
      "skill_md_content": "---\ndescription: Enhanced PDF processing\n---\n\n# PDF Processing v2\n..."
    }'
  ```

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

  with DanubeClient(api_key="dk_...") as client:
      skill = client.skills.update(
          skill_id="skill_abc123",
          name="pdf-processing-v2",
      )
      print(f"Updated: {skill.name}")
  ```

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

  const client = new DanubeClient({ apiKey: 'dk_...' });
  const skill = await client.skills.update('skill_abc123', {
    name: 'pdf-processing-v2',
  });
  console.log(`Updated: ${skill.name}`);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "skill_abc123",
    "name": "pdf-processing-v2",
    "description": "Enhanced PDF processing",
    "skill_md": "---\ndescription: Enhanced PDF processing\n---\n...",
    "scripts": [],
    "references": [],
    "assets": [],
    "visibility": "private",
    "updated_at": "2026-02-24T14:00:00Z"
  }
  ```
</ResponseExample>

## MCP Tool

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

```python theme={null}
result = await mcp.call_tool("update_skill", {
    "skill_id": "skill_abc123",
    "name": "pdf-processing-v2"
})
```
