The plugin docs described skills as registered through an `api.registerSkill()`
method gated on a functional `"skills"` capability. That API does not exist.
This corrects the skills model and documents several SDK surfaces added over the
last month (verified against the cline source, not memory).
Skills (the correction):
- There is no `registerSkill()` / `api.registerSkill`. Plugin skills are purely
file-based: a package ships `SKILL.md` files at `<package>/skills/<name>/SKILL.md`
and the host discovers them via `resolvePluginSkillDirectoriesFromPaths` ->
`discoverSkillFiles` (which only matches files literally named `SKILL.md`).
- Discovery requires the package shape; a single-file plugin in `.cline/plugins/`
cannot bundle skills (the walk needs a `package.json` declaring the entry).
- Discovered skills surface as `/slash-commands` automatically — no
`registerCommand` for them.
- `"skills"` is a real capability but only an optional declaration; discovery does
not gate on it. Noted that agents-squad's flat `skills/*.md` are plugin-private
data, not the host mechanism, so it is not a model to copy.
New SDK surfaces documented:
- Plugin MCP support: `"mcp"` capability + `api.registerMcpServer()` (stdio/sse/
streamableHttp transports, `env` resolution via `fromEnv`/`value`/`required`,
install-time OAuth). registerMcpServer throws without `"mcp"`.
- Agent profiles / configured agents (multi-agent reference): YAML files in
`.cline/agents/`, loaded as `subagent_<name>` tools when `enableSpawnAgent` is
true, with tools/skills/providerId/modelId/maxIterations fields.
- Plugin command `submitPrompt`: commands can return `{ submitPrompt }` to queue a
new agent run rather than just `{ reply }`.
- Built-in tool behavior (tools reference): ~48KB output caps for read/run/search,
2000-line / 2000-char read windowing, ranged reads on >10MB files, apply_patch
all-or-nothing on skipped hunks, parallel-tool-call encouragement.
Also updated SKILL.md (rule + decision trees + index), README topic line, and the
plugins capability table, api list, unit-test mock, gotchas, decision guide, and
pre-ship checklist for consistency.
Cline SDK Skill
Cline SDK reference docs for AI coding assistants. Covers the direct Agent runtime, ClineCore sessions, custom tools, plugins, events, LLM providers, scheduling, multi-agent teams, and production deployment.
For full documentation, visit docs.cline.bot/sdk.
Install
Add the skill to your AI coding assistant for richer context:
npx skills add cline/sdk-skill
This works with Cline CLI, Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Goose, OpenCode, and Windsurf.
Manual install with git
If you prefer not to use npx skills, you can clone the repo and symlink the skill directory into your agent's skill folder.
For Claude Code:
git clone https://github.com/cline/sdk-skill ~/sdk-skill
mkdir -p ~/.claude/skills
ln -s ~/sdk-skill/skill/cline-sdk ~/.claude/skills/cline-sdk
For Codex CLI:
git clone https://github.com/cline/sdk-skill ~/sdk-skill
mkdir -p ~/.codex/skills
ln -s ~/sdk-skill/skill/cline-sdk ~/.codex/skills/cline-sdk
For Amp:
git clone https://github.com/cline/sdk-skill ~/sdk-skill
mkdir -p ~/.config/amp/tools
ln -s ~/sdk-skill/skill/cline-sdk ~/.config/amp/tools/cline-sdk
For Droid (Factory):
git clone https://github.com/cline/sdk-skill ~/sdk-skill
mkdir -p ~/.factory/skills
ln -s ~/sdk-skill/skill/cline-sdk ~/.factory/skills/cline-sdk
For pi-coding-agent:
git clone https://github.com/cline/sdk-skill ~/sdk-skill
mkdir -p ~/.pi/agent/skills
ln -s ~/sdk-skill/skill/cline-sdk ~/.pi/agent/skills/cline-sdk
You can also use project-level paths instead of user-level paths for per-project installation.
Structure
skill/cline-sdk/
+-- SKILL.md # Main manifest + decision trees
+-- references/ # API and concept subdirectories
+-- agent/ # Agent runtime (4-file pattern)
+-- clinecore/ # ClineCore full runtime (4-file pattern)
+-- tools/ # Built-in and custom tools
+-- plugins/ # Extension system
+-- events/ # Streaming events
+-- providers/ # LLM provider configuration
+-- production/ # Deployment and security
+-- scheduling/ # Cron and automation
+-- multi-agent/ # Teams and sub-agents
Decision Trees
The main SKILL.md contains decision trees for:
- Choosing an API surface (Agent vs ClineCore)
- Creating and configuring tools
- Setting up plugins and hooks
- Configuring LLM providers
- Streaming events
- Multi-agent coordination
- Scheduling and automation
- Production deployment
- Troubleshooting
Topics Covered
API Surfaces: Agent (lightweight in-memory loop), ClineCore (full runtime with persistence)
Tools: Custom tool creation with Zod/JSON Schema, built-in tools (read_files, search_codebase, run_commands, fetch_web_content, apply_patch, editor, skills, ask_question, submit_and_exit), tool policies
Plugins: Extension system, hooks, MCP servers, bundled skills, lifecycle stages, distribution
Cross-cutting: Events, LLM providers, scheduling, multi-agent teams and configured agent profiles, production deployment