cline-sdk
यह क्या करती है
यह स्किल बताती है कि Cline SDK से AI एजेंट कैसे बनाए जाते हैं, कस्टम टूल से लेकर पूरे प्रोडक्शन सेटअप तक। यह उन डेवलपर्स के लिए है जो अपना एजेंट सॉफ़्टवेयर बनाना चाहते हैं।
कब इस्तेमाल करें
- ✓जब कोई डेवलपर Cline SDK से AI एजेंट बनाना चाहे।
- ✓जब किसी को Cline पर बने एजेंट के लिए कस्टम टूल या इवेंट चाहिए।
- ✓जब Cline SDK से मल्टी-एजेंट टीम या शेड्यूल्ड एजेंट की योजना बनानी हो।
Skill का लिंक
https://github.com/cline/cline/blob/main/.agents/skills/cline-sdk/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं Node.js में कस्टम टूल इस्तेमाल करने वाला एक छोटा AI एजेंट बनाना चाहता हूँ। Cline SDK से कैसे शुरू करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट सही प्रवेश बिंदु चुनने के लिए निर्णय गाइड इस्तेमाल करता है, फिर टूल, सेशन और इवेंट के नियमों का पालन करता है। प्रोजेक्ट को जिन हिस्सों की ज़रूरत है, उनके लिए वह विस्तृत गाइड लोड करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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:
- Install with
npm install @cline/sdk. The@cline/sdkpackage re-exports everything from@cline/core,@cline/agents,@cline/llms, and@cline/shared. - Requires Node.js 22 or later.
- Use
createTool()from@cline/sdk(or@cline/shared) to define tools. Tool names must besnake_case. - Return errors as structured data from tool
executefunctions. Throwing counts as a "mistake" against the agent's mistake limit. - Use
lifecycle: { completesRun: true }on tools that should end the agent loop (e.g. a "submit answer" tool). - When using
ClineCore, always calldispose()when done to clean up resources. - The standalone
AgentandClineCorehave different event systems. ForAgent: useagent.subscribe()to getAgentRuntimeEventtypes (text streaming is"assistant-text-delta", result text isresult.outputText). ForClineCore: usecline.subscribe()to getCoreSessionEventtypes (text streaming is"chunk"withpayload.type === "text", result text isresult.text). There is no top-levelonEventfield onAgentRuntimeConfig-- useagent.subscribe()orhooks.onEventinstead. Do not use event types like"content_update"or"content_start"withagent.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:
| File | Purpose | When to Read |
|---|---|---|
REFERENCE.md |
Overview, when to use, quick start | Always read first |
api.md |
Full API: classes, methods, config, types | Writing code |
patterns.md |
Common patterns, best practices | Implementation guidance |
gotchas.md |
Pitfalls, limitations, debugging | Troubleshooting |
Cross-cutting concepts in ./references/<concept>/ have REFERENCE.md as the entry point.
Reading Order
- Start with
REFERENCE.mdfor your chosen API surface - 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
- Writing agent code ->
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 t
अक्सर पूछे जाने वाले सवाल
SDK को क्या चाहिए?
स्किल Node.js 22 या उसके बाद का संस्करण और npm install @cline/sdk से इंस्टॉलेशन बताती है।
टूल कैसे परिभाषित होते हैं?
स्किल createTool इस्तेमाल करने, snake_case नाम रखने और संरचित एरर नतीजे देने को कहती है।
क्या एजेंट टीमों में काम कर सकते हैं?
हाँ। स्किल मल्टी-एजेंट टीमों को अपने विषयों में से एक के रूप में कवर करती है।
जानकारी
लेखक का मूल विवरण
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.
repo: cline/cline
लोकप्रियता
- GitHub स्टार
- 71k
- रैंकिंग में स्थान
- #3105
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-pull-request
71kयह आपके एजेंट को साफ़ शीर्षक और विवरण के साथ GitHub pull request बनाने में मदद करती है, प्रोजेक्ट के टेम्पलेट का पालन करते हुए और पहले ब्रांच जाँचते हुए।
opentui
71kयह आपके एजेंट को OpenTUI से टर्मिनल यूज़र इंटरफ़ेस बनाने में मदद करती है, जिसमें लेआउट, कीबोर्ड हैंडलिंग, कंपोनेंट, एनिमेशन और टेस्टिंग शामिल हैं।
tuistory
71kयह आपके एजेंट को बैकग्राउंड सेशन में टर्मिनल ऐप चलाना और टेस्ट करना सिखाती है, कमांड टाइप करते हुए और स्क्रीन पढ़ते हुए, डिस्प्ले के बिना भी।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।