# Cline Mastery

> Cline (Claude Dev) VS Code extension -- autonomous coding agent, MCP integration, checkpoints, .clinerules, browser automation, and approval workflow.

- Skill: `leolin990405/cline-mastery` (Agent Skill)
- Install (CLI): `npx get-skill add leolin990405/cline-mastery`
- Raw SKILL.md: https://api.skillmd.com/api/skills/leolin990405/cline-mastery/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: LeoLin990405 (https://skillmd.com/u/leolin990405)
- Updated: 2026-11-11
- Page: https://skillmd.com/skills/leolin990405/cline-mastery

---


# Cline (Claude Dev) Mastery

## Architecture

Open-source VS Code extension implementing an **autonomous coding agent** with human-in-the-loop approval for every action.

## Capabilities

| Feature | Description |
|---------|-------------|
| File Operations | Create, read, edit with integrated diff viewing |
| Terminal | Execute commands with real-time output monitoring |
| Browser | Headless browser: click, type, scroll, screenshot |
| AST Parsing | Code analysis via AST + regex search |
| Self-Correction | Auto-fixes compilation/linting errors |
| Cost Tracking | Token usage and API cost per task loop |
| Checkpoints | Snapshot at each step, restore previous states |

## Model Support

OpenRouter, Anthropic, OpenAI, Gemini, Bedrock, Azure, Vertex, Cerebras, Groq, plus any OpenAI-compatible API or local models (Ollama/LM Studio).

## Configuration

### .clinerules (single file)

```
## Code Style
- Use TypeScript strict mode
- Prefer functional components
- All async functions must have try/catch

## Workflow
- Always run tests after changes
- Create descriptive commit messages
```

### .clinerules/ (directory)

```
.clinerules/
  typescript.md
  testing.md
  architecture.md
```

### MCP Server Config

```json
{
  "mcpServers": {
    "jira": {
      "command": "npx",
      "args": ["-y", "@my/jira-mcp-server"],
      "env": {
        "JIRA_URL": "https://myorg.atlassian.net",
        "JIRA_TOKEN": "${JIRA_TOKEN}"
      }
    }
  }
}
```

### Context Mentions

| Mention | Purpose |
|---------|---------|
| `@url` | Fetch web content as markdown |
| `@problems` | Workspace errors/warnings |
| `@file` | Pre-load specific files |
| `@folder` | Pre-load folder contents |

## MCP Server Creation

Cline can create MCP servers on demand:
1. Say "add a tool that does X"
2. Cline creates a tailored MCP server
3. Auto-installs into the extension
4. Tools available for future tasks

## Best Practices

1. Use `.clinerules/` directory for modular rules
2. Leverage MCP for external integrations (Jira, AWS)
3. Use checkpoints before risky operations
4. Pre-load files with `@file` to reduce API calls
5. Configure auto-approve for safe commands
6. Monitor cost tracking to optimize token usage

## Sources

- [Cline GitHub](https://github.com/cline/cline)
- [Cline Docs](https://docs.cline.bot/)
- [MCP Config](https://docs.cline.bot/mcp/configuring-mcp-servers)

