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

# Create a skill

> Create a custom skill. At least one of `instructions_md` or `webhook_url` is required. Name must be lowercase letters, digits, or underscores.



## OpenAPI

````yaml POST /v1/config/skills
openapi: 3.1.0
info:
  title: Kairn API
  version: 1.0.0
  description: >-
    The Kairn API. All requests require an `X-API-Key` header with your tenant
    API key.
servers:
  - url: https://api.kairn.sh
    description: Production
security:
  - ApiKey: []
tags:
  - name: Agent
    description: Invoke agents and stream responses.
  - name: Memory
    description: Read and write per-user agent memory.
  - name: Souls
    description: Manage agent identities.
  - name: Skills
    description: Manage custom skills (instructions and webhook tools).
  - name: Mandates
    description: Schedule autonomous agent tasks.
  - name: Invocations
    description: Inspect past agent runs.
  - name: Sessions
    description: Access multi-turn conversation history.
  - name: Audit
    description: Audit log for all agent activity.
paths:
  /v1/config/skills:
    post:
      tags:
        - Skills
      summary: Create a skill
      description: >-
        Create a custom skill. At least one of `instructions_md` or
        `webhook_url` is required. Name must be lowercase letters, digits, or
        underscores.
      operationId: skills-create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - label
              properties:
                name:
                  type: string
                  pattern: ^[a-z0-9_]+$
                  example: my_skill
                label:
                  type: string
                  example: My Skill
                instructions_md:
                  type: string
                  default: ''
                description_md:
                  type: string
                  default: ''
                webhook_url:
                  type: string
                  format: uri
                  nullable: true
                http_method:
                  type: string
                  enum:
                    - GET
                    - POST
                    - PUT
                    - PATCH
                    - DELETE
                  default: POST
                parameters:
                  type: object
                  additionalProperties: true
                  default: {}
                headers:
                  type: object
                  additionalProperties:
                    type: string
                  default: {}
      responses:
        '200':
          description: Skill created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Skill'
        '400':
          description: Validation error (e.g. missing instructions_md and webhook_url).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Skill name already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Skill:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          description: Lowercase letters, digits, underscores. Used in soul allowed_skills.
        label:
          type: string
        instructions_md:
          type: string
          nullable: true
          description: Behavioral guide injected into the system prompt.
        description_md:
          type: string
          nullable: true
          description: Tool description when webhook_url is set.
        webhook_url:
          type: string
          nullable: true
          description: When set, the skill is a callable webhook tool.
        http_method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
          default: POST
        parameters:
          type: object
          additionalProperties: true
          default: {}
        headers:
          type: object
          additionalProperties:
            type: string
          default: {}
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
        error_type:
          type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.