---
title: "Re-import a Skill"
method: POST
path: "/context/skills/{slug}/re-import"
tags: ["Skills"]
---

# Re-import a Skill

`POST /context/skills/{slug}/re-import`

## Request

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

Re-imports a Skill that your organization imported from the Skill Catalog. The re-import replaces the name, the description and the body with the current version of the Catalog Skill, and sets `source.version`. The Skill keeps its slug. **Edits that your organization made to the Skill are lost.** Send the `baseRevision` you read. The answer is `409` when the re-import is not possible, and `error` tells why: `not_imported` for a Skill that your organization wrote, `not_in_skill_catalog` when the Catalog Skill left the Skill Catalog, `no_later_version` when the Skill Catalog has no later version, and `revision_mismatch` when the Skill changed after you read it.

## Path parameters

- `slug` string, required: The slug of the imported Skill in your organization.

## Request body

- object
  - `baseRevision` integer, required: The revision last read via GET. A re-import replaces the content of the Skill, so it guards the content that you read.

## Response `200`

The Skill with the content of the later version, at the next `revision`. This shape was not observed against a deployed service, because no stage held a later version of a Catalog Skill: it is written from the Context Layer’s view type.

- 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`: The re-import is not possible, and `error` tells why. `not_imported`: your organization wrote the Skill, so it has no source. `not_in_skill_catalog`: the Catalog Skill left the Skill Catalog; the Skill keeps its source. `no_later_version`: the version of the Catalog Skill is not later than `source.version`. `revision_mismatch`: somebody else wrote first; read the Skill again, and send the `currentRevision` back.

---

[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)
