Learning resourcesReviewed · Anthropic

Claude Agent SDK: Plugins in the SDK

Plugins in the SDK is a guide for developers extending Claude Agent SDK sessions, but plugins must be available as local directories. It covers reusable skills, specialized agents, event hooks and external tool integrations, with TypeScript and Python examples and different options for updating running sessions.

Researched 23 Nov 2026

In short.

Plugins in the SDK is a practical guide for developers adding capabilities to Claude Agent SDK sessions, but it requires locally available plugin directories. It explains configuration, component discovery, namespaced skill invocation and installation checks. TypeScript supports adding plugin directories during a session with SDK v0.3.301 or later; Python has a documented reload command but no equivalent reload method. Missing paths can be skipped while the session continues. Costs, licensing and runtime results are not established.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete supplied page at [https://code.claude.com/docs/en/agent-sdk/plugins.md], including local loading, path rules, reload behavior, TypeScript live addition, initialization checks, skill invocation, examples, directory structure and troubleshooting. The documentation-index notice and related links are present, but the index and linked pages are outside scope and their contents are not assessed. No SDK or plugin was executed. Runtime behavior, compatibility, performance and external integrations remain unverified.

The overview

Identity

This Claude Code documentation page teaches plugin integration through the Claude Agent SDK. It is an implementation guide, rather than a downloadable plugin or a standalone application. The source address is [https://code.claude.com/docs/en/agent-sdk/plugins.md].

Assessment

The guide is useful when an SDK application needs to reuse a bundle of agent capabilities across projects. Its strongest practical detail is explaining how to confirm that a plugin actually loaded: starting a session successfully is insufficient because nonexistent plugin paths are skipped.

It provides concrete integration instructions, but does not establish execution reliability, performance or compatibility with any particular third-party plugin. Nothing was executed.

Users

The intended readers are TypeScript and Python developers building applications around Claude Agent SDK sessions. It also serves developers moving an existing CLI-installed plugin into an SDK application by referencing its installation directory.

Beginners get working-shaped configuration examples and a directory reference. They still need separate information about installing the SDK, authentication and creating the plugin's actual capabilities.

Capabilities

A plugin can bundle skills that Claude invokes when relevant, specialized subagents, hooks responding to events such as tool use, and external tool connections through Model Context Protocol, or MCP. Applications can load multiple plugin directories.

Skills receive a plugin namespace and can be requested explicitly with /plugin-name:skill-name. The page also describes reloading skills, commands, agents and hooks, plus adding plugin directories to a running TypeScript session.

Using it

Requirements

The examples use @anthropic-ai/claude-agent-sdk for TypeScript and claude_agent_sdk for Python. Each configured plugin needs an existing, readable local root directory. Marketplace or repository plugins must be downloaded before their local paths are supplied.

Adding plugins during a running session through addPlugins requires TypeScript Agent SDK v0.3.301 or later. The page does not specify a general minimum SDK version, supported runtime versions, authentication requirements or operating-system support.

Mechanism

The application passes a plugins array through the options supplied to query(). Each entry contains type set to local and a path pointing to the plugin root. Relative paths resolve against the cwd option; absolute paths identify the directory directly.

Components are discovered from directories such as skills/, agents/, hooks/ and commands/, with MCP definitions in .mcp.json. A .claude-plugin/plugin.json manifest is optional. The initialization message exposes loaded plugins, skills and slash commands.

Setup

Prepare the plugin root and place each new skill in its own skills/ subdirectory containing SKILL.md. Supply the root path through options.plugins, using ClaudeAgentOptions in Python. The older commands/ layout remains supported for skills stored as flat Markdown files.

Inspect the system initialization message for the expected plugin and namespaced skills. If something is absent, check plugin_errors, the root path, directory existence, read permissions and any manifest's JSON syntax. Expand home-directory paths yourself because the SDK does not expand a leading tilde.

Example

For a plugin named my-plugin containing skills/greet/SKILL.md, the documented pattern supplies a local plugin entry pointing to ./my-plugin and sends /my-plugin:greet as the query prompt. The initialization message should list the plugin and its my-plugin:greet skill.

For live addition in supported TypeScript versions, the example calls q.reloadPlugins() with an addPlugins entry containing an absolute path, then inspects the returned plugins list. These are documentation examples; no observed execution output is available.

Assessment & evidence

Limitations

The SDK accepts only local plugin sources in this configuration. It does not download a marketplace or repository plugin through the documented plugins option. Missing directories are skipped while the session continues, and tilde paths are not expanded.

TypeScript exposes reloadPlugins(); Python instead reloads through a /reload-plugins prompt. The page does not document equivalent live plugin addition for Python or establish that reloading updates MCP server definitions. Plugin isolation, permissions and third-party behavior are not assessed.

Practical tradeoffs

Bundling related capabilities in one directory can simplify reuse across projects; that is a practical inference from the documented packaging model. Local loading leaves obtaining the plugin and resolving its location to the application developer.

The initialization checks matter because a missing plugin need not stop the agent session. Applications depending on a particular skill should confirm its presence before relying on it for a task.

Alternatives and related approaches

The page points to separate guides for skills [https://code.claude.com/docs/en/agent-sdk/skills.md] and subagents [https://code.claude.com/docs/en/agent-sdk/subagents.md]. These are relevant references when the requirement centers on one capability, but their contents and suitability as alternatives are not assessed here.

No competing SDKs or plugin systems are compared. The evidence does not support a feature, reliability or price ranking against another product.

Evidence

The evidence is the complete documentation page at [https://code.claude.com/docs/en/agent-sdk/plugins.md], including TypeScript and Python examples, directory structure, initialization fields and troubleshooting guidance. It establishes documented behavior, not independently demonstrated runtime results.

The captured source revision is sha256:337f70944e0f4f32c075058f45a37acdc6584bb3fd2bb26ecfd2f26380e755cb. No plugin package, execution transcript, benchmark or external integration result accompanies the page.

Access & freshness

Costs

The page gives no SDK, model-usage, plugin, marketplace or external-service prices. It supplies no measured usage or cost example. Total operating cost is unknown, and local plugin loading does not establish that running the resulting agent is free.

Rights

No license or redistribution terms are stated in the supplied page. Permissions for the documentation, example code, SDK and individual plugins are unknown from this evidence. The ability to load a plugin does not establish permission to redistribute it.

Freshness

The page was captured on 23 November 2026 at 11:44:26.575 UTC. Its publication and last-update dates are not supplied.

The explicit version threshold concerns TypeScript live addition through addPlugins: v0.3.301 or later. The current SDK release and behavior in other versions are not established.

Suggested next steps

Identify the capabilities your application needs, obtain the intended plugin and resolve its root directory. Confirm SDK installation, authentication, applicable licenses and expected usage charges separately because this page does not establish them.

For an initial integration, configure the local path and inspect the initialization message for both the plugin and required skills. Investigate plugin_errors when expected entries are missing. If live updates matter, account for the documented TypeScript and Python differences and verify the installed version before using addPlugins.

Evidence for this report

selected-page.txtselected · checked 2026-11-23