{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/claude-code/marketplace/latest.json",
  "title": "Claude Code Marketplace",
  "description": "Schema for [Claude Code marketplace](https://code.claude.com/docs/en/plugin-marketplaces) catalog (`.claude-plugin/marketplace.json`). Marketplaces distribute plugins to teams and communities, providing centralized discovery, version tracking, and automatic updates. Each marketplace lists plugins with their sources (local paths, GitHub repos, git URLs, npm packages, or pip packages). Users add marketplaces via `/plugin marketplace add` and install individual plugins with `/plugin install plugin-name@marketplace-name`.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lintel-rs/catalog/master/schemas/claude-code/marketplace.json",
    "sourceSha256": "e384a8b15aea368420746f6f677c735c071650a85e61d941ffa2b3f1bfa4fe06",
    "fileMatch": [
      "**/.claude-plugin/marketplace.json",
      ".claude-plugin/marketplace.json"
    ],
    "parsers": [
      "json"
    ],
    "catalogDescription": "Claude Code plugin marketplace catalog."
  },
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Marketplace identifier (kebab-case, no spaces). This is public-facing — users see it when installing plugins (e.g. `/plugin install my-tool@your-marketplace`). **Reserved names** (cannot be used): `claude-code-marketplace`, `claude-code-plugins`, `claude-plugins-official`, `anthropic-marketplace`, `anthropic-plugins`, `agent-skills`, `life-sciences`. Names that impersonate official marketplaces are also blocked.",
      "pattern": "^[a-z0-9][a-z0-9-]*$",
      "examples": [
        "acme-tools",
        "company-tools",
        "my-plugins"
      ]
    },
    "owner": {
      "$ref": "#/$defs/Owner",
      "description": "Marketplace maintainer information."
    },
    "plugins": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PluginEntry"
      },
      "description": "List of available plugins in this marketplace. Each entry needs at minimum a `name` and `source`. Plugin entries can also include any field from the [plugin manifest schema](https://code.claude.com/docs/en/plugins-reference#plugin-manifest-schema) (`description`, `version`, `author`, `commands`, `hooks`, etc.)."
    },
    "metadata": {
      "$ref": "#/$defs/Metadata",
      "description": "Optional marketplace metadata."
    }
  },
  "$defs": {
    "Owner": {
      "type": "object",
      "description": "Marketplace maintainer information.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the maintainer or team.",
          "examples": [
            "DevTools Team",
            "Jane Doe"
          ]
        },
        "email": {
          "type": "string",
          "description": "Contact email for the maintainer.",
          "examples": [
            "devtools@example.com"
          ]
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "Metadata": {
      "type": "object",
      "description": "Optional marketplace-level metadata.",
      "properties": {
        "description": {
          "type": "string",
          "description": "Brief marketplace description.",
          "examples": [
            "Internal tools for the DevOps team"
          ]
        },
        "version": {
          "type": "string",
          "description": "Marketplace catalog version.",
          "examples": [
            "1.0.0"
          ]
        },
        "pluginRoot": {
          "type": "string",
          "description": "Base directory prepended to relative plugin source paths. For example, setting this to `./plugins` lets you write `\"source\": \"formatter\"` instead of `\"source\": \"./plugins/formatter\"`.",
          "examples": [
            "./plugins"
          ]
        }
      },
      "additionalProperties": false
    },
    "PluginEntry": {
      "type": "object",
      "description": "A plugin listed in the marketplace. Includes marketplace-specific fields (`source`, `category`, `tags`, `strict`) plus any field from the [plugin manifest schema](https://code.claude.com/docs/en/plugins-reference#plugin-manifest-schema) (`description`, `version`, `author`, `commands`, `hooks`, etc.).",
      "properties": {
        "name": {
          "type": "string",
          "description": "Plugin identifier (kebab-case, no spaces). This is public-facing — users see it when installing (e.g. `/plugin install my-plugin@marketplace`).",
          "pattern": "^[a-z0-9][a-z0-9-]*$",
          "examples": [
            "code-formatter",
            "deployment-tools",
            "review-plugin"
          ]
        },
        "source": {
          "$ref": "#/$defs/PluginSource",
          "description": "Where to fetch the plugin from. Can be a relative path within the marketplace repo (starting with `./`) or an object specifying a remote source (`github`, `url`, `npm`, or `pip`). **Note**: Relative paths only work when users add the marketplace via Git — they won't resolve for URL-based marketplaces. See [plugin sources](https://code.claude.com/docs/en/plugin-marketplaces#plugin-sources)."
        },
        "description": {
          "type": "string",
          "description": "Brief plugin description shown when browsing the marketplace.",
          "examples": [
            "Automatic code formatting on save"
          ]
        },
        "version": {
          "type": "string",
          "description": "Plugin version. If the plugin also has a version in its `plugin.json`, the `plugin.json` version **takes priority**. For relative-path plugins, set the version here. For remote plugins, set it in `plugin.json`. See [version resolution](https://code.claude.com/docs/en/plugin-marketplaces#version-resolution-and-release-channels).",
          "examples": [
            "1.0.0",
            "2.1.0"
          ]
        },
        "author": {
          "$ref": "https://catalog.lintel.tools/schemas/claude-code/author/latest.json",
          "description": "Plugin author information."
        },
        "homepage": {
          "type": "string",
          "description": "Plugin homepage or documentation URL.",
          "examples": [
            "https://docs.example.com/plugins/my-tool"
          ]
        },
        "repository": {
          "type": "string",
          "description": "Source code repository URL.",
          "examples": [
            "https://github.com/company/my-plugin"
          ]
        },
        "license": {
          "type": "string",
          "description": "[SPDX license identifier](https://spdx.org/licenses/).",
          "examples": [
            "MIT",
            "Apache-2.0"
          ]
        },
        "keywords": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tags for plugin discovery and categorization.",
          "examples": [
            [
              "enterprise",
              "workflow",
              "automation"
            ]
          ]
        },
        "category": {
          "type": "string",
          "description": "Plugin category for organization.",
          "examples": [
            "productivity",
            "code-quality",
            "deployment"
          ]
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tags for searchability.",
          "examples": [
            [
              "lint",
              "format",
              "style"
            ]
          ]
        },
        "strict": {
          "type": "boolean",
          "description": "Controls whether `plugin.json` is the authority for component definitions. When `true` (default), `plugin.json` is authoritative and the marketplace entry can supplement it with additional components (both are merged). When `false`, the marketplace entry is the **entire definition** — if the plugin also has a `plugin.json` that declares components, that's a conflict and the plugin fails to load. See [strict mode](https://code.claude.com/docs/en/plugin-marketplaces#strict-mode).",
          "default": true
        },
        "commands": {
          "$ref": "https://catalog.lintel.tools/schemas/claude-code/path-or-paths/latest.json",
          "description": "Custom paths to command files or directories, relative to the plugin root."
        },
        "agents": {
          "$ref": "https://catalog.lintel.tools/schemas/claude-code/path-or-paths/latest.json",
          "description": "Custom paths to agent files, relative to the plugin root."
        },
        "skills": {
          "$ref": "https://catalog.lintel.tools/schemas/claude-code/path-or-paths/latest.json",
          "description": "Custom paths to skill directories, relative to the plugin root."
        },
        "hooks": {
          "description": "[Hook](https://code.claude.com/docs/en/hooks) configuration — paths to JSON config files or inline definitions.",
          "oneOf": [
            {
              "type": "string",
              "description": "Path to a hooks JSON config file."
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Array of paths."
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/claude-code/hooks/latest.json",
              "description": "Inline hook definitions."
            }
          ]
        },
        "mcpServers": {
          "description": "[MCP server](https://code.claude.com/docs/en/mcp) configuration — paths to JSON config files or inline definitions.",
          "oneOf": [
            {
              "type": "string",
              "description": "Path to an MCP config JSON file."
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Array of paths."
            },
            {
              "type": "object",
              "description": "Inline MCP server definitions.",
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "string",
                    "description": "Reference to an already-configured server."
                  },
                  {
                    "$ref": "https://catalog.lintel.tools/schemas/claude-code/mcp-server-config/latest.json",
                    "description": "Inline definition."
                  }
                ]
              }
            }
          ]
        },
        "outputStyles": {
          "$ref": "https://catalog.lintel.tools/schemas/claude-code/path-or-paths/latest.json",
          "description": "Custom paths to output style files or directories."
        },
        "lspServers": {
          "description": "[LSP server](https://code.claude.com/docs/en/plugins-reference#lsp-servers) configuration — paths to JSON config files or inline definitions.",
          "oneOf": [
            {
              "type": "string",
              "description": "Path to an LSP config JSON file."
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Array of paths."
            },
            {
              "type": "object",
              "description": "Inline LSP server definitions.",
              "additionalProperties": {
                "$ref": "https://catalog.lintel.tools/schemas/claude-code/lsp-server-config/latest.json"
              }
            }
          ]
        }
      },
      "required": [
        "name",
        "source"
      ],
      "additionalProperties": false
    },
    "PluginSource": {
      "oneOf": [
        {
          "type": "string",
          "description": "Relative path within the marketplace repo. Must start with `./`. Only works when users add the marketplace via Git (not URL-based).",
          "examples": [
            "./plugins/my-plugin"
          ]
        },
        {
          "$ref": "#/$defs/GitHubSource"
        },
        {
          "$ref": "#/$defs/UrlSource"
        },
        {
          "$ref": "#/$defs/NpmSource"
        },
        {
          "$ref": "#/$defs/PipSource"
        }
      ]
    },
    "GitHubSource": {
      "type": "object",
      "description": "Fetch the plugin from a [GitHub](https://github.com) repository. Supports pinning to a branch, tag, or exact commit SHA.",
      "properties": {
        "source": {
          "const": "github"
        },
        "repo": {
          "type": "string",
          "description": "GitHub repository in `owner/repo` format.",
          "pattern": "^[^/]+/[^/]+$",
          "examples": [
            "owner/plugin-repo",
            "company/enterprise-plugin"
          ]
        },
        "ref": {
          "type": "string",
          "description": "Git branch or tag. Defaults to the repository's default branch.",
          "examples": [
            "main",
            "v2.0.0",
            "stable"
          ]
        },
        "sha": {
          "type": "string",
          "description": "Full 40-character git commit SHA to pin to an exact version.",
          "pattern": "^[0-9a-f]{40}$",
          "examples": [
            "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
          ]
        }
      },
      "required": [
        "source",
        "repo"
      ],
      "additionalProperties": false
    },
    "UrlSource": {
      "type": "object",
      "description": "Fetch the plugin from a git URL (GitHub, GitLab, Bitbucket, self-hosted, etc.).",
      "properties": {
        "source": {
          "const": "url"
        },
        "url": {
          "type": "string",
          "description": "Full git repository URL (must end with `.git`).",
          "pattern": "\\.git$",
          "examples": [
            "https://gitlab.com/team/plugin.git"
          ]
        },
        "ref": {
          "type": "string",
          "description": "Git branch or tag. Defaults to the repository's default branch.",
          "examples": [
            "main",
            "v1.0.0"
          ]
        },
        "sha": {
          "type": "string",
          "description": "Full 40-character git commit SHA to pin to an exact version.",
          "pattern": "^[0-9a-f]{40}$"
        }
      },
      "required": [
        "source",
        "url"
      ],
      "additionalProperties": false
    },
    "NpmSource": {
      "type": "object",
      "description": "Install the plugin from an [npm](https://www.npmjs.com/) registry via `npm install`.",
      "properties": {
        "source": {
          "const": "npm"
        },
        "package": {
          "type": "string",
          "description": "npm package name.",
          "examples": [
            "@company/mcp-server",
            "my-claude-plugin"
          ]
        },
        "version": {
          "type": "string",
          "description": "Version range or exact version.",
          "examples": [
            "1.0.0",
            "^2.0.0"
          ]
        },
        "registry": {
          "type": "string",
          "description": "Custom npm registry URL.",
          "examples": [
            "https://npm.company.com"
          ]
        }
      },
      "required": [
        "source",
        "package"
      ],
      "additionalProperties": false
    },
    "PipSource": {
      "type": "object",
      "description": "Install the plugin via [pip](https://pip.pypa.io/).",
      "properties": {
        "source": {
          "const": "pip"
        },
        "package": {
          "type": "string",
          "description": "Python package name.",
          "examples": [
            "my-claude-plugin"
          ]
        },
        "version": {
          "type": "string",
          "description": "Version specifier.",
          "examples": [
            "1.0.0",
            ">=2.0"
          ]
        },
        "registry": {
          "type": "string",
          "description": "Custom PyPI registry URL.",
          "examples": [
            "https://pypi.company.com/simple"
          ]
        }
      },
      "required": [
        "source",
        "package"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "name",
    "owner",
    "plugins"
  ]
}
