---
title: "Export skill"
method: GET
path: "/api/skills/{skillId}/export"
tags: ["Skills"]
---

# Export skill

`GET /api/skills/{skillId}/export`

## Request

- Base URL: `https://app.cotool.ai`
- URL: `https://app.cotool.ai/api/skills/{skillId}/export`
- Auth: HTTP bearer

Export a skill payload including current detail and version metadata.

## Path parameters

- `skillId` string, uuid, required: Unique identifier for the skill

## Response `200`

Successful response

- object
  - `skill` object, required
    - `id` string, required: Unique identifier for the skill
    - `organizationId` string, required: Unique identifier of the organization that owns this skill
    - `name` string, required: Machine-safe skill name used in sandbox paths and imports
    - `description` string, required: Description of what this skill teaches an agent to do
    - `requiredTools` string[], required: Optional required tool types for this skill
    - `userId` string, nullable, required: User ID that owns this user-scoped skill, or null for organization skills
    - `createdByUserId` string, nullable, required: User ID that created this skill, or null for system-created records
    - `updatedByUserId` string, nullable: User ID that last edited this skill, or null for system edits or unknown authorship
    - `createdBy` object, nullable: Display identity of the user that created this skill
      - `name` string, nullable, required: The user's profile display name, falling back to their email
      - `imageUrl` string, nullable, required: The user's profile image URL, if one is available
    - `updatedBy` object, nullable: Display identity of the user that last edited this skill
      - `name` string, nullable, required: The user's profile display name, falling back to their email
      - `imageUrl` string, nullable, required: The user's profile image URL, if one is available
    - `createdAt` string, required: Timestamp when the skill was created
    - `updatedAt` string, required: Timestamp when the skill was last updated
    - `deletedAt` string, nullable, required: Timestamp when the skill was soft-deleted, or null if active
    - `source` union, required: Origin and ownership semantics for this skill
      - object
        - `type` 'user-generated', required
      - object
        - `type` 'gitops', required
        - `syncSource` string, required: Sync backend managing this skill
      - object
        - `type` 'system-generated', required
      - object
        - `type` 'integration', required
        - `toolType` string, required: Parent integration type
    - `displayName` string: Human-readable skill name when it differs from the machine-safe name
    - `usedByAgentCount` number: How many agents currently use this skill
    - `invocationCount30d` number: Distinct chats in the last 30 days where an agent read this skill from the sandbox
    - `currentVersion` number: Current version number of this skill
    - `instructionPrompt` string, required: Primary instruction prompt content for this skill
    - `references` object[]: Resource files for the active/current version
      - `id` string, uuid, required: Unique identifier for the reference file record
      - `skillVersionId` string, uuid, required: Version ID this reference belongs to
      - `filename` string, required: Relative path from skill root (for example references/guide.md)
      - `directory` 'references' | 'assets' | 'scripts', required: Top-level skill directory where this file resides
      - `sizeBytes` integer, required: UTF-8 byte size of the file content
      - `content` string: Optional file content (included in version detail / export flows)
      - `createdAt` string: Timestamp when this file was stored
  - `versions` object[], required
    - `id` string, uuid, required: Unique identifier for the skill version
    - `skillId` string, uuid, required: Parent skill ID
    - `version` integer, required: Monotonic version number for the skill
    - `createdByUserId` string, nullable, required: User who created this version, if available
    - `createdAt` string, required: Timestamp when this version was created
  - `activeVersion` object, nullable, required
    - `id` string, uuid, required: Unique identifier for the skill version
    - `skillId` string, uuid, required: Parent skill ID
    - `version` integer, required: Monotonic version number for the skill
    - `createdByUserId` string, nullable, required: User who created this version, if available
    - `createdAt` string, required: Timestamp when this version was created
    - `instructionPrompt` string, required: Instruction content for this specific version
    - `requiredTools` string[], required: Required tools snapshot for this specific version
    - `references` object[], required: References attached to this specific version
      - `id` string, uuid, required: Unique identifier for the reference file record
      - `skillVersionId` string, uuid, required: Version ID this reference belongs to
      - `filename` string, required: Relative path from skill root (for example references/guide.md)
      - `directory` 'references' | 'assets' | 'scripts', required: Top-level skill directory where this file resides
      - `sizeBytes` integer, required: UTF-8 byte size of the file content
      - `content` string: Optional file content (included in version detail / export flows)
      - `createdAt` string: Timestamp when this file was stored

## Other responses

- `400`: Bad request — input validation failed or the request was malformed
- `401`: Unauthorized — missing or invalid API key / session
- `403`: Forbidden — the authenticated user lacks the required permissions
- `500`: Internal server error

---

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