---
title: "Bulk-export distilled procedures as Agent Skills"
method: GET
path: "/api/agent/skills/export"
tags: ["Agent"]
---

# Bulk-export distilled procedures as Agent Skills

`GET /api/agent/skills/export`

## Request

- Base URL: `http://localhost:38200`
- URL: `http://localhost:38200/api/agent/skills/export`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `token`

## Query parameters

- `workspace` string
- `format` 'zip' | 'json'

## Response `200`

`format=zip` (default) returns a `contextq-skills-<date>.zip` binary download; `format=json` returns a JSON array instead (consumed by `contextq skills sync <dir>` in the published CLI, avoiding an unzip dependency there).

- object
  - `skills` object[]
    - `contextId` integer
    - `slug` string
    - `clusterKey` string
    - `markdown` string

## Other responses

- `400`: Request body/query failed Zod validation.
- `401`: Missing or invalid credentials.
- `404`: Unknown workspace.

---

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