cline-sdk
하는 일
이 스킬은 사용자 정의 도구부터 완전한 운영 환경 구성까지, Cline SDK로 AI 에이전트를 만드는 방법을 설명합니다. 자신만의 에이전트 소프트웨어를 만들려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Cline SDK로 AI 에이전트를 만들고 싶은 개발자가 있을 때.
- ✓Cline 기반 에이전트에 사용자 정의 도구나 이벤트가 필요할 때.
- ✓Cline SDK로 다중 에이전트 팀이나 예약 에이전트를 계획할 때.
스킬 링크
https://github.com/cline/cline/blob/main/.agents/skills/cline-sdk/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“사용자 정의 도구를 쓰는 작은 AI 에이전트를 Node.js로 만들고 싶습니다. Cline SDK는 어떻게 시작하나요?”
매주 새 스킬 5개. 읽는 데 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로 설치합니다.
도구는 어떻게 정의하나요?
스킬은 snake_case 이름과 구조화된 오류 결과를 사용해 createTool을 쓰라고 말합니다.
에이전트가 팀으로 일할 수 있나요?
네. 스킬은 다중 에이전트 팀을 주요 주제 중 하나로 다룹니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-pull-request
71k에이전트가 프로젝트 템플릿을 따르고 브랜치를 먼저 확인해, 명확한 제목과 설명으로 GitHub 풀 리퀘스트를 만들도록 돕습니다.
opentui
71k에이전트가 OpenTUI로 터미널 사용자 인터페이스를 만드는 것을 돕습니다. 레이아웃, 키보드 처리, 컴포넌트, 애니메이션, 테스트를 다룹니다.
tuistory
71k에이전트가 백그라운드 세션에서 터미널 앱을 조작하고 테스트하도록 가르칩니다. 명령을 입력하고 화면을 읽으며, 디스플레이가 없어도 작동합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.