docs-api-reference-skills-create-a-new-skill-deprecated.md
POST
/
skills
Try it
JavaScript
JavaScript
import Smithery from '@smithery/api';
const client = new Smithery({
apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});
const skill = await client.skills.create({
gitUrl: 'https://example.com',
namespace: 'x',
slug: 'slug',
});
console.log(skill.id);
curl --request POST \
--url https://api.smithery.ai/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"namespace": "<string>",
"slug": "<string>",
"gitUrl": "<string>"
}
'
import requests
url = "https://api.smithery.ai/skills"
payload = {
"namespace": "<string>",
"slug": "<string>",
"gitUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smithery.ai/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 => json_encode([
'namespace' => '<string>',
'slug' => '<string>',
'gitUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.smithery.ai/skills"
payload := strings.NewReader("{\n \"namespace\": \"<string>\",\n \"slug\": \"<string>\",\n \"gitUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.smithery.ai/skills")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"namespace\": \"<string>\",\n \"slug\": \"<string>\",\n \"gitUrl\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.smithery.ai/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"namespace\": \"<string>\",\n \"slug\": \"<string>\",\n \"gitUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body
200
400
403
404
409
{
"id": "<string>",
"namespace": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"gitUrl": "<string>",
"listed": true,
"createdAt": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
[
](#authorization-authorization)
Authorization
string
header
required
Smithery API key as Bearer token
application/json
[
](#body-namespace)
namespace
string
required
The namespace to create the skill in.
Minimum string length: 1
[
](#body-slug)
slug
string
required
URL-friendly identifier for the skill.
Minimum string length: 1
Pattern: ^[a-z0-9-]+$
[
](#body-git-url)
gitUrl
string<uri>
required
GitHub URL pointing to a repository with SKILL.md
200
application/json
Skill created successfully
[
](#response-id)
id
string
required
[
](#response-namespace)
namespace
string
required
[
](#response-slug)
slug
string
required
[
](#response-display-name)
displayName
string
required
[
](#response-description)
description
string
required
[
](#response-git-url)
gitUrl
string
required
[
](#response-listed)
listed
boolean
required
[
](#response-created-at)
createdAt
string
required
Was this page helpful?
YesNo
⌘I
JavaScript
JavaScript
import Smithery from '@smithery/api';
const client = new Smithery({
apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});
const skill = await client.skills.create({
gitUrl: 'https://example.com',
namespace: 'x',
slug: 'slug',
});
console.log(skill.id);
curl --request POST \
--url https://api.smithery.ai/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"namespace": "<string>",
"slug": "<string>",
"gitUrl": "<string>"
}
'
import requests
url = "https://api.smithery.ai/skills"
payload = {
"namespace": "<string>",
"slug": "<string>",
"gitUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smithery.ai/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 => json_encode([
'namespace' => '<string>',
'slug' => '<string>',
'gitUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.smithery.ai/skills"
payload := strings.NewReader("{\n \"namespace\": \"<string>\",\n \"slug\": \"<string>\",\n \"gitUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.smithery.ai/skills")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"namespace\": \"<string>\",\n \"slug\": \"<string>\",\n \"gitUrl\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.smithery.ai/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"namespace\": \"<string>\",\n \"slug\": \"<string>\",\n \"gitUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body
200
400
403
404
409
{
"id": "<string>",
"namespace": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"gitUrl": "<string>",
"listed": true,
"createdAt": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}
{
"error": "<string>",
"code": "<string>"
}