File contents Operational Steps
确认输入参数完整
执行核心操作(参考本目录下的 scripts/ 或 references/)
验证输出符合契约
保存结果并报告
Pitfalls
-
-
Verification
-
-
-
-
1.
2.
3.
IO_CONTRACT
input : request: str, context: dict — 用户请求描述、上下文信息
output : result: dict — 技能执行结果(结构因技能而异)
对应原则:P2(机械原子暴露输入输出规范)
Claude Code Delegation
Delegate software development tasks to Claude Code CLI.
Setup
npm install -g @anthropic-ai/claude-code
# or via pip
pip install claude-code-cli
Usage
# 直接运行(PTY模式)
claude
# 单次任务
claude "Implement feature X in file Y"
# 带上下文
claude --context "Project structure: ..." "Add unit tests for Z"
# PR审查
claude "Review this PR, check for bugs and security issues"
# 后台任务
terminal(command="claude 'Task description'", background=true, pty=true, notify_on_complete=true)
模式
模式
场景
命令
REPL
交互式编码
claude (pty=true)
单次
特定任务
claude "task"
审查
代码评审
claude "review PR"
批量
批量修改
delegate_task + claude
注意事项
需要 pty=true(PTY模式),否则挂起
长任务用 background=true + notify_on_complete
确认claude CLI已安装: which claude
Reference
Reference
references/setup-guide.md — 安装和配置
references/best-practices.md — 任务拆分和上下文管理
相关技能
codex-cli — Codex CLI 配置与远程部署(主力编码代理,Responses API)
opencode — OpenCode CLI(轻量替代,Chat Completions API)
验证清单 · VERIFICATION
约束规则 · RULES
输入约束 : 参数类型、范围、格式必须校验
输出约束 : 返回值结构、编码、命名必须一致
异常约束 : 错误信息必须包含上下文和恢复建议
安全约束 : 不执行未验证的任意代码,不暴露内部状态
Golden 集合 · GOLDEN SET
Golden Input : 标准输入样本(覆盖正常路径)
Golden Output : 预期输出(精确匹配或格式校验)
Golden Error : 预期错误信息(覆盖失败路径)
Golden 集合是测试的单一真理来源。所有改进必须通过 golden 测试。
违反规则的操作视为不安全,必须拒绝或隔离。
每项验证必须可执行、可记录、可复现。验证失败时记录原因和修复。
Claude Code
Genes (策略基因)
紧凑策略表示。条件→策略。需要深度时参考完整文档。
[CLAU-001] 执行 Claude Code CLI 命令 → 必须启用 pty=true 模式以防止进程挂起
[CLAU-002] 处理长耗时编码任务 → 使用 background=true 并设置 notify_on_complete 实现异步通知
[CLAU-003] 执行特定功能开发或重构 → 采用单次任务模式 claude "task" 并附带明确的项目上下文
[CLAU-004] 进行代码审查或安全扫描 → 使用专门的审查指令 claude "review PR" 聚焦于 Bug 和安全问题
[CLAU-005] 开始执行前 → 必须通过 which claude 验证 CLI 工具已正确安装
[CLAU-006] 处理复杂或批量修改需求 → 结合 delegate_task 机制进行任务拆分与上下文管理
1 --- 2 name: claude-code 3 description: claude-code 4 license: MIT 5 --- 6 7 8 ## Operational Steps 9 1. 确认输入参数完整 10 2. 执行核心操作(参考本目录下的 scripts/ 或 references/) 11 3. 验证输出符合契约 12 4. 保存结果并报告 13 14 ## Pitfalls 15 - 16 - 17 18 ## Verification 19 - 20 - 21 - 22 - 23 1. 24 2. 25 3. 26 ## IO_CONTRACT 27 28 - **input**: `request: str, context: dict` — 用户请求描述、上下文信息 29 - **output**: `result: dict — 技能执行结果(结构因技能而异)` 30 31 > 对应原则:P2(机械原子暴露输入输出规范) 32 33 # Claude Code Delegation 34 35 Delegate software development tasks to Claude Code CLI. 36 37 ## Setup 38 39 ```bash 40 npm install -g @anthropic-ai/claude-code 41 # or via pip 42 pip install claude-code-cli 43 ``` 44 45 ## Usage 46 47 ```bash 48 # 直接运行(PTY模式) 49 claude 50 51 # 单次任务 52 claude "Implement feature X in file Y" 53 54 # 带上下文 55 claude --context "Project structure: ..." "Add unit tests for Z" 56 57 # PR审查 58 claude "Review this PR, check for bugs and security issues" 59 60 # 后台任务 61 terminal(command="claude 'Task description'", background=true, pty=true, notify_on_complete=true) 62 ``` 63 64 ## 模式 65 66 | 模式 | 场景 | 命令 | 67 |:-----|:-----|:------| 68 | REPL | 交互式编码 | `claude` (pty=true) | 69 | 单次 | 特定任务 | `claude "task"` | 70 | 审查 | 代码评审 | `claude "review PR"` | 71 | 批量 | 批量修改 | delegate_task + claude | 72 73 ## 注意事项 74 75 - 需要 `pty=true`(PTY模式),否则挂起 76 - 长任务用 `background=true + notify_on_complete` 77 - 确认claude CLI已安装: `which claude` 78 79 ## Reference 80 ## Reference 81 - `references/setup-guide.md` — 安装和配置 82 - `references/best-practices.md` — 任务拆分和上下文管理 83 84 ## 相关技能 85 - `codex-cli` — Codex CLI 配置与远程部署(主力编码代理,Responses API) 86 - `opencode` — OpenCode CLI(轻量替代,Chat Completions API) 87 88 ## 验证清单 · VERIFICATION 89 90 - [ ] `which claude` 确认 CLI 已安装(npm 全局或 pip) 91 - [ ] 交互/REPL 模式已设 `pty=true`,无挂起 92 - [ ] 长任务已用 `background=true` + `notify_on_complete` 93 - [ ] 单次任务 `claude "task"` 携带了明确的项目上下文 94 - [ ] 审查任务使用了聚焦 Bug/安全的 review 指令 95 96 ## 约束规则 · RULES 97 98 1. **输入约束**: 参数类型、范围、格式必须校验 99 2. **输出约束**: 返回值结构、编码、命名必须一致 100 3. **异常约束**: 错误信息必须包含上下文和恢复建议 101 4. **安全约束**: 不执行未验证的任意代码,不暴露内部状态 102 103 ## Golden 集合 · GOLDEN SET 104 105 - **Golden Input**: 标准输入样本(覆盖正常路径) 106 - **Golden Output**: 预期输出(精确匹配或格式校验) 107 - **Golden Error**: 预期错误信息(覆盖失败路径) 108 109 > Golden 集合是测试的单一真理来源。所有改进必须通过 golden 测试。 110 111 > 违反规则的操作视为不安全,必须拒绝或隔离。 112 113 > 每项验证必须可执行、可记录、可复现。验证失败时记录原因和修复。 114 115 # Claude Code 116 117 ## Genes (策略基因) 118 119 > 紧凑策略表示。条件→策略。需要深度时参考完整文档。 120 121 - **[CLAU-001]** 执行 Claude Code CLI 命令 → 必须启用 `pty=true` 模式以防止进程挂起 122 - **[CLAU-002]** 处理长耗时编码任务 → 使用 `background=true` 并设置 `notify_on_complete` 实现异步通知 123 - **[CLAU-003]** 执行特定功能开发或重构 → 采用单次任务模式 `claude "task"` 并附带明确的项目上下文 124 - **[CLAU-004]** 进行代码审查或安全扫描 → 使用专门的审查指令 `claude "review PR"` 聚焦于 Bug 和安全问题 125 - **[CLAU-005]** 开始执行前 → 必须通过 `which claude` 验证 CLI 工具已正确安装 126 - **[CLAU-006]** 处理复杂或批量修改需求 → 结合 `delegate_task` 机制进行任务拆分与上下文管理
yakeworld/Synthos/tree/main/skills/extended/external-automation/automation-skills/autonomous-ai-agents/claude-code commit 21242a1508
Frequently asked questions How do I install the Claude Code skill? Run npx skillmds@latest add yakeworld/claude-code in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Claude Code skill do? claude-code It is listed under Coding & Dev Tools on SkillMD.
Is Claude Code safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Claude Code? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Claude Code free to use? Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
Who published Claude Code? yakeworld (@yakeworld) published this skill. Their other Agent Skills are listed on their SkillMD profile.