首页龙虾技能列表 › Claude Code Controller — 技能工具

Claude Code Controller — 技能工具

v1.0.0

控制和管理 Claude Code 编码助手,支持项目感知编码、代码审查、重构和功能实现。使用 ACP 运行时在隔离会话中执行 Claude Code 任务,或在主会话中管理配置和项目上下文。

1· 375·1 当前·1 累计
by @rocherkong (Rocher)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/12
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill's instructions and files match a Claude Code controller, but the package metadata omits required environment/config declarations and it references home/system paths and example connectors that raise proportionality and scope questions.
评估建议
Before installing or enabling this skill: - Expect it to require an Anthropic API key (ANTHROPIC_API_KEY) and to read/write ~/.claude/* files; the metadata currently does not declare these — treat that as a red flag and confirm with the author. - Inspect and if needed sandbox the included scripts (scripts/launch-claudecode.sh) before running; it will create project/.claude/settings.json and invoke the claude CLI. - Only install @anthropic-ai/claude-code from the official registry and verify pack...
详细分析 ▾
用途与能力
The skill's name, description, SKILL.md, and the provided launch script consistently implement a controller for Anthropic Claude Code (installing/using the claude CLI, configuring ~/.claude, running tasks). However the metadata claims no required env vars or config paths while the runtime docs and script clearly require ANTHROPIC_API_KEY and rely on ~/.claude files — this discrepancy is unexpected and should be justified.
指令范围
SKILL.md instructs the agent/user to install and run the claude CLI, create and edit project-level ~/.claude/settings.json, read logs (~/.claude/logs/latest.log) and run claude in interactive/ACP sessions. Those actions are consistent with a controller, but they grant the skill access to user home config, logs, and (via MCP examples) potentially databases or filesystem bridges. The instructions also reference absolute/root-like paths in docs (e.g., /root/.openclaw/workspace) which implies assumptions about environment privileges.
安装机制
There is no automatic install spec in the skill bundle (instruction-only). SKILL.md recommends installing @anthropic-ai/claude-code via npm (a normal public registry package). The included shell script is simple and does not download arbitrary archives or external payloads. No high-risk download URLs or extract steps are present.
凭证需求
The metadata declares no required environment variables, yet SKILL.md and scripts require ANTHROPIC_API_KEY and reference other env examples (ANTHROPIC_MODEL, DATABASE_URL in MCP examples). This mismatch is disproportionate and could lead to implicit credential use. The skill also expects to read/write ~/.claude config and logs — access that should be explicitly declared and limited.
持久化与权限
The skill does not request always:true and does not include install-time mechanisms that modify other skills. The launch script writes a project-local .claude/settings.json if missing; that is normal for a tooling helper. No evidence the skill attempts to change system-wide agent config or persist credentials beyond normal config files.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/10

控制和管理 Claude Code 编码助手,支持项目感知编码、代码审查、重构和功能实现

● 无害

安装命令 点击复制

官方npx clawhub@latest install claudecode-controller
镜像加速npx clawhub@latest install claudecode-controller --registry https://cn.clawhub-mirror.com

技能文档

本技能提供对 Anthropic Claude Code 的完整控制,让你能够在 OpenClaw 环境中高效使用 Claude 进行代码开发。

核心能力

  • 项目感知编码 - Claude Code 理解你的项目结构和上下文
  • 代码审查 - 自动审查 PR、提供改进建议
  • 重构辅助 - 安全地重构现有代码
  • 功能实现 - 从需求描述到完整实现
  • 调试帮助 - 定位和修复 bug
  • 文档生成 - 自动生成代码文档

使用方式

模式选择

模式用途命令
ACP 隔离会话长时间编码任务、需要独立上下文/claudecode <任务描述>
主会话管理配置管理、快速查询、项目设置/claudecode-config <操作>

基本命令

# 启动 Claude Code 进行编码任务
/claudecode 帮我实现一个用户登录功能,使用 JWT 认证

# 代码审查 /claudecode 审查这个 PR 的代码质量,检查潜在问题

# 重构代码 /claudecode 重构这个模块,提高可维护性和性能

# 调试帮助 /claudecode 帮我找出这个 bug 的原因并修复

配置管理

设置 Claude Code

  • 安装 Claude Code CLI (如未安装):
npm install -g @anthropic-ai/claude-code
  • 配置 API 密钥:
# 设置环境变量
export ANTHROPIC_API_KEY="your-api-key"

# 或在 ~/.claude/config.json 中配置

  • 验证安装:
claude --version

项目配置

在项目根目录创建 .claude/settings.json:

{
  "model": "claude-sonnet-4-5-20250929",
  "allowedTools": ["bash", "edit", "write", "read"],
  "maxTurns": 50,
  "permissionMode": "auto"
}

工作流程

1. 代码开发流程

需求分析 → 方案设计 → 代码实现 → 测试验证 → 代码审查

示例对话:

用户:帮我创建一个 REST API,包含用户 CRUD 操作
Claude: 我将使用 Express.js 创建 API,包含以下端点:
  - POST /users - 创建用户
  - GET /users/:id - 获取用户
  - PUT /users/:id - 更新用户
  - DELETE /users/:id - 删除用户
  开始实现...

2. 代码审查流程

代码加载 → 静态分析 → 问题识别 → 建议生成 → 修复实施

审查要点:

  • 代码风格和一致性
  • 潜在 bug 和边界情况
  • 性能优化机会
  • 安全漏洞检查
  • 测试覆盖率

3. 重构流程

代码分析 → 识别改进点 → 制定重构计划 → 安全重构 → 验证测试

常见重构:

  • 提取函数/类
  • 简化条件逻辑
  • 优化数据结构
  • 改进命名和文档

最佳实践

提示词技巧

  • 具体明确: 清晰描述需求和约束
  • 提供上下文: 说明项目背景和技术栈
  • 分步执行: 复杂任务分解为小步骤
  • 验证输出: 审查生成的代码是否符合预期

安全注意事项

  • 权限控制: 限制 Claude Code 的文件访问范围
  • 代码审查: 始终审查生成的代码后再提交
  • 敏感信息: 不要将 API 密钥等敏感信息放入代码
  • 版本控制: 使用 git 跟踪所有更改

故障排除

常见问题

问题解决方案
API 密钥错误检查 ANTHROPIC_API_KEY 环境变量
命令未找到确认已安装 @anthropic-ai/claude-code
权限被拒绝检查 .claude/settings.json 中的 allowedTools
超时错误增加 maxTurns 配置或使用更小的任务

日志和调试

# 查看 Claude Code 日志
cat ~/.claude/logs/latest.log

# 调试模式运行 claude --debug

高级功能

多模型支持

{
  "models": {
    "default": "claude-sonnet-4-5-20250929",
    "complex": "claude-opus-4-5-20250929",
    "quick": "claude-haiku-4-5-20250929"
  }
}

自定义工具

创建自定义工具脚本放在 ~/.claude/tools/:

#!/bin/bash
# ~/.claude/tools/run-tests.sh
npm test "$@"

项目模板

使用预定义模板快速启动项目:

claude --template express-api
claude --template react-app
claude --template python-package

与 OpenClaw 集成

ACP 会话使用

当使用 ACP 运行时,Claude Code 将在隔离会话中执行:

用户请求 → OpenClaw → ACP 会话 → Claude Code → 结果返回

优势:

  • 独立上下文,不污染主会话
  • 可配置超时和模型
  • 支持长时间运行任务

主会话管理

在主会话中管理配置和项目设置:

  • 查看和修改配置
  • 管理项目上下文
  • 查看历史记录
  • 快速查询和统计

参考资源

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务