← Back to Skills Marketplace
touchdeeper

Cline Programming

by 庄庭达 · GitHub ↗ · v1.0.6 · MIT-0
cross-platform ⚠ suspicious
134
Downloads
0
Stars
0
Active Installs
7
Versions
Install in OpenClaw
/install cline-programming
Description
调用Cline AI编程工具的技能。提供plan-check-act工作流程,先让Cline生成代码规划,检查后执行,支持--verbose参数观察进度。
README (SKILL.md)

C-Line 编程技能

通过Cline AI编程工具实现自动化代码生成和执行的技能,支持plan->check->act工作流程。

技能概述

本技能提供了一种结构化的编程方法,通过Cline AI编程工具实现自动化代码生成和执行。采用plan->check->act工作流程,确保代码质量和执行稳定性。

核心功能

1. 代码规划 (Plan)

使用Cline的plan模式生成代码规划,了解任务的实现方案。默认使用--yolo选项启用自动批准模式,避免交互式模式下的超时问题。

使用方法

# 生成代码规划(自动批准模式)
cline task "创建一个简单的Web服务器" --plan --yolo --verbose --json

2. 规划检查 (Check)

检查Cline生成的代码规划,识别潜在问题并进行修改。

使用方法

# 检查代码规划
# 注意:目前需要通过查看生成的规划文档进行手动检查
ls -la plan-*.md
cat plan-*.md

3. 代码执行 (Act)

使用Cline的act模式执行代码,支持--verbose参数观察执行进度。默认使用--yolo选项启用自动批准模式,避免交互式模式下的超时问题。

使用方法

# 执行代码(自动批准模式)
cline task "创建一个简单的Web服务器" --act --yolo --verbose --json

自动批准模式说明:

  • 使用 --yolo 选项会自动批准所有操作,适用于已知安全的简单任务
  • 可以显著提高执行速度,避免交互式模式下的超时问题

完整任务流程

1. 完整任务执行

# 生成代码规划(自动批准模式)
cline task "创建一个简单的计算器程序" --plan --yolo --verbose --json

# 查看并检查代码规划
ls -la plan-*.md
cat plan-*.md

# 执行代码(自动批准模式)
cline task "创建一个简单的计算器程序" --act --yolo --verbose --json

2. 单步执行

# 生成代码规划(自动批准模式)
cline task "爬取并分析股票数据" --plan --yolo --verbose --json

# 检查规划文档
cat plan-2026-04-05.md

# 修改或优化规划(如果需要)
# 使用文本编辑器修改规划文档

# 执行代码(自动批准模式)
cline task "爬取并分析股票数据" --act --yolo --verbose --json

配置选项

Cline配置

在使用Cline之前,需要先进行配置。Cline会在首次使用时提示配置信息,或者通过以下方式手动配置:

# 配置Cline(首次使用时会自动提示)
cline config

# 查看当前配置
cat ~/.cline/config.json

典型配置文件

Cline配置文件位于~/.cline/config.json,典型内容如下:

{
  "actModeApiProvider": "openai",
  "actModeOpenAiModelId": "doubao-seed-2.0-code",
  "autoApprovalSettings": {"version":30,"enabled":true,"favorites":[],"manualApprovals":[]},
  "autoApproveAllToggled": false,
  "autoApprovalTimeout": 300000
}

API凭证配置

Cline需要配置API凭证才能与AI模型通信。配置过程会要求提供API密钥,该密钥会安全地存储在系统密钥链或配置文件中。

# 配置API凭证
cline auth

自动批准模式

对于简单、已知安全的任务,可以使用--yolo选项启用自动批准模式,避免交互式模式下的超时问题。

# 使用自动批准模式执行任务
cline task "创建一个简单的文本文件" --act --yolo --timeout 60 --verbose --json

使用注意事项

  1. 网络连接:需要稳定的网络连接才能与AI模型通信
  2. 执行时间:AI生成代码和规划可能需要较长时间,耐心等待;使用--yolo选项可显著提高速度
  3. 权限控制:Cline会执行生成的代码,确保代码的安全性
  4. 版本更新:定期更新Cline工具以获取最新功能
  5. 超时问题:--yolo选项已默认启用,可有效避免超时问题

技术原理

Cline集成

使用Cline的命令行接口:

  • cline plan - 生成代码规划
  • cline act - 执行代码
  • --verbose - 详细输出模式

任务管理

技能实现了任务队列和状态管理,确保任务的可靠执行。

示例任务

示例1:创建简单Web服务器

