Import a Skill
Skills API
Import Skill
Create or update a Skill from a SKILL.md file or zip archive
POST
Import a Skill
Using our API via a dedicated deployment? Just replace
api.langdock.com with your deployment’s base URL: <deployment-url>/api/publicSKILL.md file or a zip archive. Use this endpoint to sync repository-managed Skills into Langdock.
Required Scopes
This endpoint requires theSKILL_API scope.
Creating a new Skill requires the
createSkills workspace permission. Updating an existing Skill with mode: "upsert" requires editor access to the matching Skill.Request Format
Send the request asmultipart/form-data.
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | SKILL.md, .zip, or .skill file content. |
fileType | string | Yes | File parser to use: md or zip. Use zip for .zip and .skill archives. |
mode | string | No | Import mode: create or upsert. Default: create. |
integrationIds | string | No | JSON-encoded array of integration UUIDs to attach, for example ["550e8400-e29b-41d4-a716-446655440000"]. |
SKILL.md Format
The imported Skill must include YAML frontmatter followed by instructions:SKILL.md
| Frontmatter Field | Required | Description |
|---|---|---|
name | Yes | Skill name. Maximum: 64 characters. |
slug | No | Stable Skill slug. If omitted, Langdock generates one from the name. |
description | No | Description used to explain when the Skill should apply. Maximum: 1024 characters. |
license | No | Optional license metadata. |
Zip archive rules
Zip archives must contain aSKILL.md file at the root or inside one top-level directory. Langdock stores allowed supporting files with the Skill and skips unsupported file types.
| Limit | Value |
|---|---|
| Upload size | 25 MB |
| Total uncompressed size | 20 MB |
| Individual file size | 5 MB |
| Files per archive | 200 |
Import Modes
| Mode | Behavior |
|---|---|
create | Creates a new Skill from the import. The request fails if the slug already exists. |
upsert | Updates one editable Skill with the same slug, or creates a new Skill if none exists. The request fails if multiple editable Skills use the same slug. |
Example
Response Format
Success Response (200 OK or 201 Created)
200 OK means an existing Skill was updated through upsert. 201 Created means a new Skill was created.
Error Handling
| Status Code | Description |
|---|---|
| 400 | Invalid form data, invalid SKILL.md, invalid zip archive, or inaccessible integrationIds |
| 401 | Invalid or missing API key |
| 403 | Missing SKILL_API scope, Skills product access, create permission, or editor access |
| 409 | Existing slug conflict or ambiguous upsert slug |
| 413 | Uploaded file is too large |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.
Authorizations
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Body
multipart/form-data
SKILL.md, .zip, or .skill file content.
File parser to use.
Available options:
md, zip Whether to create a Skill or update an editable Skill with the same slug.
Available options:
create, upsert JSON-encoded array of integration UUIDs.