claude-code-plugins-sdk
A Python library for working with Claude Code plugins and marketplaces.
Claude Code has a plugin ecosystem — agents, skills, commands, hooks, MCP servers — but no official Python tooling to work with it. This library lets you load, parse, and validate plugins and marketplaces from disk or from remote sources.
Install
pip install claude-code-plugins-sdk
Requires Python 3.10+.
What you can do
Load a local marketplace and inspect its plugins:
from pathlib import Path
from claude_code_plugins_sdk import load_marketplace
marketplace = load_marketplace(Path("./my-marketplace"))
for plugin in marketplace.plugins:
print(plugin.name, plugin.version)
Fetch a marketplace from GitHub:
from claude_code_plugins_sdk import fetch_marketplace
# GitHub shorthand
marketplace = fetch_marketplace("anthropics/claude-code")
# Pinned to a tag
from claude_code_plugins_sdk import GitHubSource
marketplace = fetch_marketplace(GitHubSource(source="github", repo="anthropics/claude-code", ref="v1.0"))
# Raw URL to a marketplace.json
marketplace = fetch_marketplace("https://example.com/.claude-plugin/marketplace.json")
Load a plugin directory and read its agents, skills, commands, and hooks:
from pathlib import Path
from claude_code_plugins_sdk import load_plugin
plugin = load_plugin(Path("./my-plugin"))
print(plugin.manifest.name) # plugin name from plugin.json
print(plugin.agents) # list of AgentDefinition
print(plugin.skills) # list of SkillDefinition
print(plugin.commands) # list of CommandDefinition
print(plugin.hooks) # HooksConfig or None
print(plugin.mcp_servers) # MCPServersConfig or None
Load individual component files directly:
from claude_code_plugins_sdk import load_agent, load_skill, load_command
agent = load_agent(Path("./agents/reviewer.md"))
print(agent.name, agent.tools) # tools is always a list, even though YAML stores it as a comma string
skill = load_skill(Path("./skills/code-review/SKILL.md"))
command = load_command(Path("./commands/review.md"))
Plugin structure
A Claude Code plugin is a directory with this layout:
my-plugin/
├── .claude-plugin/
│ └── plugin.json # optional manifest
├── agents/ # *.md files with YAML frontmatter
├── skills/ # */SKILL.md files
├── commands/ # *.md files
├── hooks/
│ └── hooks.json
├── .mcp.json
└── .lsp.json
A marketplace is a directory with .claude-plugin/marketplace.json listing plugins and where to find them.
Development
git clone git@github.com:doron-cohen/claude-code-plugins-sdk.git
cd claude-code-plugins-sdk
uv sync
uv run pytest
uv run pytest -m integration # hits real remote marketplaces, needs network
Metadata
Release files for claude-code-plugins-sdk 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| claude_code_plugins_sdk-0.4.0.tar.gz | 80.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_code_plugins_sdk-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 111.4 kB
Release files / claude_code_plugins_sdk-0.4.0.tar.gz
| Download URL | claude_code_plugins_sdk-0.4.0.tar.gz |
|---|---|
| Size | 80.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe90f9a0114b478445113a358d79c39740c8765ef85677359e79afe8b8411994
|
|
BLAKE2b-256 checksum How to use checksums |
8faecd6e98c12977801dec32405627f7b48ce62455a02d4bb8f4659d7c70e5df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.
Transparency logRelease files / claude_code_plugins_sdk-0.4.0-py3-none-any.whl
| Download URL | claude_code_plugins_sdk-0.4.0-py3-none-any.whl |
|---|---|
| Size | 31.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2c20bbdabe3ace94e2ecc1fe3cae4643aab4ac882c8494a26f2e68517d34643
|
|
BLAKE2b-256 checksum How to use checksums |
610d9e77d7851bf772950541e07fa59274671e86e693d0c8947f86781e751933
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.
Transparency logSecurity for claude-code-plugins-sdk 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for claude_code_plugins_sdk-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.