{
  "$id": "https://raw.githubusercontent.com/outfitter-dev/skillset/main/docs/reference/schemas/0.1.0/skill-frontmatter.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": true,
  "properties": {
    "allowed_tools": {
      "anyOf": [
        {
          "const": false
        },
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "agents": {
              "anyOf": [
                {
                  "const": false
                },
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "items": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              ]
            },
            "claude": {
              "anyOf": [
                {
                  "const": false
                },
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "items": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              ]
            },
            "codex": {
              "anyOf": [
                {
                  "const": false
                },
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "items": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              ]
            },
            "cursor": {
              "anyOf": [
                {
                  "const": false
                },
                {
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "items": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              ]
            }
          },
          "type": "object"
        }
      ]
    },
    "bin": {
      "anyOf": [
        {
          "const": false
        },
        {
          "type": "object"
        }
      ]
    },
    "claude": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object"
        }
      ]
    },
    "codex": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object"
        }
      ]
    },
    "compatibility": {
      "maxLength": 500,
      "minLength": 1,
      "type": "string"
    },
    "cursor": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object"
        }
      ]
    },
    "dependencies": {
      "additionalProperties": false,
      "properties": {
        "plugins": {
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "marketplace": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "plugin": {
                    "type": "string"
                  },
                  "range": {
                    "type": "string"
                  },
                  "unversioned": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            ]
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "description": {
      "minLength": 1,
      "type": "string"
    },
    "dialect": {
      "enum": [
        "claude"
      ],
      "type": "string"
    },
    "hooks": {
      "additionalProperties": {
        "items": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "additionalProperties": false,
              "properties": {
                "hook": {
                  "minLength": 1,
                  "type": "string"
                },
                "match": {
                  "anyOf": [
                    {
                      "minLength": 1,
                      "type": "string"
                    },
                    {
                      "type": "object"
                    }
                  ]
                },
                "providers": {
                  "items": {
                    "enum": [
                      "claude",
                      "codex",
                      "cursor"
                    ],
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true
                },
                "status": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "type": "object"
            }
          ]
        },
        "type": "array"
      },
      "properties": {
        "auto": {
          "items": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "hook": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "match": {
                    "anyOf": [
                      {
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "object"
                      }
                    ]
                  },
                  "providers": {
                    "items": {
                      "enum": [
                        "claude",
                        "codex",
                        "cursor"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array",
                    "uniqueItems": true
                  },
                  "status": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ]
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "implicit_invocation": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "additionalProperties": false,
          "properties": {
            "claude": {
              "type": "boolean"
            },
            "codex": {
              "type": "boolean"
            },
            "cursor": {
              "type": "boolean"
            }
          },
          "type": "object"
        }
      ]
    },
    "mcp": {
      "anyOf": [
        {
          "const": false
        },
        {
          "type": "object"
        }
      ]
    },
    "metadata": {
      "additionalProperties": true,
      "properties": {
        "skillset.schema": {
          "const": "1",
          "type": "string"
        },
        "version": {
          "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9]\\d*|[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$",
          "type": "string"
        }
      },
      "type": "object"
    },
    "model": {
      "minLength": 1,
      "type": "string"
    },
    "name": {
      "minLength": 1,
      "type": "string"
    },
    "resources": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "items": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "from": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "to": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        {
          "additionalProperties": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "minLength": 1,
                      "type": "string"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "to": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              }
            ]
          },
          "type": "object"
        }
      ]
    },
    "schema": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "minimum": 1,
          "type": "integer"
        }
      ]
    },
    "skillset": {
      "additionalProperties": false,
      "properties": {
        "author": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "additionalProperties": true,
              "properties": {
                "email": {
                  "minLength": 1,
                  "type": "string"
                },
                "name": {
                  "minLength": 1,
                  "type": "string"
                },
                "url": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            }
          ]
        },
        "category": {
          "type": "string"
        },
        "description": {
          "minLength": 1,
          "type": "string"
        },
        "homepage": {
          "type": "string"
        },
        "keywords": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "license": {
          "enum": [
            "Apache-2.0",
            "BSD-2-Clause",
            "BSD-3-Clause",
            "ISC",
            "MIT",
            "MPL-2.0",
            "none"
          ],
          "type": "string"
        },
        "listing": {
          "additionalProperties": false,
          "properties": {
            "capabilities": {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            },
            "category": {
              "minLength": 1,
              "type": "string"
            },
            "color": {
              "minLength": 1,
              "type": "string"
            },
            "composer_icon": {
              "minLength": 1,
              "type": "string"
            },
            "default_prompt": {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            },
            "description": {
              "minLength": 1,
              "type": "string"
            },
            "display_name": {
              "minLength": 1,
              "type": "string"
            },
            "keywords": {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            },
            "logo": {
              "minLength": 1,
              "type": "string"
            },
            "logo_dark": {
              "minLength": 1,
              "type": "string"
            },
            "privacy_policy_url": {
              "minLength": 1,
              "type": "string"
            },
            "screenshots": {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            },
            "summary": {
              "minLength": 1,
              "type": "string"
            },
            "terms_of_service_url": {
              "minLength": 1,
              "type": "string"
            },
            "website_url": {
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        },
        "manifest": {
          "additionalProperties": true,
          "properties": {
            "category": {
              "minLength": 1,
              "type": "string"
            },
            "displayName": {
              "minLength": 1,
              "type": "string"
            },
            "logo": {
              "minLength": 1,
              "type": "string"
            },
            "name": {
              "minLength": 1,
              "type": "string"
            },
            "tags": {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "marketplace": {
          "type": "object"
        },
        "name": {
          "minLength": 1,
          "type": "string"
        },
        "origin": {
          "additionalProperties": false,
          "dependentRequired": {
            "ref": [
              "repo"
            ],
            "repo": [
              "ref"
            ]
          },
          "properties": {
            "path": {
              "minLength": 1,
              "type": "string"
            },
            "ref": {
              "minLength": 1,
              "type": "string"
            },
            "repo": {
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "path"
          ],
          "type": "object"
        },
        "outputs": {
          "additionalProperties": true,
          "properties": {
            "skills": {
              "additionalProperties": true,
              "allOf": [
                {
                  "not": {
                    "required": [
                      "claude"
                    ]
                  }
                },
                {
                  "not": {
                    "required": [
                      "codex"
                    ]
                  }
                },
                {
                  "not": {
                    "required": [
                      "cursor"
                    ]
                  }
                }
              ],
              "type": "object"
            }
          },
          "type": "object"
        },
        "owner": {
          "additionalProperties": true,
          "properties": {
            "email": {
              "minLength": 1,
              "type": "string"
            },
            "name": {
              "minLength": 1,
              "type": "string"
            },
            "url": {
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        },
        "preprocess": {
          "type": "boolean"
        },
        "presentation": {
          "type": "object"
        },
        "repository": {
          "type": "string"
        },
        "schema": {
          "const": 1,
          "type": "integer"
        },
        "strict": {
          "type": "boolean"
        },
        "summary": {
          "minLength": 1,
          "type": "string"
        },
        "title": {
          "minLength": 1,
          "type": "string"
        },
        "version": {
          "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9]\\d*|[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$",
          "type": "string"
        }
      },
      "type": "object"
    },
    "summary": {
      "minLength": 1,
      "type": "string"
    },
    "supports": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "onMismatch": {
                    "enum": [
                      "error",
                      "warn"
                    ],
                    "type": "string"
                  },
                  "range": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        {
          "additionalProperties": false,
          "properties": {
            "packages": {
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "onMismatch": {
                        "enum": [
                          "error",
                          "warn"
                        ],
                        "type": "string"
                      },
                      "range": {
                        "type": "string"
                      },
                      "source": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                ]
              },
              "type": "array"
            }
          },
          "required": [
            "packages"
          ],
          "type": "object"
        }
      ]
    },
    "title": {
      "minLength": 1,
      "type": "string"
    },
    "tools": {
      "anyOf": [
        {
          "const": "readonly"
        },
        {
          "type": "object"
        }
      ]
    },
    "version": {
      "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9]\\d*|[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$",
      "type": "string"
    }
  },
  "title": "Skill Frontmatter",
  "type": "object"
}
