{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://ssrjkk.github.io/agent-skills/skills_catalog.schema.json",
  "title": "Agent Skills Catalog",
  "description": "Schema for skills_catalog.json — the universal Agent Skills library catalog.",
  "type": "object",
  "required": ["metadata", "skills"],
  "additionalProperties": false,
  "properties": {
    "metadata": {
      "type": "object",
      "required": ["schema_version", "generated_at", "total_skills", "total_ru", "domains", "bilingual"],
      "additionalProperties": false,
      "properties": {
        "schema_version": { "type": "string", "description": "Catalog schema version" },
        "generated_at": { "type": "string", "format": "date-time", "description": "ISO-8601 generation timestamp" },
        "total_skills": { "type": "integer", "minimum": 0 },
        "total_ru": { "type": "integer", "minimum": 0 },
        "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
        "bilingual": { "type": "boolean" }
      }
    },
    "skills": {
      "type": "array",
      "items": { "$ref": "#/$defs/skill" }
    }
  },
  "$defs": {
    "skill": {
      "type": "object",
      "required": ["name", "description", "category", "tags", "models", "version", "path", "languages", "has_ru"],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"
        },
        "description": { "type": "string", "maxLength": 1024 },
        "category": { "type": "string" },
        "tags": { "type": "array", "items": { "type": "string" } },
        "models": { "type": "array", "items": { "type": "string" } },
        "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
        "path": { "type": "string" },
        "languages": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
        "has_ru": { "type": "boolean" },
        "created": { "type": "string" },
        "updated": { "type": "string" }
      }
    }
  }
}
