skills
Create a new skill (deprecated)
deprecated
Deprecated: Use PUT /skills// instead. Create a new skill by linking a GitHub repository containing a SKILL.md file.
POST
/
skills
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{
"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>"
}Authorizations
Smithery API key as Bearer token
Body
application/json
Was this page helpful?
⌘I
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{
"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>"
}