Cline
IDE extensionCline Bot Inc.
Open-source AI coding agent for VS Code (plus CLI and SDK) with Plan/Act modes, MCP support, and human-in-the-loop approval of every file change and command.
MCP
SupportedConfigure MCP servers in cline_mcp_settings.json under the mcpServers key (editable via the MCP Servers panel). Supports local stdio servers and remote servers over Streamable HTTP or legacy SSE.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
~/.cline/data/settings/cline_mcp_settings.jsonShared by the VS Code extension, CLI, and SDK. Open via MCP Servers > Configure > Configure MCP Servers in the extension. | Global | json | mcpServers |
~/.cline/mcp.jsonCLI MCP config (cline mcp wizard). | Global | json | mcpServers |
.cline/mcp.jsonProject-level MCP server config (documented in the CLI reference). | Project | json | mcpServers |
Fields
| Field | Type | Description |
|---|---|---|
command | string | Command to start a local (stdio) server. |
args | string[] | Arguments passed to the command. |
env | record<string, string> | Environment variables for the server. |
url | string | Endpoint URL for a remote server. |
type | "streamableHttp" | "sse" | Remote transport type. Defaults to legacy sse when omitted. |
headers | record<string, string> | HTTP headers for a remote server (e.g. Authorization). |
disabled | boolean | Toggle a server off without deleting it. |
autoApprove | string[] | Tool names that run without per-call approval. |
Capabilities
Examples
{
"mcpServers": {
"local-server": {
"command": "node",
"args": ["/path/to/server.js"],
"env": { "API_KEY": "your_api_key" },
"disabled": false,
"autoApprove": []
}
}
}{
"mcpServers": {
"remote-server": {
"type": "streamableHttp",
"url": "https://example.com/mcp",
"headers": { "Authorization": "Bearer your-token" },
"disabled": false,
"autoApprove": []
}
}
}- •Omitting type on a remote server defaults to the legacy sse transport; set type to streamableHttp explicitly for the recommended transport.
- •The Cline CLI reads ~/.cline/mcp.json and .cline/mcp.json (project) with the same server definitions; the extension shares config under ~/.cline/data/.
- •Legacy installs stored the file in VS Code globalStorage (saoudrizwan.claude-dev/settings/cline_mcp_settings.json); the extension migrates it to ~/.cline/data/settings/.
- •OAuth credentials for remote servers are stored under each server's oauth key (managed by the extension, verified from source).
- •Per-tool auto-approval via the autoApprove array; the Auto Approve setting 'Use MCP servers' gates MCP tools and resources globally.
Skills
SupportedSKILL.md skill folders with progressive loading: only name and description (~100 tokens) load at startup; the full instructions load when Cline triggers the skill via the use_skill tool or you invoke it as a slash command.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.cline/skills/<name>/SKILL.mdRecommended project location; commit to share with your team. .clinerules/skills/ and .claude/skills/ are also discovered. | Project | markdown | — |
~/.cline/skills/<name>/SKILL.mdGlobal skills available across all projects. | Global | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
name* | string | Skill identifier; must exactly match the directory name. Use kebab-case. |
description* | string | Tells Cline when to use the skill (max 1024 characters). Determines automatic triggering. |
Examples
---
name: data-analysis
description: Analyze data files and generate insights. Use when working with CSV, Excel, or JSON data files that need exploration, cleaning, or visualization.
---
# Data Analysis
When analyzing data files, follow this process:
## 1. Understand the Data
- Read a sample of the file to understand its structure
- Identify column types and data quality issues- •Skills can bundle supporting files (docs/, templates/, scripts/) that load only as needed; script output enters context, not the script itself.
- •Every skill has an enable/disable toggle in the Skills menu; skills are enabled by default when discovered.
- •When a global and project skill share a name, the global skill takes precedence.
- •Keep SKILL.md under ~5k tokens; split detail into docs/ files referenced from the instructions.
Rules
SupportedMarkdown rule files in .clinerules/ (workspace) and a global Cline Rules directory, with per-file enable/disable toggles and optional paths frontmatter for conditional activation. Cursor rules, Windsurf rules, and AGENTS.md are auto-detected.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.clinerules/Primary format: directory of .md/.txt rule files at the project root (a single .clinerules file also works). | Project | markdown | — |
AGENTS.mdStandard cross-tool format, auto-detected at the project root. | Project | markdown | — |
~/Documents/Cline/Rules/Global rules directory (Windows: Documents\Cline\Rules). ~/.cline/rules/ is also read. | Global | markdown | — |
~/.agents/AGENTS.mdCross-tool global AGENTS instructions. | Global | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
paths | string[] | Frontmatter glob patterns that scope the rule; it activates when any pattern matches a file in the current context. Empty array disables the rule. |
Examples
---
paths:
- "src/components/**"
- "src/hooks/**"
---
# React Component Guidelines
When creating or modifying React components:
- Use functional components with React hooks
- Extract reusable logic into custom React hooks- •Cline processes all .md and .txt files inside .clinerules/, combining them into a unified rule set; workspace rules win over global rules on conflict.
- •Conditional rules use YAML frontmatter with a paths array of globs, matched against open tabs, visible files, files mentioned in your prompt, and files Cline edits. Rules without frontmatter are always active.
- •Cross-tool formats are auto-detected: .cursorrules, .windsurfrules, AGENTS.md, and global ~/.agents/AGENTS.md.
- •The /newrule slash command creates a rule interactively; the CLI/SDK also read global rules from ~/.cline/rules/.
- •On Linux/WSL the global directory may be ~/Cline/Rules if ~/Documents/Cline/Rules does not exist.
Hooks
SupportedExecutable hook scripts named after lifecycle events, placed in .clinerules/hooks/ (workspace) or the global hooks directory. Hooks receive event JSON on stdin and return JSON on stdout that can block execution or inject context.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.clinerules/hooks/<EventName>Executable script in any language with a shebang. File name must equal the event name, e.g. .clinerules/hooks/PreToolUse. | Project | executable | — |
~/Documents/Cline/Hooks/<EventName>Executable script, applies to all workspaces (see format caveat above). The CLI also reads ~/.cline/hooks/. | Global | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
cancel* | boolean | Hook output: false to continue, true to block execution and surface errorMessage. |
contextModification | string | Hook output: context added to the conversation for future AI decisions (max 50KB). |
errorMessage | string | Hook output: error details shown when blocking. |
Examples
#!/usr/bin/env bash
input=$(cat)
tool_name=$(echo "$input" | jq -r '.preToolUse.toolName')
path=$(echo "$input" | jq -r '.preToolUse.parameters.path // ""')
if [[ "$tool_name" == "write_to_file" && "$path" == *.js ]]; then
echo '{"cancel": true, "errorMessage": "Use .ts files only"}'
exit 0
fi
echo '{"cancel": false}'- •Hooks must be enabled via the 'Enable Hooks' checkbox in Cline settings (Feature Settings).
- •Hook files carry no extension, need a shebang, and must be executable; Windows is not currently supported. Verified from the official repo's .clinerules/hooks/README.md.
- •Output JSON: { cancel, contextModification, errorMessage }. cancel: true blocks execution; contextModification (max 50KB) affects future AI decisions, not the current tool call.
- •TaskComplete and PreCompact are documented as 'coming soon'. All matching hooks (global + workspace) run concurrently; if any returns cancel: true, the action is blocked.
- •Default timeout is 30 seconds. The CLI also reads ~/.cline/hooks/ and a directory set via --hooks-dir / CLINE_HOOKS_DIR; the docs site's hooks page additionally covers SDK plugin lifecycle hooks (beforeTool, afterRun, etc.).
Commands
SupportedBuilt-in slash commands (/newtask, /smol, /newrule, /deep-planning, /reportbug), plus user-defined workflows: markdown files invoked by filename (e.g. /release.md) and enabled skills triggered as slash commands.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.clinerules/workflows/*.mdWorkspace workflows, version-controlled with the repo. | Project | markdown | — |
~/Documents/Cline/Workflows/*.mdGlobal workflows for all projects (Windows: Documents\Cline\Workflows). | Global | markdown | — |
Examples
1. Check out the PR branch: `gh pr checkout [id]`
2. Run the test suite and note any failures
3. Review the diff against our coding standards
4. Summarize findings and suggest changes- •Workflows are manual-only markdown step lists; type / in chat to see autocomplete for built-ins, workflows, and enabled skills.
- •Workflow files can reference Cline's built-in tools (e.g. ask_followup_question), CLI tools, and MCP tools, and chain steps in sequence.
- •Workspace workflows take precedence over global workflows with the same name; each workflow has an enable/disable toggle in the Workflows tab.
- •Workspace workflow location .clinerules/workflows/ verified from the official repo; the CLI/SDK also resolve global workflows from ~/.cline/data/workflows/.
- •/smol has alias /compact.
Settings
PartialExtension behavior (Auto Approve permissions, YOLO Mode, feature toggles) is configured through the Cline settings UI; persistent configuration lives under ~/.cline/ in documented settings files shared by the IDE extension, CLI, and SDK.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
~/.cline/data/settings/global-settings.jsonGlobal settings shared across Cline applications (IDE, CLI, SDK). | Global | json | — |
~/.cline/data/settings/providers.jsonAPI keys and model provider configuration. | Global | json | — |
.cline/Project config root (rules/, skills/, hooks/, plugins/, mcp.json); directories hold markdown/scripts rather than a single JSON settings file. | Project | json | — |
Fields
| Field | Type | Description |
|---|---|---|
CLINE_COMMAND_PERMISSIONS | string (JSON) | Environment variable restricting shell commands: { allow: string[], deny: string[], allowRedirects: boolean }. |
CLINE_DATA_DIR | string | Environment variable overriding the data directory (default ~/.cline/data). |
Examples
{
"allow": ["npm *", "git *"],
"deny": ["rm -rf *"],
"allowRedirects": false
}- •Auto Approve is evaluated per tool call with per-category permissions (read/edit project or all files, safe/all commands, browser, MCP); YOLO Mode auto-approves everything.
- •Field-level schemas for global-settings.json and providers.json are not documented; the directory layout is.
- •CLINE_COMMAND_PERMISSIONS env var applies a JSON allow/deny policy for shell commands, e.g. {"allow": ["npm *"], "deny": ["rm -rf *"]}; deny overrides allow.
- •CLINE_DATA_DIR overrides the data directory; enterprise deployments add remote-managed provider config and controls (YOLO Mode lockdown, MCP allowlists).