Learning resourcesReviewed · Cline

Cline SDK Plugin Examples

Cline SDK Plugin Examples is a guide for developers extending Cline, but its linked plugin implementations are not included on the page. It introduces installable examples for custom tools, lifecycle hooks, message compaction, background commands, file-access controls, web search and multi-agent teams.

Researched 24 Nov 2026

In short.

Cline SDK Plugin Examples is a practical guide for developers adding capabilities to Cline, but it provides example descriptions and setup snippets rather than complete plugin implementations. It explains CLI plugin discovery, selected runtime hooks, message-builder ordering and background-job notifications. The web-search example needs Exa authentication plus separate model-provider authentication. Compatible software versions, prices and reuse rights are unspecified. No commands or plugins were executed, and the linked implementations were not assessed.

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

Coverage includes the complete page at [https://docs.cline.bot/sdk/plugin-examples.md], including its example tables, command snippets, behavioral explanations and Mintlify hosting notice. Linked repository files, the installation guide, the documentation index and other linked pages are excluded. No commands or plugins were executed. Implementation details, installation success, compatibility, security properties, performance, costs and reuse rights remain unverified where the page does not establish them.

The overview

Identity

The resource is the Plugin Examples page in Cline's SDK documentation [https://docs.cline.bot/sdk/plugin-examples.md]. It points to installable examples under the SDK repository's examples/plugins directory [https://github.com/cline/cline/tree/main/sdk/examples/plugins].

The page is a guide to those examples. It does not contain their complete source code or define the full plugin API.

Assessment

The guide is useful for choosing a starting example and understanding which Cline extension point serves a particular task. It recommends weather-metrics.ts as the first example and gives more detail for file-access guards, web search, compaction and background commands.

Its practical limit is implementation depth: the page alone cannot establish how the linked code handles errors, dependencies or unusual inputs. Installation success and runtime behavior remain unverified.

Users

The main audience is developers who want to extend Cline through the CLI and SDK. Beginners can use the single-file installation example to orient themselves; experienced developers can use the named APIs and hooks to locate relevant implementations.

The examples address different needs: macOS completion alerts, TypeScript symbol navigation, background shell work, custom search, automation events and teams of subagents. The page assumes comfort with terminal commands and, for web search, API-key configuration.

Capabilities

weather-metrics.ts demonstrates tool registration and lifecycle metrics hooks. mac-notify.ts sends a macOS Notification Center alert through afterRun. automation-events.ts demonstrates plugin-emitted automation events.

web-search.ts registers an Exa-backed web_search tool. typescript-lsp provides goto_definition through the TypeScript Language Service. agents-squad demonstrates subagents with their own models and personalities.

Other examples cover provider-message compaction, detached shell commands with saved logs and optional session steering, and blocking specified tools from accessing workspace files ignored by .gitignore.

Using it

Requirements

The shown commands require a Cline CLI with plugin support. The page does not specify compatible CLI or SDK releases, a required Node.js version or complete dependency requirements. Directory plugins have their own package.json.

The web-search example requires EXA_API_KEY and a normal model-provider key or saved provider authentication. Its sample configuration uses OpenRouter and anthropic/claude-sonnet-4.6; the page does not establish that this combination is required for other plugins. mac-notify.ts specifically targets macOS.

Mechanism

Plugins can register tools and react to runtime events. The ignored-file guard uses beforeTool to intercept read_files, editor and apply_patch calls. For ignored workspace files, it returns { skip: true }; the documented result is a policy error without file access.

api.registerMessageBuilder() rewrites the messages sent to the model. Builders run in registration order before the built-in safety builder, and a final pass applies provider-safe truncation.

The background plugin exposes start_background_command, get_background_command and delete_background_command. These start detached jobs, retrieve status and recent output, and remove saved metadata with optional log deletion. With notifyParent enabled, completion emits a steer_message into the active session.

Setup

The starter instructions install weather-metrics.ts from [https://github.com/cline/cline/blob/main/sdk/examples/plugins/weather-metrics.ts] using cline plugin install with the --cwd option set to the current directory. They then invoke cline -i with a weather request. Other single-file examples can replace that file.

The CLI is documented to discover plugins in the workspace's .cline/plugins directory, ~/.cline/plugins and a system plugins folder whose exact path is not supplied.

For a local directory plugin, the page shows cline plugin install ./examples/plugins/agents-squad. Obtaining that local directory and resolving its dependencies are not explained here. Further installation guidance is linked at [https://docs.cline.bot/sdk/plugin-install.md], whose contents are outside this page.

Example

The documented web-search workflow installs web-search.ts, supplies Exa and OpenRouter credentials, authenticates the model provider and asks Cline to find recent Bun release notes before fetching a relevant page. web_search discovers URLs; fetch_web_content retrieves a chosen page for inspection.

This illustrates how search and page retrieval fit together. No search results, fetched content or observed execution results are provided.

Assessment & evidence

Limitations

The ignored-file guard is described for three named tools and workspace .gitignore rules. The page does not establish protection against every file-access route, including shell commands or other tools, so it does not demonstrate a comprehensive filesystem boundary.

Compaction changes the messages available to the model, but information retention and response quality are not measured. The background deletion tool is described as deleting metadata and optionally logs; stopping a running process is not documented.

Plugin source, dependency behavior, security properties, reliability, performance and multi-agent coordination quality were not assessed. No commands or plugins were executed.

Reasoning

The examples help map a developer's need to an extension mechanism: a custom tool adds an action, a lifecycle hook reacts to an event, and a message builder changes the context sent to the model. That distinction makes the page useful for planning a Cline extension.

The concrete method names and command snippets provide orientation, while the missing implementation and compatibility details limit decisions about production adoption.

Alternatives

For compaction, the page contrasts api.registerMessageBuilder() with hooks.beforeModel. It recommends the message-builder approach for reusable plugin-owned compaction policies and identifies beforeModel as an option when runtime-hook context or direct request mutation is needed.

For packaging, it shows both single-file plugins and directory plugins with package.json. It provides no comparative results for external plugin frameworks or other coding assistants.

Evidence

The evidence is the complete documentation page at [https://docs.cline.bot/sdk/plugin-examples.md]. It supplies example descriptions, installation and authentication snippets, and explanations of selected runtime behavior.

The linked plugin implementations, installation guide and documentation index are not included. The page's Mintlify notice identifies its documentation hosting platform and supplies no additional plugin behavior or licence terms.

Access & freshness

Costs

The page gives no plugin prices, service rates, free allowances, quotas or workload estimates. Total cost is unknown.

Web search uses Exa authentication separately from model-provider authentication. Charges and billing terms for those services are not established by this page.

Rights

The page includes no licence text or explicit terms for copying, modifying, redistributing or commercially using the documentation or linked plugins. Those rights remain unknown.

Repository links and installation instructions do not establish reuse permissions. Applicable licences for each implementation and its dependencies need to be checked separately.

Freshness

The available page snapshot was captured on 24 November 2026 at 13:17:38 UTC. The page supplies no publication date, update date or CLI/SDK release number.

Its GitHub links reference the main branch rather than a fixed commit. The capture date therefore does not establish an immutable plugin version or compatibility with a particular installed Cline release.

Actions

For a first learning exercise, begin with weather-metrics.ts, as the page recommends. For a specific extension, choose the example matching the required tool, hook, message transformation or background-job behavior.

Before adopting an example in a working project, inspect its implementation, establish compatible software versions and dependencies, and check applicable licences. For web search, confirm both Exa and model-provider pricing. For the ignored-file guard, verify coverage of the actual tools used by the project.

Evidence for this report

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