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

# Import skill from file

> Import a skill from a .zip or .skill file upload. Both extensions are accepted; the file content must be a valid ZIP archive (a .skill file is a renamed .zip).



## OpenAPI

````yaml /swagger.json post /skill
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /skill:
    post:
      tags:
        - skill
      summary: Import skill from file
      description: >-
        Import a skill from a .zip or .skill file upload. Both extensions are
        accepted; the file content must be a valid ZIP archive (a .skill file is
        a renamed .zip).
      requestBody:
        content:
          multipart/form-data:
            schema:
              allOf:
                - type: object
                  properties:
                    file:
                      nullable: true
                      description: >-
                        Skill file (.zip or .skill); content must be a valid ZIP
                        archive (a .skill file is a renamed .zip)
                - type: object
                  properties:
                    scopeType:
                      type: string
                      enum:
                        - base
                        - space
                        - system
                        - user
                        - User
                        - app
                        - App
                        - cuppyclaw
                        - Cuppyclaw
                        - routine
                        - Routine
                      description: Ownership scope
                    scopeId:
                      type: string
                      description: >-
                        Scope entity ID (required for
                        base/space/app/cuppyclaw/routine)
                  required:
                    - scopeType
      responses:
        '200':
          description: Imported skill
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique skill identifier
                  slug:
                    type: string
                    description: URL-safe skill slug
                  name:
                    type: string
                    description: Display name of the skill
                  description:
                    type: string
                    nullable: true
                    description: Short description of what the skill does
                  icon:
                    type: string
                    nullable: true
                    description: Icon identifier or emoji
                  skillMd:
                    type: string
                    description: SKILL.md content defining the skill
                  sourceMeta:
                    nullable: true
                    description: Source metadata (github/zip/manual)
                  contentHash:
                    type: string
                    nullable: true
                    description: SHA-256 content hash for change detection
                  scopeType:
                    type: string
                    enum:
                      - base
                      - space
                      - system
                      - user
                      - User
                      - app
                      - App
                      - cuppyclaw
                      - Cuppyclaw
                      - routine
                      - Routine
                    description: >-
                      Ownership scope: base (project), space, system, user, app,
                      cuppyclaw or routine
                  isEnabled:
                    type: boolean
                    description: Whether the skill is enabled / available to the agent
                  createdTime:
                    type: string
                    description: ISO 8601 creation timestamp
                  createdBy:
                    type: string
                    description: User ID of the creator
                required:
                  - id
                  - slug
                  - name
                  - skillMd
                  - scopeType
                  - isEnabled
                  - createdTime
                  - createdBy
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/skill \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form file=null \
              --form scopeType=base \
              --form scopeId=string
        - lang: JavaScript
          source: >-
            const url = 'https://app.teable.ai/api/skill';

            const form = new FormData();

            form.append('file', 'null');

            form.append('scopeType', 'base');

            form.append('scopeId', 'string');


            const options = {method: 'POST', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            options.body = form;


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: >-
            const http = require('https');


            const options = {
              method: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/skill',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };


            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });


            req.write('-----011000010111000001101001\r\nContent-Disposition:
            form-data;
            name="file"\r\n\r\nnull\r\n-----011000010111000001101001\r\nContent-Disposition:
            form-data;
            name="scopeType"\r\n\r\nbase\r\n-----011000010111000001101001\r\nContent-Disposition:
            form-data;
            name="scopeId"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n');

            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload = "-----011000010111000001101001\r\nContent-Disposition:
            form-data;
            name=\"file\"\r\n\r\nnull\r\n-----011000010111000001101001\r\nContent-Disposition:
            form-data;
            name=\"scopeType\"\r\n\r\nbase\r\n-----011000010111000001101001\r\nContent-Disposition:
            form-data;
            name=\"scopeId\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n"


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("POST", "/api/skill", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````