Ratel Docs
ReferenceHTTP API

Skills

Create, edit, import, publish and archive the project's skills.

These endpoints manage the skills that GET /v1/catalog serves. A skill is draft, published or archived. Only published skills reach the catalog.

The skill object

{
  "id": "6f1c2b9e-4a7d-4f0e-9a51-2d8c3e7b1a40",
  "name": "triage-ticket",
  "description": "Sort a new support ticket by product area and urgency.",
  "searchableDescription": null,
  "tags": ["support"],
  "tools": ["search_tickets", "update_ticket"],
  "metadata": { "team": ["support"] },
  "body": "# Triage a ticket\n\n1. Read the ticket...",
  "status": "published",
  "version": 3,
  "endUserId": null,
  "model": null,
  "createdAt": "2026-11-02T09:14:00.000Z",
  "updatedAt": "2026-11-10T16:40:12.000Z",
  "publishedAt": "2026-11-10T16:40:12.000Z"
}
  • id is a UUID. Use it in the paths below. The catalog uses name instead.
  • version goes up on every change. Send it back as expectedVersion to refuse a write over someone else's change.
  • endUserId scopes the skill to one end user. null means global.

Errors on these endpoints use a machine code in error:

StatusBodyCause
400{ "error": "invalid", "issues": [...] }The body fails validation.
401{ "error": "..." }Missing, invalid, revoked or expired key.
403{ "error": "forbidden", "reason": "missing_scope", ... }The key does not have the scope.
403{ "error": "quota_exceeded", "reason": "maxSkillsPerProject", "message": "..." }The plan's skill limit is reached.
404{ "error": "not_found" }No such skill in the key's project.
409{ "error": "conflict", "reason": "version_conflict" }expectedVersion does not match. Re-read and retry.
409{ "error": "conflict", "reason": "name_conflict" }A live skill already has this name.

List skills

Returns the project's skills.

  • Method and path: GET /api/v1/skills
  • Auth: bearer API key with skills:read
ParameterInNotes
statusqueryOptional: draft, published or archived. Another value answers 400 with reason: "invalid_status".
endUserIdqueryOptional. Filters by end user.
curl -s "https://cloud.ratel.sh/api/v1/skills?status=published" \
  -H "Authorization: Bearer $RATEL_API_KEY"
{ "count": 1, "skills": [{ "id": "6f1c2b9e-...", "name": "triage-ticket", "status": "published", "version": 3 }] }

Each item is a full skill object, shortened here.

Create a skill

Creates one skill.

  • Method and path: POST /api/v1/skills
  • Auth: bearer API key with skills:write
FieldTypeNotes
namestringRequired. Kebab-case, up to 128 characters.
descriptionstringRequired. Up to 4,096 characters.
bodystringRequired. Up to 256 KB.
searchableDescriptionstring or nullOptional. Up to 4,096 characters.
tagsstring[]Optional. Up to 64.
toolsstring[]Optional. Tool IDs the skill uses, up to 256.
metadataobjectOptional. Up to 64 keys, each a list of strings.
statusstringdraft (default) or published.
modelstringOptional.
endUserIdstringOptional. Omit for a global skill.
curl -s https://cloud.ratel.sh/api/v1/skills \
  -H "Authorization: Bearer $RATEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "triage-ticket",
    "description": "Sort a new support ticket by product area and urgency.",
    "body": "# Triage a ticket\n\n1. Read the ticket...",
    "tools": ["search_tickets", "update_ticket"],
    "status": "published"
  }'

201 Created with { "skill": { ... } }. Errors: 400, 403 quota_exceeded, 409 name_conflict.

Get a skill

Returns one skill.

  • Method and path: GET /api/v1/skills/:id
  • Auth: bearer API key with skills:read
curl -s https://cloud.ratel.sh/api/v1/skills/6f1c2b9e-4a7d-4f0e-9a51-2d8c3e7b1a40 \
  -H "Authorization: Bearer $RATEL_API_KEY"

200 with { "skill": { ... } }. Errors: 404.

Edit a skill

Changes one or more fields of a skill.

  • Method and path: PATCH /api/v1/skills/:id
  • Auth: bearer API key with skills:write

Send at least one of name, description, searchableDescription, body, tags, tools, metadata or endUserId, with the same limits as create. endUserId: null makes the skill global. Add expectedVersion to guard the write.

curl -s -X PATCH https://cloud.ratel.sh/api/v1/skills/6f1c2b9e-4a7d-4f0e-9a51-2d8c3e7b1a40 \
  -H "Authorization: Bearer $RATEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "expectedVersion": 3, "description": "Sort a support ticket by area, urgency and plan." }'

200 with { "skill": { ... } }. Errors: 400, 404, 409.

Import skills

Creates or updates up to 100 skills by name in one call, for example from a folder of SKILL.md files.

  • Method and path: POST /api/v1/skills/import
  • Auth: bearer API key with skills:write

The body is { "skills": [...] }, 1 to 100 items, each shaped like create. Names must be unique in the request.

  • A name with no live skill is created.
  • A name with a live skill is updated when its content differs. status and endUserId apply on create only.
  • Nothing is archived. Archive a skill with its own call.

The import runs in the request. It has no job to poll.

curl -s https://cloud.ratel.sh/api/v1/skills/import \
  -H "Authorization: Bearer $RATEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "skills": [
    { "name": "triage-ticket", "description": "Sort a new support ticket.", "body": "# Triage a ticket" },
    { "name": "close-ticket", "description": "Close a solved ticket.", "body": "# Close a ticket" }
  ] }'
{ "created": ["close-ticket"], "updated": ["triage-ticket"], "unchanged": [] }

Errors: 400 (reason: "duplicate_name" for a repeated name), 403 quota_exceeded when the new skills do not fit the plan (nothing is written), 409 version_conflict.

Publish or archive a skill

Moves a skill to published or archived.

  • Method and path: POST /api/v1/skills/:id/publish or POST /api/v1/skills/:id/archive
  • Auth: bearer API key with skills:write

The body is optional: { "expectedVersion": 3 }.

curl -s -X POST https://cloud.ratel.sh/api/v1/skills/6f1c2b9e-4a7d-4f0e-9a51-2d8c3e7b1a40/publish \
  -H "Authorization: Bearer $RATEL_API_KEY"

200 with { "skill": { ... } }. Errors: 400, 404, 409. Publishing can answer name_conflict when another live skill has the same name.

On this page