Upload a new skill
curl --request POST \
--url https://api.example.com/api/registry/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form scope=personal \
--form version=0.1.0 \
--form changelog=import requests
url = "https://api.example.com/api/registry/skills"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"scope": "personal",
"version": "0.1.0",
"changelog": ""
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('scope', 'personal');
form.append('version', '0.1.0');
form.append('changelog', '');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.example.com/api/registry/skills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/registry/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/registry/skills"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/registry/skills")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/registry/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"valid": true,
"errors": [
"<string>"
],
"frontmatter": {
"name": "<string>",
"description": "<string>",
"license": "<string>",
"compatibility": "<string>",
"metadata": {},
"allowed_tools": "<string>"
},
"manifest": [
{
"path": "<string>",
"size": 123,
"sha256": "<string>",
"role": "skill_md"
}
],
"scan": {
"scanned_files": 0,
"findings": [
{
"rule": "network",
"severity": "info",
"path": "<string>",
"line": 123,
"message": "<string>",
"excerpt": ""
}
],
"summary": ""
},
"size_bytes": 0,
"artifact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "agent",
"scope": "personal",
"name": "<string>",
"display_name": "<string>",
"description": "<string>",
"owner_id": "<string>",
"is_system": true,
"updated_at": "2023-11-07T05:31:56Z",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"status": "draft",
"spec": {},
"changelog": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"reviewed_by": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"review_reason": "<string>",
"deprecated_at": "2023-11-07T05:31:56Z",
"withdrawn_at": "2023-11-07T05:31:56Z",
"withdrawn_reason": "<string>",
"promoted_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"used_in_templates": 0
}
],
"parent_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promoted_from_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_version": "<string>",
"latest_status": "draft",
"latest_approved_version": "<string>",
"has_draft": false,
"used_in_templates": 0,
"used_in_agents": 123,
"write": true,
"needs_sign_off": true,
"sensitivity": "<string>",
"health": "ok",
"can_use": true
}
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Registry
Upload a new skill
Create a skill and its first draft from a bundle. An invalid bundle is a 422 carrying the same report as /skills/validate. Send a zip, the files of a skill folder (each named with its path relative to the folder, e.g. underwriting-rules/scripts/fetch_rates.py), or a single SKILL.md. Scripts are stored and scanned, never run.
POST
/
api
/
registry
/
skills
Upload a new skill
curl --request POST \
--url https://api.example.com/api/registry/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form scope=personal \
--form version=0.1.0 \
--form changelog=import requests
url = "https://api.example.com/api/registry/skills"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"scope": "personal",
"version": "0.1.0",
"changelog": ""
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('scope', 'personal');
form.append('version', '0.1.0');
form.append('changelog', '');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.example.com/api/registry/skills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/registry/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/registry/skills"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/registry/skills")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/registry/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"scope\"\r\n\r\npersonal\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n0.1.0\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"changelog\"\r\n\r\n\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"valid": true,
"errors": [
"<string>"
],
"frontmatter": {
"name": "<string>",
"description": "<string>",
"license": "<string>",
"compatibility": "<string>",
"metadata": {},
"allowed_tools": "<string>"
},
"manifest": [
{
"path": "<string>",
"size": 123,
"sha256": "<string>",
"role": "skill_md"
}
],
"scan": {
"scanned_files": 0,
"findings": [
{
"rule": "network",
"severity": "info",
"path": "<string>",
"line": 123,
"message": "<string>",
"excerpt": ""
}
],
"summary": ""
},
"size_bytes": 0,
"artifact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "agent",
"scope": "personal",
"name": "<string>",
"display_name": "<string>",
"description": "<string>",
"owner_id": "<string>",
"is_system": true,
"updated_at": "2023-11-07T05:31:56Z",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"status": "draft",
"spec": {},
"changelog": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"reviewed_by": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"review_reason": "<string>",
"deprecated_at": "2023-11-07T05:31:56Z",
"withdrawn_at": "2023-11-07T05:31:56Z",
"withdrawn_reason": "<string>",
"promoted_from_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"used_in_templates": 0
}
],
"parent_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promoted_from_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_version": "<string>",
"latest_status": "draft",
"latest_approved_version": "<string>",
"has_draft": false,
"used_in_templates": 0,
"used_in_agents": 123,
"write": true,
"needs_sign_off": true,
"sensitivity": "<string>",
"health": "ok",
"can_use": true
}
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Authorizations
OAuth2AuthorizationCodeBearerAPIKeyHeader
The access token received from the authorization server in the OAuth 2.0 flow.
Body
multipart/form-data
Response
Successful Response
What an uploaded skill bundle turned out to be.
SKILL.md frontmatter, per the agentskills.io specification.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Static scan of a skill's bundled files. It informs review only.
Show child attributes
Show child attributes
An artifact with all its versions.
Show child attributes
Show child attributes
Was this page helpful?

