{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tale-dev/json-schema/tale-dev-skill-schema.json",
  "title": "Skill",
  "description": "The skill bundle: its summary fields plus the markdown body and the bundle’s file list",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tale-dev-skills-api-openapi.yml#/components/schemas/Skill",
  "type": "object",
  "required": [
    "slug",
    "description",
    "visibility",
    "origin",
    "canEdit",
    "etag",
    "updatedAt",
    "body",
    "files"
  ],
  "properties": {
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "maxLength": 64
    },
    "description": {
      "type": "string"
    },
    "visibility": {
      "type": "string",
      "enum": [
        "private",
        "team",
        "org"
      ],
      "description": "`org` — every member; `team` — members of `teams`; `private` — retired for new skills, still carried by pre-existing bundles their owner alone sees"
    },
    "teams": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Team ids a `team` skill is shared with; absent otherwise"
    },
    "owner": {
      "type": "string",
      "description": "The member who created the bundle, as a user id — absent when none is recorded. A skill created in the editor or uploaded belongs to the member who created it; a declared `owner` in an uploaded bundle is never honoured"
    },
    "origin": {
      "type": "string",
      "enum": [
        "builtin",
        "release",
        "member"
      ],
      "description": "Where the skill came from: `release` — a managed configuration release installed it (its frontmatter carries `metadata.tale-release`); `builtin` — no owner is recorded, as on the catalog copies an organization starts with; `member` — the member named by `owner` created it"
    },
    "ownerName": {
      "type": "string",
      "description": "The display name of `owner` (their email when they have none) while they are a member of the organization; absent once they have left, and whenever `owner` is"
    },
    "updatedBy": {
      "type": "string",
      "description": "The user id of the member whose write through Tale produced the stored SKILL.md — present only when the newest recorded write of the skill is an edit whose resulting tag is the current `etag`. Absent on a skill nobody has edited since it was created, and on one changed outside Tale since its last edit"
    },
    "updatedByName": {
      "type": "string",
      "description": "The display name of `updatedBy` while they are a member of the organization"
    },
    "icon": {
      "type": "string",
      "description": "An Iconify id shown on the skill’s card"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Display chips on the skill’s card"
    },
    "disableModelInvocation": {
      "type": "boolean",
      "description": "True when the model must not reach for the skill on its own; it stays available by explicit name"
    },
    "canEdit": {
      "type": "boolean",
      "description": "Whether this key may edit the bundle; shipped skills are organization bundles an administrator may overwrite"
    },
    "etag": {
      "type": "string",
      "description": "The strong entity tag of the bundle’s SKILL.md — the quoted SHA-256 of its content, the `ETag` the GET carries and the value a conditional save sends back as `If-Match`. Moves with every save of the document; the bundle’s other files never move it"
    },
    "updatedAt": {
      "type": "integer",
      "minimum": 0,
      "description": "When SKILL.md was last written"
    },
    "body": {
      "type": "string",
      "description": "The SKILL.md markdown after the frontmatter, as stored — always newline-terminated"
    },
    "files": {
      "type": "array",
      "description": "Every file of the bundle (SKILL.md included), sorted by path",
      "items": {
        "type": "object",
        "required": [
          "path",
          "size"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Bundle-relative POSIX path"
          },
          "size": {
            "type": "integer",
            "description": "Bytes"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}