本文へ移動
cccskills
無料GitHub で公開

cline-sdk

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.

インストール方法を見る

含まれるファイル(16)

  • SKILL.md8.6 KB
  • references/agent/api.md5.1 KB
  • references/agent/gotchas.md4.3 KB
  • references/agent/patterns.md5.6 KB
  • references/agent/REFERENCE.md3.5 KB
  • references/clinecore/api.md6.9 KB
  • references/clinecore/gotchas.md4.9 KB
  • references/clinecore/patterns.md6.0 KB
  • references/clinecore/REFERENCE.md4.3 KB
  • references/events/REFERENCE.md7.6 KB
  • references/multi-agent/REFERENCE.md4.2 KB
  • references/plugins/REFERENCE.md22.8 KB
  • references/production/REFERENCE.md5.4 KB
  • references/providers/REFERENCE.md5.3 KB
  • references/scheduling/REFERENCE.md5.0 KB
  • references/tools/REFERENCE.md7.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Cline SDK Skill

Consolidated skill for building AI agents with the Cline SDK. Use the decision trees below to find the right entry point and API surface, then load detailed references.

Critical Rules

Follow these rules in all Cline SDK code:

  1. Install with npm install @cline/sdk. The @cline/sdk package re-exports everything from @cline/core, @cline/agents, @cline/llms, and @cline/shared.
  2. Requires Node.js 22 or later.
  3. Use createTool() from @cline/sdk (or @cline/shared) to define tools. Tool names must be snake_case.
  4. Return errors as structured data from tool execute functions. Throwing counts as a "mistake" against the agent's mistake limit.
  5. Use lifecycle: { completesRun: true } on tools that should end the agent loop (e.g. a "submit answer" tool).
  6. When using ClineCore, always call dispose() when done to clean up resources.
  7. The standalone Agent and ClineCore have different event systems. For Agent: use agent.subscribe() to get AgentRuntimeEvent types (text streaming is "assistant-text-delta", result text is result.outputText). For ClineCore: use cline.subscribe() to get CoreSessionEvent types (text streaming is "chunk" with payload.type === "text", result text is result.text). There is no top-level onEvent field on AgentRuntimeConfig -- use agent.subscribe() or hooks.onEvent instead. Do not use event types like "content_update" or "content_start" with agent.subscribe() -- those are internal legacy types from the ClineCore adapter layer.

How to Use This Skill

Reference File Structure

The two main API surfaces (Agent and ClineCore) follow a 4-file pattern. Cross-cutting concepts are single-file guides.

Each main API surface in ./references/<api>/ contains:

FilePurposeWhen to Read
REFERENCE.mdOverview, when to use, quick startAlways read first
api.mdFull API: classes, methods, config, typesWriting code
patterns.mdCommon patterns, best practicesImplementation guidance
gotchas.mdPitfalls, limitations, debuggingTroubleshooting

Cross-cutting concepts in ./references/<concept>/ have REFERENCE.md as the entry point.

Reading Order

  1. Start with REFERENCE.md for your chosen API surface
  2. Then read additional files relevant to your task:
    • Writing agent code -> api.md
    • Common patterns -> patterns.md
    • Creating tools -> tools/REFERENCE.md
    • Adding plugins/hooks -> plugins/REFERENCE.md
    • Configuring LLM providers -> providers/REFERENCE.md
    • Streaming events -> events/REFERENCE.md
    • Deploying to production -> production/REFERENCE.md
    • Scheduling agents -> scheduling/REFERENCE.md
    • Multi-agent orchestration -> multi-agent/REFERENCE.md
    • Debugging -> gotchas.md

Example Paths

./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 configuration

Quick Decision Trees

"Which API surface should I use?"

Which 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)

"I need to create tools"

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.md

"I need to handle events"

Events?
+-- 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.md

"I need to configure a model provider"

Providers?
+-- 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.md

"I need plugins or hooks"

Plugins?
+-- 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.md

"I need multi-agent coordination"

Multi-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)

"I need scheduling or automation"

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.md

"I need to go to production"

Production?
+-- 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.md

