Update skills

Partially update the skills in the current workspace. Fields not provided retain their original values. Instead of just updating the tag, updates create a new skill version and make it the current version.

HTTP
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/skills/{skill_id}

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 Query skill details to confirm the skill to be updated. Prepare the personal access token, target workspace ID, and skill ID that can access the target workspace.

Request body

Shell
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/skills/$SKILL_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "更新后的说明",
    "change_summary": "补充输出约定"
  }'

Parameter

Type

Required

Description

workspace_id

string

Yes

Current workspace ID.

skill_id

string

Yes

The skill ID to update.

skill_workspace_id

string

No

The workspace to which the skill belongs. It can only be the current workspace or system. System skills are read-only and updates will be rejected.

name

string

No

Basic definition of skills. The status can be draft, active, disabled or archived.

description

string

No

Basic definition of skills. The status can be draft, active, disabled or archived.

status

string

No

Basic definition of skills. The status can be draft, active, disabled or archived.

source_type

string

No

Basic definition of skills. The status can be draft, active, disabled or archived.

source_ref

string

No

Basic definition of skills. The status can be draft, active, disabled or archived.

category

string

No

Classify and display information. Providing tags will replace the existing tag. Simply updating the tag does not create a new version.

icon_ref

string

No

Classify and display information. Providing tags will replace the existing tag. Simply updating the tag does not create a new version.

tags

array of string

No

Classify and display information. Providing tags will replace the existing tag. Simply updating the tag does not create a new version.

phase

string

No

Classify and display information. Providing tags will replace the existing tag. Simply updating the tag does not create a new version.

pipeline_ref

string

No

Classify and display information. Providing tags will replace the existing tag. Simply updating the tag does not create a new version.

routing_summary

object

No

Route summary, directives and dependency requirements.

instruction

object

No

Route summary, directives and dependency requirements.

requirements

object

No

Route summary, directives and dependency requirements.

parameters_schema

object

No

Input Schema and output conventions.

output_contract

object

No

Input Schema and output conventions.

market_metadata

object

No

Market metadata, tags, annotations and extended metadata.

labels

object

No

Market metadata, tags, annotations and extended metadata.

annotations

object

No

Market metadata, tags, annotations and extended metadata.

metadata

object

No

Market metadata, tags, annotations and extended metadata.

change_summary

string

No

Change notes for the new version.

The fields in the request body are optional. Fields not provided retain their original values.

The updated skill must still retain the instruction body or route summary and satisfy the validation rules for skill dependency references.

Successful response

JSON
{
  "code": 0,
  "data": {
    "id": "skill_01",
    "workspace_id": "ws_01",
    "name": "摘要技能",
    "description": "更新后的说明",
    "status": "active",
    "source_type": "custom",
    "instruction": {
      "body": "总结用户提供的内容。"
    },
    "version": 3,
    "updated_at": "2026-01-03T10:00:00Z",
    "routing_summary": {},
    "requirements": {},
    "created_at": "2026-01-02T15:04:05Z"
  }
}

Field

Type

Description

code

integer

0 on success.

data

object

The result of this request.

data.annotations

object

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

data.category

string

classification. Can be omitted if empty or not set.

data.created_at

string

Creation time. Use RFC 3339 format.

data.created_by

string

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

data.description

string

Description. Can be omitted if empty or not set.

data.icon_ref

string

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

data.id

string

Skill ID.

data.instruction

object

An empty object is returned when the skill command has no subfields.

data.instruction.body

string

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

data.instruction.variables_schema

object

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

data.labels

object

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

data.market_metadata

object

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

data.metadata

object

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

data.name

string

Name.

data.output_contract

object

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

data.parameters_schema

object

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

data.phase

string

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

data.pipeline_ref

string

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

data.requirements

object

Returns an empty object when skill dependency requires no subfields.

data.requirements.description

string

Description. Can be omitted if empty or not set.

data.requirements.file_inputs

array

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

data.requirements.file_inputs[].description

string

Description. Can be omitted if empty or not set.

data.requirements.file_inputs[].mime_types

array

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

data.requirements.file_inputs[].name

string

Name. Can be omitted if empty or not set.

data.requirements.file_inputs[].required

boolean

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

data.requirements.knowledge_base_roles

array

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

data.requirements.knowledge_base_roles[].description

string

Description. Can be omitted if empty or not set.

data.requirements.knowledge_base_roles[].required

boolean

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

data.requirements.knowledge_base_roles[].role

string

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

data.requirements.model_capabilities

array

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

data.requirements.skill_refs

array

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

data.requirements.tool_refs

array

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

data.requirements.tool_resource_refs

array

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

data.requirements.tool_resource_refs[].bindability_reason

string

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

data.requirements.tool_resource_refs[].bindable

boolean

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

data.requirements.tool_resource_refs[].binding_source

string

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

data.requirements.tool_resource_refs[].category

string

classification. Can be omitted if empty or not set.

data.requirements.tool_resource_refs[].config

object

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

data.requirements.tool_resource_refs[].description

string

Description. Can be omitted if empty or not set.

data.requirements.tool_resource_refs[].display_name

string

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

data.requirements.tool_resource_refs[].id

string

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

data.requirements.tool_resource_refs[].kind

string

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

data.requirements.tool_resource_refs[].manageable

boolean

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

data.requirements.tool_resource_refs[].name

string

Name. Can be omitted if empty or not set.

data.requirements.tool_resource_refs[].phase

string

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

data.requirements.tool_resource_refs[].resource_id

string

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

data.requirements.tool_resource_refs[].runtime_tool_visibility

string

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

data.requirements.tool_resource_refs[].status

string

status. Can be omitted if empty or not set.

data.requirements.tool_resource_refs[].supported_runtimes

array

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

data.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.routing_summary

object

Returns an empty object when the skill routing summary has no subfields.

data.routing_summary.examples

array

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

data.routing_summary.summary

string

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

data.source_ref

string

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

data.source_type

string

Source type.

data.status

string

status.

data.tags

array

label. Can be omitted if empty or not set.

data.updated_at

string

Last updated time. Use RFC 3339 format.

data.updated_by

string

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

data.version

integer

Version number.

data.workspace_id

string

The identity of the workspace to which it belongs.

Error response

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

Common HTTP errors

HTTP status code

error code

Description

400

2(INVALID_ARGUMENT)

Common causes: The request field, dependency reference, or updated skill definition is invalid. Recommended Action: Check the field value, directive or route summary, and dependent resources.

401

6(UNAUTHENTICATED)

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

403

5(PERMISSION_DENIED)

Common reasons: The current identity does not have the permission to update skills. Recommended Action: Check the workspace authorization.

403

5(PERMISSION_DENIED)

Common reasons: Specify system skills as read-only. Recommended Action: Do not modify system skills. Create or update your skills in the current workspace.

404

3(NOT_FOUND)

Common reasons: The skill does not exist in the specified workspace. Recommended Action: Check the skill ID and skill_workspace_id.

409

9

Common reasons: The skill version has been modified by another request before submission. Recommended action: Re-query the current skills and confirm the changes before submitting.

503

15(UNAVAILABLE)

Common reasons: Skill services or authorization dependencies are temporarily unavailable. Recommended Action: Try again later.

Last updated on