> ## Documentation Index
> Fetch the complete documentation index at: https://smithery.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or update a skill

> Idempotent endpoint to create or update a GitHub-backed skill. Send application/json with `gitUrl`.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/smithery/openapi.documented.yml put /skills/{namespace}/{slug}
openapi: 3.1.0
info:
  title: Smithery Platform API
  description: >-
    API for the Smithery platform — discover, deploy, and manage MCP (Model
    Context Protocol) servers. Provides endpoints for browsing the server
    registry, managing deployments, creating scoped access tokens, and
    connecting to MCP servers.
  version: 1.0.0
servers:
  - url: https://api.smithery.ai
security:
  - bearerAuth: []
tags:
  - name: servers
    description: >-
      Browse the MCP server registry, manage server configuration, and handle
      deployments
  - name: skills
    description: Discover and search reusable prompt-based skills for MCP servers
  - name: tools
    description: Search for MCP tools across all registered servers
paths:
  /skills/{namespace}/{slug}:
    put:
      tags:
        - skills
      summary: Create or update a skill
      description: >-
        Idempotent endpoint to create or update a GitHub-backed skill. Send
        application/json with `gitUrl`.
      operationId: putSkills:namespace:slug
      parameters:
        - schema:
            type: string
          in: path
          name: namespace
          required: true
        - schema:
            type: string
          in: path
          name: slug
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              vendor: zod
      responses:
        '200':
          description: Skill updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  namespace:
                    type: string
                  slug:
                    type: string
                  displayName:
                    type: string
                  description:
                    type: string
                  gitUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                  externalStars:
                    type: number
                  listed:
                    type: boolean
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                required:
                  - id
                  - namespace
                  - slug
                  - displayName
                  - description
                  - gitUrl
                  - externalStars
                  - listed
                  - createdAt
                  - updatedAt
                id: PutSkillResponse
        '201':
          description: Skill created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  namespace:
                    type: string
                  slug:
                    type: string
                  displayName:
                    type: string
                  description:
                    type: string
                  gitUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                  externalStars:
                    type: number
                  listed:
                    type: boolean
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                required:
                  - id
                  - namespace
                  - slug
                  - displayName
                  - description
                  - gitUrl
                  - externalStars
                  - listed
                  - createdAt
                  - updatedAt
                id: PutSkillResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                id: CreateSkillError
        '403':
          description: Forbidden - user does not own the namespace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                id: CreateSkillError
        '404':
          description: Namespace not found or SKILL.md not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                id: CreateSkillError
        '409':
          description: Git URL already claimed by another skill
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                id: CreateSkillError
        '422':
          description: SKILL.md validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - error
                id: CreateSkillError
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Smithery from '@smithery/api';

            const client = new Smithery({
              apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.skills.set('slug', {
              namespace: 'namespace',
              body: {},
            });

            console.log(response.id);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Smithery API key as Bearer token

````