---
title: "Set skill composition"
method: PUT
path: "/api/v1/skills/{slug}/composition"
tags: ["Skills"]
---

# Set skill composition

`PUT /api/v1/skills/{slug}/composition`

## Request

- Base URL: `https://api.skills-hub.ai`
- URL: `https://api.skills-hub.ai/api/v1/skills/{slug}/composition`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

Defines a skill as an ordered composition of child skills (a workflow). Restricted to the author or an org `PUBLISHER`+. Child skills must be published; self-references and transitive cycles are rejected.

## Path parameters

- `slug` string, required

## Response `200`

Successful response. The returned fields are described in this endpoint's summary/description; typed per-field response schemas are being added incrementally.

- object: The full SkillDetail after setting the composition (same shape as GET /skills/{slug}).
  - `id` string, required
  - `slug` string, required
  - `name` string, required
  - `instructions` string, required
  - `isComposition` boolean
  - `versions` object[]
    - `id` string
    - `version` string
    - `changelog` string, nullable
    - `qualityScore` number, nullable
    - `createdAt` string
  - `composition` object, nullable, required
    - `description` string, nullable
    - `children` object[]
      - `skill` object
        - `slug` string
        - `name` string
        - `qualityScore` number, nullable
      - `sortOrder` integer
      - `isParallel` boolean
  - `media` object[]
    - `id` string
    - `type` 'SCREENSHOT' | 'YOUTUBE'
    - `url` string
    - `caption` string, nullable
    - `sortOrder` integer

---

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