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

# Update a skill

> Edit a skill's content.

Updates an existing skill. This is a full replacement of the [Skill](/computer-use-agents/skills/overview) object. The `name` must match the URL identifier: renames are not supported.

**Returns** the updated [Skill](/computer-use-agents/skills/overview) object.

***

## Path parameters

<ParamField path="name" type="string" required>
  The skill's `name` (e.g. `extract-table-data` or `myorg/web-helper`). Slash-containing names are supported.
</ParamField>

***

## Request body

A full replacement of the [Skill](/computer-use-agents/skills/overview) object. The `name` in the body must equal the URL identifier. Any field you omit is reset to its default, not preserved. To change individual fields without resending the rest, use [Patch](/computer-use-agents/skills/patch) instead.

```json Request body theme={null}
{
  "name": "extract-table-data",
  "description": "Extract data from HTML tables, with CSV output support.",
  "body": "When you encounter an HTML table, extract rows into JSON or CSV based on the user request.",
  "source": "https://github.com/myorg/skills",
  "url_pattern": null
}
```

***

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \
    -H "Authorization: Bearer $HAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "extract-table-data",
      "description": "Extract data from HTML tables: updated with CSV output support.",
      "body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request."
    }'
  ```

  ```python Python theme={null}
  from hai_agents import Client

  client = Client()

  skill = client.skills.update_skill(
      name_="extract-table-data",
      name="extract-table-data",
      description="Extract data from HTML tables: updated with CSV output support.",
      body="When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
  )
  print(skill.description)
  ```

  ```typescript TypeScript theme={null}
  import { HaiAgentsClient } from "hai-agents";

  const client = new HaiAgentsClient();

  const skill = await client.skills.updateSkill({
    name: "extract-table-data",
    body: {
      name: "extract-table-data",
      description: "Extract data from HTML tables: updated with CSV output support.",
      body: "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
    },
  });
  console.log(skill.description);
  ```
</CodeGroup>

```json Response theme={null}
{
  "name": "extract-table-data",
  "description": "Extract data from HTML tables: updated with CSV output support.",
  "body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
  "source": null,
  "url_pattern": null
}
```

***

## Errors

| Status | Cause                                                                                 |
| ------ | ------------------------------------------------------------------------------------- |
| `400`  | The `name` in the body does not match the URL identifier (renames are not supported). |
| `403`  | The skill is reserved (`h/`) and read-only.                                           |
| `404`  | Skill not found or you don't have access.                                             |
| `422`  | Body fails validation; common cases: empty `body`.                                    |
