{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/varg-ai/json-schema/varg-ai-skill-publish-input-schema.json",
  "title": "SkillPublishInput",
  "description": "A card. Create needs a name and a summary (or `data` carrying them); an update sends only what changes.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/varg-ai-openapi.json#/components/schemas/SkillPublishInput",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "skill",
        "component",
        "how_to",
        "video_type",
        "prompt",
        "style",
        "technique"
      ],
      "default": "skill"
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9._-]{0,159}$",
      "description": "Defaults to the name in kebab-case."
    },
    "name": {
      "type": "string",
      "maxLength": 200
    },
    "summary": {
      "type": "string",
      "maxLength": 600
    },
    "description": {
      "type": "string",
      "maxLength": 20000,
      "description": "Markdown. For a how_to, the page body."
    },
    "category": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "use_when": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "install": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      ]
    },
    "agents": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "media_url": {
      "type": "string",
      "format": "uri",
      "description": "The preview, linked as is (see mirror_media)."
    },
    "mirror_media": {
      "type": "boolean",
      "description": "Copy an outside media_url to s3.varg.ai. Only for media you own or may copy; third-party media stays linked."
    },
    "publisher": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "handle": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "avatar": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "verified": {
          "type": "boolean"
        }
      }
    },
    "publisher_name": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "live",
        "beta",
        "draft",
        "wanted"
      ]
    },
    "path": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "additionalProperties": true,
      "description": "The whole card as the site renders it; merged over the card built from the fields above and over the existing card."
    },
    "queries": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "type": "string"
      },
      "description": "\"how to …\" phrases; written by the API when missing"
    },
    "topics": {
      "type": "array",
      "maxItems": 4,
      "items": {
        "type": "string"
      },
      "description": "Topic ids, most specific first (GET /v2/skills/format → topics); written by the API when missing"
    },
    "prior": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "note": {
      "type": "string",
      "maxLength": 500,
      "description": "The revision message."
    },
    "via": {
      "type": "string",
      "enum": [
        "mcp",
        "web",
        "api",
        "routine"
      ]
    },
    "dry_run": {
      "type": "boolean"
    }
  }
}