{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/webrix/main/json-schema/webrix-skill-schema.json",
  "title": "Skill",
  "x-generated": "2026-10-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/webrix-api-openapi.json#/components/schemas/Skill",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "content": {
      "type": "string",
      "description": "Skill content in Markdown format"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "draft"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      },
      "description": "Key-value metadata"
    },
    "allowed_tools": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "List of allowed tool names"
    },
    "scripts": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SkillScript"
          }
        }
      }
    },
    "references": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SkillReference"
          }
        }
      }
    },
    "assets": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SkillAsset"
          }
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Creation timestamp."
    },
    "identity_hash": {
      "type": "string",
      "description": "Content hash used to match this skill against discovered copies."
    },
    "is_org": {
      "type": "boolean",
      "description": "True when this is an organization-level record rather than user-owned."
    },
    "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Organization this record belongs to."
    },
    "owner_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "User who owns this record. Null for organization-level records."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last modification timestamp."
    }
  },
  "$defs": {
    "SkillAsset": {
      "type": "object",
      "required": [
        "path"
      ],
      "properties": {
        "path": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "SkillReference": {
      "type": "object",
      "required": [
        "path",
        "content"
      ],
      "properties": {
        "path": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "SkillScript": {
      "type": "object",
      "required": [
        "path",
        "language",
        "content"
      ],
      "properties": {
        "path": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    }
  }
}