# 生成代码规划(自动批准模式)
cline task "创建一个简单的Python Web服务器,使用Flask框架,监听8080端口" --plan --yolo --verbose --json

# 执行代码(自动批准模式)
cline task "创建一个简单的Python Web服务器,使用Flask框架,监听8080端口" --act --yolo --verbose --json

示例2:创建简单文本文件

# 使用自动批准模式创建文本文件(简单任务推荐)
cline task "创建一个名为 'test.txt' 的文本文件,内容为 'Hello Cline'" --act --yolo --timeout 60 --verbose --json

示例3:数据分析脚本

# 生成代码规划(自动批准模式)
cline task "创建一个Python脚本,读取CSV文件并分析数据,生成可视化图表" --plan --yolo --verbose --json

# 执行代码(自动批准模式)
cline task "创建一个Python脚本,读取CSV文件并分析数据,生成可视化图表" --act --yolo --verbose --json

错误处理

规划阶段错误

# 检查网络连接和API密钥
cat ~/.cline/config.json

# 重新生成代码规划(自动批准模式)
cline task "任务描述" --plan --yolo --verbose --json

执行阶段错误

# 查看错误信息
cline task "任务描述" --act --yolo --verbose --json 2>&1

# 检查生成的代码
ls -la generated-code/
cat generated-code/main.py

性能优化

任务拆分

将复杂任务拆分为多个简单任务,提高成功率。

# 任务拆分示例
cline task "创建用户登录功能" --plan --yolo --verbose --json
cline task "创建用户登录功能" --act --yolo --verbose --json

cline task "创建数据存储模块" --plan --yolo --verbose --json
cline task "创建数据存储模块" --act --yolo --verbose --json

规划复用

对常用任务进行规划复用,提高执行效率。

# 保存和复用代码规划
cline task "任务描述" --plan --yolo --verbose --json --save

# 加载之前的规划
cline task "任务描述" --act --yolo --verbose --json --load-plan plan-2026-04-05.md

使用自动批准模式

默认使用--yolo选项,对于已知安全的简单任务,可以显著提高执行速度,避免交互式模式下的超时问题。

重要安全提示: 使用--yolo选项会自动批准所有操作,包括代码执行。请确保您信任任务描述和执行过程,只对已知安全的任务使用此选项。

# 执行简单任务(自动批准模式)
cline task "创建一个简单的Python脚本" --act --yolo --verbose --json

安全注意事项

  1. 代码审查:在执行生成的代码前,仔细审查代码内容
  2. 权限控制:限制Cline的执行权限,避免执行危险代码
  3. 安全配置:配置Cline使用安全的API密钥和模型
  4. 定期更新:定期更新Cline和依赖库以修复安全漏洞

版本更新记录

v1.0.5 (2026-04-05)

  • 添加--json选项作为默认输出格式,便于自动化集成
  • 更新所有示例,使用正确的命令格式:cline task \x3Cprompt> --plan/--act --yolo --verbose --json
  • 重写测试脚本,验证--json选项功能

v1.0.4 (2026-04-05)

  • 修正了Cline命令使用方法,使用正确的cline task --plan/--act格式
  • 避免了之前错误的cline plan/act格式
  • 更新了所有示例和文档

v1.0.3 (2026-04-05)

  • 处理了ClawHub上报的安全警告
  • 删除了未使用的requirements.txt文件
  • 添加了API凭证配置和安全使用说明

v1.0.2 (2026-04-05)

  • 将plan模式也更新为使用--yolo自动批准模式
  • 统一了整个工作流程的模式
  • 添加了详细的配置说明

v1.0.1 (2026-04-05)

  • 添加了--yolo选项(自动批准模式)的说明
  • 区分了交互式模式和自动批准模式的使用场景
  • 提供了完整的使用方法示例

v1.0.0 (2026-04-05)

  • 初始版本
  • 实现plan->check->act工作流程
  • 支持--verbose参数
  • 提供基本的错误处理
  • 示例任务和使用说明
