Import skill pack

Import the skill ZIP package and the static files within it, and create an active skill of version 1. Form fields can be used to override the name, description, category, and tags of the inventory within the package.

HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/skills/import

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First check the skill package to confirm that the package format passes the verification. Prepare the personal access token, target workspace ID, and local skill package file that can access the target workspace.

Path parameters

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/skills/import" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -F "file=@./skill-package.zip" \
  -F 'tags=["摘要","文本处理"]'

Submit the file using multipart/form-data. curl -F in the example will set the request header, do not add Content-Type: application/json.

Parameter

Type

Required

Description

workspace_id

string

Yes

Current workspace ID.

file

file

Yes

The skill package in the .zip format must pass the format verification described in Check the skill package.

name

string

No

Override the corresponding metadata in SKILL.md. If not provided, the package value is used.

description

string

No

Override the corresponding metadata in SKILL.md. If not provided, the package value is used.

category

string

No

Override the corresponding metadata in SKILL.md. If not provided, the package value is used.

tags

string

No

JSON string array, such as ["摘要","文本处理"]. Replace the in-package label after delivery.

Successful response

JSON
{
  "code": 0,
  "data": {
    "skill": {
      "id": "skill_01",
      "workspace_id": "ws_01",
      "name": "摘要技能",
      "description": "总结输入内容。",
      "status": "active",
      "source_type": "custom",
      "source_ref": "skill_package:sha256:abc123",
      "version": 1,
      "routing_summary": {},
      "instruction": {
        "body": "总结用户提供的内容。"
      },
      "requirements": {},
      "created_at": "2026-01-02T15:04:05Z",
      "updated_at": "2026-01-02T15:04:05Z"
    },
    "files": [
      {
        "file_path": "SKILL.md",
        "file_kind": "manifest",
        "media_type": "text/markdown",
        "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "size_bytes": 512
      }
    ]
  }
}

Field

Type

Description

code

integer

0 on success.

data

object

The result of this request.

data.skill

object

Complete skills after import.

data.skill.annotations

object

Extended comments. Can be omitted if empty or not set.

data.skill.category

string

classification. Can be omitted if empty or not set.

data.skill.created_at

string

Creation time. Use RFC 3339 format. Can be omitted if empty or not set.

data.skill.created_by

string

Creator ID. Can be omitted if empty or not set.

data.skill.description

string

Description. Can be omitted if empty or not set.

data.skill.icon_ref

string

Icon reference. Can be omitted if empty or not set.

data.skill.id

string

Skill ID. Can be omitted if empty or not set.

data.skill.instruction

object

Skill instructions. Can be omitted if empty or not set. Returns an empty object if there are no subfields.

data.skill.instruction.body

string

Instruction text. Can be omitted if empty or not set.

data.skill.instruction.variables_schema

object

JSON Schema of directive variables. Can be omitted if empty or not set.

data.skill.labels

object

Extension tag. Can be omitted if empty or not set.

data.skill.market_metadata

object

Market metadata. Can be omitted if empty or not set.

data.skill.metadata

object

Extended metadata. Can be omitted if empty or not set.

data.skill.name

string

Name. Can be omitted if empty or not set.

data.skill.output_contract

object

Output convention. Can be omitted if empty or not set.

data.skill.parameters_schema

object

JSON Schema of skill input parameters. Can be omitted if empty or not set.

data.skill.phase

string

use stage. Can be omitted if empty or not set.

data.skill.pipeline_ref

string

Pipeline reference. Can be omitted if empty or not set.

data.skill.requirements

object

Skill dependent requirements. Can be omitted if empty or not set. Returns an empty object if there are no subfields.

data.skill.requirements.description

string

Description. Can be omitted if empty or not set.

data.skill.requirements.file_inputs

array

Document input requirements. Can be omitted if empty or not set.

data.skill.requirements.file_inputs[].description

string

Description. Can be omitted if empty or not set.

data.skill.requirements.file_inputs[].mime_types

array

Accepted file media types. Can be omitted if empty or not set.

data.skill.requirements.file_inputs[].name

string

Name. Can be omitted if empty or not set.

