Create a skill
Create a skill from an uploaded zip package. The request body contains only file_id; name and description are parsed by the server from SKILL.md. The new skill enters checking and becomes active after passing the scan.
Prerequisites
Endpoint and authentication are configured. See Overview and authentication. Before creating a skill, upload the zip package via File to obtain a file_id. The zip's root directory must contain SKILL.md declaring the skill's name and description.
Endpoint
POST /skills
The request body contains only file_id; the corresponding file must be a .zip that has passed review. name and description are parsed by the server from SKILL.md inside the zip.
Request example
curl -X POST "$AGENTSTUDIO_URL/skills" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id": "file_xxx"}'
skill = client.skills.create(file_id="file_xxx")
print(skill.id)
Skill skill = client.skills().create(SkillCreateParam.builder()
.fileId("file_xxx").build());
System.out.println(skill.getId());
Response fieldsid Skill ID, format: type Fixed value name / description Parsed from source Source: status Scan status: latest_version Latest version number. When mounting to an agent, do not lock to created_at / updated_at Creation / last update time, ISO 8601 request_id Unique identifier for this request | Response example |
Scan status
A newly created skill or a newly uploaded version enters checking. It must reach active after passing the scan before it can be mounted to an agent. If a security risk is detected the status becomes rejected and the version cannot be mounted; query the version for the concrete error reason. After deletion the status is deleted.