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

# Create Skill

> Create a new skill and optionally add it to the specified agent.
Only agents can create skills via MCP; the new skill is created in the tenant and
automatically added to the agent's skills list so the agent can use it.



## OpenAPI

````yaml post /api/mcp/create_skill
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/mcp/create_skill:
    post:
      tags:
        - MCP
      summary: Create Skill
      description: >-
        Create a new skill and optionally add it to the specified agent.

        Only agents can create skills via MCP; the new skill is created in the
        tenant and

        automatically added to the agent's skills list so the agent can use it.
      operationId: mcp_create_skill
      parameters:
        - name: genai_app
          in: query
          required: true
          schema:
            type: string
            description: The name of the GenAI app (agent).
            title: Genai App
          description: The name of the GenAI app (agent).
        - name: app_type
          in: query
          required: false
          schema:
            type: string
            description: The type of the app; must be 'agent'.
            default: agent
            title: App Type
          description: The type of the app; must be 'agent'.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SkillCreate'
              description: Skill definition (name, description, content, etc.).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPSkillResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    SkillCreate:
      properties:
        name:
          type: string
          title: Name
          description: Name of the skill
        description:
          type: string
          title: Description
          description: Description of the skill
        content:
          type: string
          title: Content
          description: Full SKILL.md content
        license:
          type: string
          title: License
          description: Optional license field
          default: ''
        compatibility:
          type: string
          title: Compatibility
          description: Optional compatibility field
          default: ''
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Optional metadata dict
          default: {}
        allowed_tools:
          type: string
          title: Allowed Tools
          description: Optional allowed-tools field
          default: ''
        status:
          type: string
          title: Status
          description: 'Status of the skill: active or disabled'
          default: active
        scripts:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Scripts
          description: 'Optional scripts/ files: path -> content (per Agent Skills spec)'
        references:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: References
          description: 'Optional references/ files: path -> content (per Agent Skills spec)'
        assets:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Assets
          description: 'Optional assets/ files: path -> content (per Agent Skills spec)'
      type: object
      required:
        - name
        - description
        - content
      title: SkillCreate
    MCPSkillResponse:
      properties:
        skill:
          $ref: '#/components/schemas/Skill'
          description: The skill data
      type: object
      required:
        - skill
      title: MCPSkillResponse
      description: Response model for a single skill
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Skill:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the skill
        name:
          type: string
          title: Name
          description: Name of the skill
        description:
          type: string
          title: Description
          description: Description of the skill
        content:
          type: string
          title: Content
          description: Full SKILL.md content
        license:
          type: string
          title: License
          description: License field
          default: ''
        compatibility:
          type: string
          title: Compatibility
          description: Compatibility field
          default: ''
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Metadata dict
          default: {}
        allowed_tools:
          type: string
          title: Allowed Tools
          description: Allowed-tools field
          default: ''
        status:
          type: string
          title: Status
          description: 'Status of the skill: active or disabled'
          default: active
        scripts:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Scripts
          description: Optional scripts/ files (path -> content)
        references:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: References
          description: Optional references/ files (path -> content)
        assets:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Assets
          description: Optional assets/ files (path -> content)
        created_by:
          type: string
          title: Created By
          description: User who created the skill
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the skill was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The date and time when the skill was last updated.
      type: object
      required:
        - id
        - name
        - description
        - content
        - created_by
        - created_at
        - updated_at
      title: Skill
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````