{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record containing an agent skill published over ATProto. Follows the Agent Skills open standard (agentskills.io).",
      "key": "tid",
      "record": {
        "properties": {
          "compatibility": {
            "description": "Environment requirements (e.g. 'Requires Python 3.8+').",
            "maxGraphemes": 500,
            "maxLength": 2000,
            "type": "string"
          },
          "createdAt": {
            "description": "Client-declared creation timestamp.",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "What this skill does and when to use it. Agents use this for automatic activation matching.",
            "maxGraphemes": 1024,
            "maxLength": 10000,
            "type": "string"
          },
          "facets": {
            "description": "Rich text annotations in the description.",
            "items": {
              "ref": "lex:app.bsky.richtext.facet",
              "type": "ref"
            },
            "type": "array"
          },
          "labels": {
            "description": "Self-label values. Content warnings.",
            "refs": [
              "lex:com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "langs": {
            "description": "Human languages of the skill content.",
            "items": {
              "format": "language",
              "type": "string"
            },
            "maxLength": 3,
            "type": "array"
          },
          "license": {
            "description": "SPDX license identifier (e.g. MIT, CC-BY-4.0).",
            "maxGraphemes": 64,
            "maxLength": 256,
            "type": "string"
          },
          "name": {
            "description": "Skill name. Becomes the /slash-command. Lowercase letters, numbers, hyphens only. No leading hyphen, no consecutive hyphens.",
            "maxGraphemes": 64,
            "maxLength": 256,
            "type": "string"
          },
          "recap": {
            "description": "Reference to the skill this was derived/forked from.",
            "ref": "lex:org.v-it.skill#recapRef",
            "type": "ref"
          },
          "resources": {
            "description": "Supporting files bundled with the skill (templates, scripts, reference docs). Stored as blobs.",
            "items": {
              "ref": "lex:org.v-it.skill#resource",
              "type": "ref"
            },
            "maxLength": 16,
            "type": "array"
          },
          "tags": {
            "description": "Discovery tags for categorization and search.",
            "items": {
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "maxLength": 8,
            "type": "array"
          },
          "text": {
            "description": "The complete SKILL.md file content — frontmatter and body, verbatim. This is the source of truth. On learn, this is written directly as SKILL.md with no reconstruction. The other fields (name, description, version, license, compatibility) are copies extracted for discovery and indexing.",
            "maxGraphemes": 15000,
            "maxLength": 50000,
            "type": "string"
          },
          "version": {
            "description": "Semantic version string (e.g. 1.0.0). Author-declared.",
            "maxGraphemes": 32,
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "text",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "recapRef": {
      "description": "Reference to a parent skill this was derived from.",
      "properties": {
        "cid": {
          "description": "CID of the parent skill record for content-addressable integrity.",
          "type": "string"
        },
        "uri": {
          "description": "AT URI of the parent skill record.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid"
      ],
      "type": "object"
    },
    "resource": {
      "description": "A supporting file bundled with the skill. Binary content stored as blob.",
      "properties": {
        "blob": {
          "accept": [
            "*/*"
          ],
          "description": "File content. Uploaded via com.atproto.repo.uploadBlob.",
          "maxSize": 1000000,
          "type": "blob"
        },
        "description": {
          "description": "What this resource contains. Helps agents with progressive disclosure.",
          "maxGraphemes": 256,
          "maxLength": 1000,
          "type": "string"
        },
        "mimeType": {
          "description": "MIME type hint (e.g. 'text/markdown', 'application/x-shellscript').",
          "maxLength": 128,
          "type": "string"
        },
        "path": {
          "description": "Relative file path within the skill directory (e.g. 'scripts/validate.sh', 'reference.md').",
          "maxGraphemes": 128,
          "maxLength": 512,
          "type": "string"
        }
      },
      "required": [
        "path",
        "blob"
      ],
      "type": "object"
    }
  },
  "id": "org.v-it.skill",
  "lexicon": 1
}
