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

# Scaffold a folder-skill (folder + SKILL.md manifest)

> Creates a folder flagged as a skill and the SKILL.md manifest inside it, with the `name`/`description` frontmatter already in place. Use the returned `folder._id` in `knowledgeSkills` with `type: "folder"`, then add the supporting documents to that folder.



## OpenAPI

````yaml POST /v1/documents/skills/scaffold
openapi: 3.0.0
info:
  title: Devic.ai Public API
  description: >-
    Devic.ai is an AI platform that allows you to create, manage, and use AI
    agents for various tasks.
  version: 1.0.0
  contact:
    name: Devic.ai Support
    url: https://devic.ai
  x-logo:
    url: https://devic.ai/logo.png
    altText: Devic.ai Logo
  x-summary: Public API for interacting with Devic.ai platform
servers:
  - url: https://api.devic.ai
    description: Production server
  - url: https://staging-api.devic.ai
    description: Staging server
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Group agents, assistants, documents and costs into projects
  - name: Documents
    description: >-
      Knowledge base documents: create, version, attach and index markdown
      content for RAG
  - name: Document Folders
    description: Organise knowledge base documents into folders and attach them in bulk
  - name: Files
    description: Upload files and obtain shareable download URLs to attach to messages
  - name: Agents
    description: Endpoints related to AI agents and their operations
  - name: Assistants
    description: Endpoints for interacting with assistants and their specializations
  - name: Tool Servers
    description: Endpoints for managing tool servers and their tool definitions
  - name: Health
    description: API health check endpoints
  - name: Documentation
    description: Endpoints for retrieving markdown documentation
  - name: Integrations
    description: Connect third-party apps and turn them into tools
  - name: Triggers
    description: Start an agent or an assistant from an app event
  - name: Tenant Integrations
    description: Apps that each end user connects for themselves
  - name: Memory
    description: What an assistant remembers between conversations
  - name: Skills
    description: Reusable instruction packs for agents and assistants
  - name: Speech to Text
    description: Audio transcription
  - name: Tenants
    description: Tenants, subtenants and their usage
  - name: MCP Gateway
    description: One MCP endpoint over many servers, with visibility per user
  - name: Tenant Sessions
    description: Tokens that prove which end user is calling
paths:
  /v1/documents/skills/scaffold:
    post:
      tags:
        - Skills
      summary: Scaffold a folder-skill (folder + SKILL.md manifest)
      description: >-
        Creates a folder flagged as a skill and the SKILL.md manifest inside it,
        with the `name`/`description` frontmatter already in place. Use the
        returned `folder._id` in `knowledgeSkills` with `type: "folder"`, then
        add the supporting documents to that folder.
      operationId: scaffoldSkill
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScaffoldSkillDto'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScaffoldSkillResponseDto'
        '401':
          description: Unauthorized - Invalid or missing token
        '429':
          description: Too Many Requests - Rate limit exceeded
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    ScaffoldSkillDto:
      type: object
      properties:
        name:
          type: string
          description: Skill name. Also names the folder.
        description:
          type: string
          description: >-
            One-line description. It is what the model sees before deciding to
            load the skill, so phrase it as a trigger ("How to … when …").
            Newlines are collapsed; truncated to 1024 characters in the catalog.
        projectId:
          type: string
          description: Optional project ID to scope the skill
        parentFolderId:
          type: string
          description: Optional parent folder ID
        tags:
          description: Category tags
          type: array
          items:
            type: string
      required:
        - name
    ScaffoldSkillResponseDto:
      type: object
      properties:
        folder:
          type: object
          description: >-
            The created folder, flagged as a skill. Its `_id` is what goes into
            `knowledgeSkills` with `type: "folder"`.
        skillDoc:
          description: The generated SKILL.md manifest document inside the folder
          allOf:
            - $ref: '#/components/schemas/DocumentResponseDto'
      required:
        - folder
        - skillDoc
    DocumentResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: Document ID
        clientUID:
          type: string
          description: Client UID
        projectId:
          type: string
          description: Project ID
        name:
          type: string
          description: Document name
        fileName:
          type: string
          description: File name (with extension)
        fileType:
          type: string
          enum:
            - md
            - pdf
            - txt
            - docx
          description: File type
        mimeType:
          type: string
          description: MIME type
        size:
          type: number
          description: File size in bytes
        status:
          type: string
          description: Status
          enum:
            - pending
            - ready
            - failed
        markdownContent:
          type: string
          description: Markdown content (for md docs)
        summary:
          type: string
          description: Auto-generated summary
        tokenCount:
          type: number
          description: Token count
        currentVersion:
          type: number
          description: Current version number
        folderId:
          type: string
          description: Folder ID
        parentDocumentId:
          type: string
          description: Parent document ID
        createdByUserUID:
          type: string
          description: Created by user UID
        creationTimestampMs:
          type: number
          description: Creation timestamp (ms)
        lastEditTimestampMs:
          type: number
          description: Last edit timestamp (ms)
        versionCreated:
          type: boolean
          description: >-
            Only present on update responses. True when the update changed the
            content and created a new version; false when the update was a no-op
            or only touched metadata.
        isSkill:
          type: boolean
          description: True when the document is a skill
        tags:
          description: Category tags
          type: array
          items:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use JWT token for authentication

````