data.skill.requirements.file_inputs[].required

boolean

Is it required? Can be omitted if empty or not set.

data.skill.requirements.knowledge_base_roles

array

knowledge base role requirements. Can be omitted if empty or not set.

data.skill.requirements.knowledge_base_roles[].description

string

Description. Can be omitted if empty or not set.

data.skill.requirements.knowledge_base_roles[].required

boolean

Is it required? Can be omitted if empty or not set.

data.skill.requirements.knowledge_base_roles[].role

string

knowledge base role. Can be omitted if empty or not set.

data.skill.requirements.model_capabilities

array

Model capability requirements. Can be omitted if empty or not set.

data.skill.requirements.skill_refs

array

Dependent skill identifier. Can be omitted if empty or not set.

data.skill.requirements.tool_refs

array

Dependent tool identifier. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs

array

Tool resource references. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].bindability_reason

string

Description of binding capabilities. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].bindable

boolean

Whether it can be bound. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].binding_source

string

Binding source. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].category

string

classification. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].config

object

Resource allocation. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].description

string

Description. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].display_name

string

Display name. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].id

string

Reference item ID. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].kind

string

Tool type. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].manageable

boolean

Is it manageable. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].name

string

Name. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].phase

string

use stage. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].resource_id

string

The ID of the referenced object. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].runtime_tool_visibility

string

Runtime tool visibility. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].status

string

status. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].supported_runtimes

array

Supported runtimes. Can be omitted if empty or not set.

data.skill.requirements.tool_resource_refs[].workspace_id

string

The identity of the workspace to which it belongs. Can be omitted if empty or not set.

data.skill.routing_summary

object

Skill routing summary. Can be omitted if empty or not set. Returns an empty object if there are no subfields.

data.skill.routing_summary.examples

array

Routing example. Can be omitted if empty or not set.

data.skill.routing_summary.summary

string

Route summary text. Can be omitted if empty or not set.

data.skill.source_ref

string

Source information. Can be omitted if empty or not set.

data.skill.source_type

string

Source type. Can be omitted if empty or not set.

data.skill.status

string

status. Can be omitted if empty or not set.

data.skill.tags

array

label. Can be omitted if empty or not set.

data.skill.updated_at

string

Last updated time. Use RFC 3339 format. Can be omitted if empty or not set.

data.skill.updated_by

string

Last updated by identifier. Can be omitted if empty or not set.

data.skill.version

integer

Version number. Can be omitted if empty or not set.

data.skill.workspace_id

string

The identity of the workspace to which it belongs. Can be omitted if empty or not set.

data.files

array

Skill file metadata.

data.files[].file_path

string

Relative file path within the skill package. Can be omitted if empty or not set.

data.files[].file_kind

string

File category. Preferable manifest, reference, asset, script, other. Can be omitted if empty or not set.

data.files[].media_type

string

File media type. Can be omitted if empty or not set.

data.files[].sha256

string

SHA-256 digest of the file contents. Can be omitted if empty or not set.

data.files[].size_bytes

integer

File size in bytes. Can be omitted if empty or not set.

data.warnings

array

Non-blocking warning. Can be omitted if empty or not set.

Error response

When processing skill packages, insufficient permissions or unavailable dependencies will also return HTTP 400, code=2, and return SKILL_PACKAGE_INVALID. Authentication failures use a separate authentication error format.

JSON
{
  "code": 2,
  "message": "<错误信息>",
  "details": {
    "reason": "SKILL_PACKAGE_INVALID_ZIP"
  }
}

Common HTTP errors

HTTP status code

error code

Description

400

2(INVALID_ARGUMENT)

Common reasons: Package format, manifest, form tags or skill definition after import is invalid. Recommended Action: Correct package or form fields per details.reason.

413

8(RESOURCE_EXHAUSTED)

Common reasons: The compressed package or decompressed content exceeds the size limit. Recommended Action: Reduce the size of the package or remove unnecessary files.

401

6(UNAUTHENTICATED)

Common Cause: Valid identity credentials are missing. Recommended Action: Check the API Key.

Last updated on