Troubleshooting Index

  • Agent loop not stopping -> tools/REFERENCE.md (completion tools)
  • Tool errors crashing the agent -> agent/gotchas.md or clinecore/gotchas.md
  • Provider auth failures -> providers/REFERENCE.md
  • Session not persisting -> clinecore/gotchas.md
  • Token usage too high -> production/REFERENCE.md (cost control)
  • Hub connection issues -> clinecore/gotchas.md
  • Plugin not loading -> plugins/REFERENCE.md
  • Events not firing -> events/REFERENCE.md

Product Index

API Surfaces

APIEntry FileDescription
Agent./references/agent/REFERENCE.mdLightweight stateless agent loop
ClineCore./references/clinecore/REFERENCE.mdFull runtime with sessions, persistence, built-in tools

Cross-Cutting Concepts

ConceptEntry FileDescription
Tools./references/tools/REFERENCE.mdBuilt-in and custom tool creation
Plugins./references/plugins/REFERENCE.mdExtension system with hooks
Events./references/events/REFERENCE.mdReal-time streaming events
Providers./references/providers/REFERENCE.mdLLM provider configuration
Production./references/production/REFERENCE.mdDeployment, security, observability
Scheduling./references/scheduling/REFERENCE.mdCron jobs and automation
Multi-Agent./references/multi-agent/REFERENCE.mdTeams and sub-agents

Package Map

PackagePurpose
@cline/sdkEverything you need, install this one
@cline/coreSessions, persistence, built-in tools, config, hub
@cline/agentsStateless agent loop, tool orchestration, streaming
@cline/llmsLLM provider gateway
@cline/sharedTypes, tool helpers, hook engine

Resources

Repository: https://github.com/cline/cline SDK Source: https://github.com/cline/cline/tree/main/sdk Documentation: https://docs.cline.bot/sdk/overview Discord: https://discord.gg/cline

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, PR template usage, and PR creation using the gh CLI tool.

日本語の概要は準備中です。原文の説明を表示しています。

cline/cline7万2026年10月12日 更新

Use when the team wants to catch desktop app users up on recent features with a one-time "What's new" dialog (apps/examples/desktop-app). Guides deciding whether a catch-up is warranted, picking the highlights from the changelog, writing tight copy, adding the entry to webview/lib/whats-new-content.ts, and previewing it from Settings → About. Not for individual releases — those only appear on the About page's release notes.

日本語の概要は準備中です。原文の説明を表示しています。

cline/cline7万2026年10月12日 更新

opentui

無料

Comprehensive OpenTUI skill for building terminal user interfaces. Covers the core imperative API, React reconciler, and Solid reconciler. Use for any TUI development task including components, layout, keyboard handling, animations, and testing.

日本語の概要は準備中です。原文の説明を表示しています。

cline/cline7万2026年10月12日 更新

Use when preparing, tagging, and publishing an apps/cli npm release. Guides changelog drafting, apps/cli/package.json version bumps, cli-vX.Y.Z tags, local npm publishing, and the publish-cli GitHub workflow.

日本語の概要は準備中です。原文の説明を表示しています。

cline/cline7万2026年10月12日 更新

Use when preparing, tagging, and publishing a Cline desktop app (apps/examples/desktop-app) release — stable (desktop-vX.Y.Z from main), beta (desktop-vX.Y.Z-beta.N from desktop-experimental, shipped as the side-by-side "Cline Beta" app), or nightly (artifact-only test build of main's HEAD, tagged desktop-nightly-<stamp> after it builds). Guides changelog drafting, version bumps in package.json + tauri.conf.json, tagging, and the desktop-publish GitHub workflow that builds, signs, notarizes, and updates the per-channel auto-update feed.

日本語の概要は準備中です。原文の説明を表示しています。

cline/cline7万2026年10月12日 更新

Use when releasing the Cline VS Code extension — stable (standalone SDK build of main via ext-vscode-publish), nightly (ext-vscode-publish-nightly, manual dispatch), or an emergency legacy-branch hotfix (ext-vscode-publish-legacy). Guides version selection, changelog, workflow dispatch, environment approvals, tagging, post-publish verification, and the remaining retirement of the finished A/B rollout machinery.

日本語の概要は準備中です。原文の説明を表示しています。

cline/cline7万2026年10月12日 更新

cline のスキルをすべて見る

このスキルの問題を報告する