Usage Guidance
This skill is a documentation wrapper for the external 'cline' CLI and appears to do what it says, but it repeatedly recommends using the '--yolo' automatic-approval flag which will run generated code without interactive review — this is the primary risk. Before installing or using the skill: 1) Avoid using --yolo for anything beyond trivial, well-audited tasks; always inspect plan-*.md and generated code before running 'act'. 2) Do not 'cat' or share ~/.cline/config.json unless you understand whether it contains API keys; treat such files as secrets. 3) Install the 'cline' CLI only from a trusted source (check the official homepage or the npm package maintainer) — this skill's source/homepage is unknown. 4) Prefer running tests and first-time executions in an isolated environment (container or VM). If you want this skill to be safer, request the author remove default --yolo usage from examples, add explicit warnings, and provide an official source/repo for the Cline CLI used.
Capability Analysis
Type: OpenClaw Skill Name: cline-programming Version: 1.0.6 This skill wraps the 'cline' AI programming tool and explicitly instructs the agent to use the '--yolo' flag by default in SKILL.md, which enables automatic approval and execution of AI-generated code without human intervention. It also provides instructions for the agent to read sensitive configuration files (e.g., ~/.cline/config.json) containing API keys. While these are features of the underlying CLI tool, promoting an 'auto-approve' workflow for an autonomous agent creates a high risk of unauthorized code execution and credential exposure.
Capability Assessment
Purpose & Capability
Name/description match the content: this is an instruction-only skill that tells the agent how to use the 'cline' CLI to generate (plan), review (check), and execute (act) code. The included test script exercises the same CLI commands. No unrelated binaries, env vars, or installs are requested.
Instruction Scope
The SKILL.md instructs use of --yolo (automatic approval) by default for both plan and act steps and shows examples that run plan and then act non-interactively. That grants the Cline CLI permission to execute generated code without manual review. The doc also suggests cat'ing ~/.cline/config.json for debugging which could expose stored API credentials. The 'check' step is described but in practice examples and test script default to auto-approve, reducing the practical safety of the workflow.
Install Mechanism
No install spec is provided (instruction-only). The test script only checks for an existing 'cline' command and directs to install via npm if missing. This is a low-risk, expected pattern for a CLI-invocation skill.
Credentials
The skill requests no environment variables or credentials itself. However, it relies on the user's Cline configuration (~/.cline/config.json or system keychain) which may contain API keys. The skill's instructions encourage viewing that config, which could expose secrets if followed without care. The lack of explicit credential handling is coherent but still presents an implicit secret-access risk.
Persistence & Privilege
always:false and no special privileges requested. The skill is user-invocable and can be called autonomously per platform defaults, which is normal. It does not try to modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cline-programming
  3. After installation, invoke the skill by name or use /cline-programming
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.6
更新版本更新记录,包含完整的版本历史
v1.0.5
- 增加对 --json 参数的说明和推荐,所有示例命令均加入 --json,明确输出支持结构化处理 - 指南与用法同步更新,推荐在 plan 和 act 阶段均加 --json 以统一格式 - 其余功能、结构、说明无重大变化
v1.0.4
- 修正所有命令行用法,将原有的 `cline plan`/`cline act` 用法更新为推荐的 `cline task ... --plan` 和 `cline task ... --act` 语法 - 相应更新所有代码示例、任务流程与用法说明,保持文档一致性 - 其余内容未做实质更改
v1.0.3
- Updated SKILL.md: clarified配置与API凭证的说明,增加首次配置、命令和配置文件位置说明,优化自动批准和安全模式说明。 - Removed requirements.txt (no longer needed). - 内容组织更加清晰,配置和安全提示部分更完善,使用说明更详细易用。
v1.0.2
**新增自动批准模式,优化易用性与超时处理:** - 默认流程新增 --yolo 选项,自动批准操作,显著降低交互式超时风险 - 所有示例命令及推荐写法均采用 --yolo,简化执行流程 - 配置说明及注意事项增加自动批准模式与相关参数说明 - 新增简单任务的自动批准模式示例 - 明确指出 --yolo 适用于已知安全任务,强调安全性和代码审查 - 更新配置文件示例,突出 autoApproval 相关设置
v1.0.1
No user-facing changes in this version. - Updated metadata only. - No changes to functionality or documentation content.
v1.0.0
C-Line 编程技能 v1.0.0 - 初始版本发布 - 实现plan->check->act自动化工作流程,通过Cline AI生成、检查并执行代码 - 支持--verbose参数,实时观察进度 - 提供常用示例、配置说明和错误处理建议 - 包含安全与性能优化提示
Metadata
Slug cline-programming
Version 1.0.6
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 7
Frequently Asked Questions

What is Cline Programming?

调用Cline AI编程工具的技能。提供plan-check-act工作流程,先让Cline生成代码规划,检查后执行,支持--verbose参数观察进度。 It is an AI Agent Skill for Claude Code / OpenClaw, with 134 downloads so far.

How do I install Cline Programming?

Run "/install cline-programming" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cline Programming free?

Yes, Cline Programming is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cline Programming support?

Cline Programming is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cline Programming?

It is built and maintained by 庄庭达 (@touchdeeper); the current version is v1.0.6.

💬 Comments