Skills

Update a Skill

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.

patch/context/skills/{slug}

Request

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

Path parameters

slugstring required

Request body

base_revisioninteger required

The revision last read via GET — guards concurrent edits.

bodystring
descriptionstring
namestring
slugstring

Optional new slug handle (a deliberate rename).

Example request

{
  "base_revision": 3,
  "description": "Use this every Monday, and after any change of budget, to move spend towards the campaigns that reach the target cost per action."
}

Response

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

bodystring required

The agent instructions themselves — the SKILL.md-equivalent, in markdown.

createdAtnumber required

Milliseconds since the Unix epoch, UTC.

createdBystring required
descriptionstring required
idstring required
namestring required
revisionnumber required

Increments on every write. Send it back as base_revision to edit; a stale one answers 409.

slugstring required
updatedAtnumber nullable required

Milliseconds since the Unix epoch, UTC.

Example response

{
  "body": "## When to run\n\nEvery Monday, before the week starts.\n\n## Steps\n\n1. Read the last seven days of spend for each live campaign.\n2. Move budget to the campaigns under the target cost per action.\n3. Write down what you changed, and why.",
  "createdAt": 1790000000000,
  "createdBy": "usr_4d8b12",
  "description": "Use this every Monday, and after any change of budget, to move spend towards the campaigns that reach the target cost per action.",
  "id": "skl_2d7e14",
  "name": "Weekly budget review",
  "revision": 4,
  "slug": "weekly-budget-review",
  "source": null,
  "updatedAt": 1790086400000
}

Changes

No recorded changes to this operation across all 1 revision of this API.