Read a plugin skill file

Read the selected plugin skill’s entry file or a file within its package.

GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/plugin-discovery/skill

Before you call this API

Prepare the target Workspace ID and a personal access token that can access the resources and perform this operation. Use the actual resource identifier for workspace_id in the path, and also supply the Workspace ID in X-Workspace-ID. See Shared objects and inputs for environment variable sources.

Query parameters

curl -X GET "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/plugin-discovery/skill" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --get \
  --data-urlencode "ref=$CAPABILITY_REF"

Only skill capabilities can be read. Paths must remain within the skill root and cannot use ../. Content returns as a JSON string, not a download URL. Reading an instruction file does not execute its commands.

Fields

Type

Required

Description

ref

string

Yes

Skill capability_ref returned by search.

path

string

No

Package path relative to the skill root. Omit to read the skill entry file.

Successful response

{
  "code": 0,
  "data": {
    "content": "# 示例技能\n"
  }
}

Field

Type

Description

code

integer

0 on success.

data

object

Data returned by this operation.

data.content

string

Text of the selected skill file.

Error response

Handle numeric business-error code, message, and details.reason separately from authorization-layer string codes. See Errors and states. On a state or version conflict, read the current resource first; do not automatically change identifiers or retry writes.

Last updated on