Loading...
Loading...
Comprehensive Cline SDK skill for building AI agents. Covers the Agent runtime, ClineCore sessions, custom tools, plugins, events, LLM providers, scheduling, multi-agent teams, and production deployment. Use for any task involving @cline/sdk or its sub-packages.
npx skill4agent add cline/sdk-skill cline-sdknpm install @cline/sdk@cline/sdk@cline/core@cline/agents@cline/llms@cline/sharedcreateTool()@cline/sdk@cline/sharedsnake_caseexecutelifecycle: { completesRun: true }ClineCoredispose()AgentClineCoreAgentagent.subscribe()AgentRuntimeEvent"assistant-text-delta"result.outputTextClineCorecline.subscribe()CoreSessionEvent"chunk"payload.type === "text"result.textonEventAgentRuntimeConfigagent.subscribe()hooks.onEvent"content_update""content_start"agent.subscribe()AgentClineCore./references/<api>/| File | Purpose | When to Read |
|---|---|---|
| Overview, when to use, quick start | Always read first |
| Full API: classes, methods, config, types | Writing code |
| Common patterns, best practices | Implementation guidance |
| Pitfalls, limitations, debugging | Troubleshooting |
./references/<concept>/REFERENCE.mdREFERENCE.mdapi.mdpatterns.mdtools/REFERENCE.mdplugins/REFERENCE.mdproviders/REFERENCE.mdevents/REFERENCE.mdproduction/REFERENCE.mdscheduling/REFERENCE.mdmulti-agent/REFERENCE.mdgotchas.md./references/agent/REFERENCE.md # Start here for lightweight agents
./references/clinecore/REFERENCE.md # Start here for full runtime
./references/agent/api.md # Agent class, config, methods
./references/tools/REFERENCE.md # Creating and using tools
./references/plugins/REFERENCE.md # Plugin system
./references/providers/REFERENCE.md # LLM provider configurationWhich API?
+-- I want a simple, stateless agent with custom tools
| +-- agent/ (Agent class from @cline/agents)
+-- I need session persistence, built-in tools, config discovery
| +-- clinecore/ (ClineCore from @cline/core)
+-- I want built-in file/shell/search/web tools
| +-- clinecore/ (has built-in tools; Agent does not)
+-- I want scheduled or recurring agents
| +-- clinecore/ (automation API)
+-- I need multi-process or multi-client session sharing
| +-- clinecore/ (hub-backed runtime)
+-- I'm building a browser-compatible agent
| +-- agent/ (no Node.js dependencies)Tools?
+-- Define a custom tool with schema -> tools/REFERENCE.md
+-- Use built-in tools (bash, editor, read_files) -> tools/REFERENCE.md (built-in section)
+-- Control tool approval/policies -> tools/REFERENCE.md (policies section)
+-- Tool that ends the agent loop -> tools/REFERENCE.md (completion tools)
+-- Package tools as a reusable plugin -> plugins/REFERENCE.mdEvents?
+-- Stream text/reasoning in real time -> events/REFERENCE.md
+-- Track token usage and costs -> events/REFERENCE.md
+-- Watch tool calls -> events/REFERENCE.md
+-- Detect completion/errors -> events/REFERENCE.md
+-- Hook into lifecycle stages -> plugins/REFERENCE.mdProviders?
+-- Anthropic (Claude) -> providers/REFERENCE.md
+-- OpenAI (GPT) -> providers/REFERENCE.md
+-- Google (Gemini/Vertex) -> providers/REFERENCE.md
+-- AWS Bedrock -> providers/REFERENCE.md
+-- Mistral -> providers/REFERENCE.md
+-- OpenAI-compatible (vLLM, Together, etc.) -> providers/REFERENCE.md
+-- Custom/self-hosted provider -> providers/REFERENCE.mdPlugins?
+-- Package tools + hooks together -> plugins/REFERENCE.md
+-- Observe tool calls (logging, metrics) -> plugins/REFERENCE.md
+-- Intercept lifecycle events -> plugins/REFERENCE.md
+-- Add system prompt rules -> plugins/REFERENCE.md
+-- Distribute via npm/git -> plugins/REFERENCE.mdMulti-agent?
+-- Spawn one-off background agents -> multi-agent/REFERENCE.md (sub-agents)
+-- Persistent cross-session teams -> multi-agent/REFERENCE.md (teams)
+-- Parent-child delegation -> multi-agent/REFERENCE.md (sub-agents)
+-- Peer-to-peer task board -> multi-agent/REFERENCE.md (teams)Scheduling?
+-- Recurring cron jobs -> scheduling/REFERENCE.md
+-- One-off scheduled tasks -> scheduling/REFERENCE.md
+-- Event-driven triggers -> scheduling/REFERENCE.md
+-- CLI schedule management -> scheduling/REFERENCE.mdProduction?
+-- Error handling and status checks -> production/REFERENCE.md
+-- Cost control and token limits -> production/REFERENCE.md
+-- Observability (OpenTelemetry) -> production/REFERENCE.md
+-- Security and sandboxing -> production/REFERENCE.md
+-- Deployment patterns -> production/REFERENCE.mdtools/REFERENCE.mdagent/gotchas.mdclinecore/gotchas.mdproviders/REFERENCE.mdclinecore/gotchas.mdproduction/REFERENCE.mdclinecore/gotchas.mdplugins/REFERENCE.mdevents/REFERENCE.md| API | Entry File | Description |
|---|---|---|
| Agent | | Lightweight stateless agent loop |
| ClineCore | | Full runtime with sessions, persistence, built-in tools |
| Concept | Entry File | Description |
|---|---|---|
| Tools | | Built-in and custom tool creation |
| Plugins | | Extension system with hooks |
| Events | | Real-time streaming events |
| Providers | | LLM provider configuration |
| Production | | Deployment, security, observability |
| Scheduling | | Cron jobs and automation |
| Multi-Agent | | Teams and sub-agents |
| Package | Purpose |
|---|---|
| Everything you need, install this one |
| Sessions, persistence, built-in tools, config, hub |
| Stateless agent loop, tool orchestration, streaming |
| LLM provider gateway |
| Types, tool helpers, hook engine |