---
title: "Update a Skill"
method: PATCH
path: "/context/skills/{slug}"
tags: ["Skills"]
---

# Update a Skill

`PATCH /context/skills/{slug}`

## Request

- Base URL: `https://api.adcrunch.dev`
- URL: `https://api.adcrunch.dev/context/skills/{slug}`
- Auth: HTTP bearer

Updates a Skill. Send only the fields you change, with the `base_revision` you read. A field you omit keeps its value. The slug changes only when you send a `slug`: a new `name` alone never moves the handle. The answer is `409` with `error=revision_mismatch` if the Skill changed after you read it. It is `409` with `error=slug_conflict` if another Skill already holds the `slug` you send. An update keeps the `source` of an imported Skill.

## Path parameters

- `slug` string, required

## Request body

- object
  - `base_revision` integer, required: The revision last read via GET — guards concurrent edits.
  - `body` string
  - `description` string
  - `name` string
  - `slug` string: Optional new slug handle (a deliberate rename).

## Response `200`

The Skill as it now stands, at the next `revision`. Send that one back on your next edit.

- object
  - `body` string, required: The agent instructions themselves — the `SKILL.md`-equivalent, in markdown.
  - `createdAt` number, required: Milliseconds since the Unix epoch, UTC.
  - `createdBy` string, required
  - `description` string, required
  - `id` string, required
  - `name` string, required
  - `revision` number, required: Increments on every write. Send it back as `base_revision` to edit; a stale one answers 409.
  - `slug` string, required
  - `source` object, nullable, required: The Catalog Skill and the version that this Skill was imported from. It is `null` for a Skill that your organization wrote. An edit keeps it.
    - `slug` string, required: The slug of the Catalog Skill that the Skill was imported from.
    - `version` string, required: The version of the Catalog Skill that the Skill was last imported from, `YYYY-MM-DD`.
  - `updatedAt` number, nullable, required: Milliseconds since the Unix epoch, UTC.

## Other responses

- `400`: The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. `error` is `invalid_request`, and `issues` names each field. Nothing was changed.
- `401`: No API key, or one that does not resolve. See the security scheme. `error` is `unauthorized`.
- `402`: The organization has no active subscription. An owner subscribes at `paywallUrl`. `error` is `organization_unentitled`.
- `403`: The caller does not hold `skill:write`. `error` is `forbidden`.
- `404`: No Skill with that slug. `error` is `not_found`.
- `409`: Two different conflicts share this status, and `error` tells them apart. `revision_mismatch` means somebody else wrote first — re-read, re-apply your edit, and send the `currentRevision` back. `slug_conflict` means the rename collides with another Skill.
- `422`: The new slug contains no letter or digit. `error` is `invalid_slug`.

---

[API](https://skmtc.dev/adcrunch/apis/adcrunch-api.md) · [All operations](https://skmtc.dev/adcrunch/apis/adcrunch-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adcrunch/apis/adcrunch-api/revisions/a420ba80914f?raw)
