{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://lenserfight.dev/schemas/skill/v1alpha1",
  "title": "LenserFight Skill Spec",
  "description": "A reusable method or playbook that a lenser follows when a given context is triggered.",
  "type": "object",
  "allOf": [{ "$ref": "common.schema.json#/$defs/baseSpec" }],
  "properties": {
    "apiVersion": { "$ref": "common.schema.json#/$defs/apiVersion" },
    "kind": { "type": "string", "const": "skill" },
    "schema_version": { "type": "integer", "minimum": 1 },
    "id": { "$ref": "common.schema.json#/$defs/specId" },
    "slug": { "$ref": "common.schema.json#/$defs/slug" },
    "name": { "type": "string", "minLength": 1, "maxLength": 200 },
    "description": { "type": "string", "minLength": 1, "maxLength": 2000 },
    "version": { "$ref": "common.schema.json#/$defs/semver" },
    "visibility": { "$ref": "common.schema.json#/$defs/visibility" },
    "status": { "$ref": "common.schema.json#/$defs/status" },
    "owner": { "$ref": "common.schema.json#/$defs/owner" },
    "tags": { "$ref": "common.schema.json#/$defs/tags" },
    "activation": {
      "type": "object",
      "properties": {
        "keywords": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Activation keywords that trigger this skill."
        },
        "requires_tools": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Tool IDs that must be available for activation."
        }
      },
      "additionalProperties": true
    },
    "compatibility": {
      "type": "object",
      "description": "Lenser or model compatibility constraints.",
      "additionalProperties": true
    }
  },
  "required": ["kind", "name", "description"],
  "additionalProperties": true,
  "examples": [
    {
      "apiVersion": "lenserfight.dev/v1alpha1",
      "kind": "skill",
      "schema_version": 1,
      "id": "skill_competitor_research",
      "name": "Competitor Research Skill",
      "description": "Repeatable method for researching competitors and building structured reports.",
      "version": "0.1.0",
      "activation": { "keywords": ["competitor research"] }
    }
  ]
}
