{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ctlsurf-com/json-schema/ctlsurf-com-skill-response-schema.json",
  "title": "SkillResponse",
  "description": "Skill response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ctlsurf-com-skills-api-openapi.yml#/components/schemas/SkillResponse",
  "properties": {
    "name": {
      "type": "string",
      "title": "Name"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "category": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Category"
    },
    "icon": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Icon"
    },
    "scope": {
      "$ref": "#/$defs/SkillScope",
      "default": "personal"
    },
    "definition": {
      "$ref": "#/$defs/SkillDefinition-Output"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "title": "User Id"
    },
    "folder_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Folder Id"
    },
    "org_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Org Id"
    },
    "forked_from_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Forked From Id"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active",
      "default": true
    },
    "is_verified": {
      "type": "boolean",
      "title": "Is Verified",
      "default": false
    },
    "linked_folder_ids": {
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "type": "array",
      "title": "Linked Folder Ids",
      "default": []
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    }
  },
  "type": "object",
  "required": [
    "name",
    "definition",
    "id",
    "user_id",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "SkillDefinition-Output": {
      "properties": {
        "version": {
          "type": "string",
          "title": "Version",
          "default": "1.0"
        },
        "inputs": {
          "items": {
            "$ref": "#/$defs/SkillInput"
          },
          "type": "array",
          "title": "Inputs",
          "default": []
        },
        "workflow": {
          "items": {
            "$ref": "#/$defs/WorkflowStep"
          },
          "type": "array",
          "title": "Workflow",
          "default": []
        },
        "guards": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Guards",
          "default": []
        }
      },
      "type": "object",
      "title": "SkillDefinition",
      "description": "The full skill definition stored as JSONB."
    },
    "SkillInput": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "type": {
          "$ref": "#/$defs/SkillInputType"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "required": {
          "type": "boolean",
          "title": "Required",
          "default": true
        },
        "default": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "title": "Default"
        },
        "options": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Options"
        }
      },
      "type": "object",
      "required": [
        "name",
        "type"
      ],
      "title": "SkillInput",
      "description": "Definition of a skill input variable."
    },
    "SkillInputType": {
      "type": "string",
      "enum": [
        "text",
        "number",
        "boolean",
        "file",
        "select"
      ],
      "title": "SkillInputType",
      "description": "Input types for skill variables."
    },
    "SkillScope": {
      "type": "string",
      "enum": [
        "personal",
        "project",
        "organization",
        "public"
      ],
      "title": "SkillScope",
      "description": "Skill visibility scope."
    },
    "WorkflowStep": {
      "properties": {
        "type": {
          "type": "string",
          "title": "Type",
          "default": "step"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "template": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Template"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        }
      },
      "type": "object",
      "required": [
        "name",
        "title"
      ],
      "title": "WorkflowStep",
      "description": "A step in the skill workflow."
    }
  }
}