Agent 生成器
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: coding-cli-management
description: Execute AI coding CLI tools (Claude Code / Gemini CLI / qodercli) on behalf of Workers. Use when…
category: AI 智能
runtime: 无特殊运行时
---
# coding-cli-management 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Config File / Step 1: First-Time Detection (before assigning a coding task) / Step 2: Assigning a Coding Task (CLI mode enabled)”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Config File / Step 1: First-Time Detection (before assigning a coding task) / Step 2: Assigning a Coding Task (CLI mode enabled)”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/opt`、`/root`、`/host-share`、`/tmp` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Config File / Step 1: First-Time Detection (before assigning a coding task) / Step 2: Assigning a Coding Task (CLI mode enabled)”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: coding-cli-management
description: Execute AI coding CLI tools (Claude Code / Gemini CLI / qodercli) on behalf of Workers. Use when…
category: AI 智能
source: tomevault-io/skills-registry
---
# coding-cli-management
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Config File / Step 1: First-Time Detection (before assigning a coding task) / Step 2: Assigning a Coding Task (CLI mode enabled)」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "coding-cli-management" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Config File / Step 1: First-Time Detection (before assigning a coding task) / Step 2: Assigning a Coding Task (CLI mode enabled)
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Coding CLI Management
This skill enables the Manager to execute AI coding CLI tools (claude/gemini/qodercli) on behalf of Workers. Workers generate precise prompts; the Manager runs the CLI in the Worker's workspace and returns the result.
Config File
Path: ~/coding-cli-config.json
{
"enabled": true,
"cli": "claude",
"confirmed_at": "2026-02-23T10:00:00Z"
}
enabled |
cli |
Meaning |
|---|---|---|
false |
any | Admin declined; use normal task flow |
true |
"claude" / "gemini" / "qodercli" |
Active — use this CLI |
Step 1: First-Time Detection (before assigning a coding task)
Run when ~/coding-cli-config.json does not exist:
bash /opt/hiclaw/agent/skills/coding-cli-management/scripts/detect-available-cli.sh
If no CLIs are available (available array is empty):
echo '{"enabled":false,"cli":null,"confirmed_at":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' \
> ~/coding-cli-config.json
Proceed with normal task assignment (Worker codes on their own).
If CLIs are available, ask the admin via the primary channel or Matrix DM — in the language the admin used:
I found the following AI coding CLI tools available: [list]. Would you like to enable CLI delegation mode? Workers will generate coding prompts, and I'll use the CLI tool to make the code changes. Reply with the tool name (claude/gemini/qodercli) to enable, or 'no' to have workers code on their own.
On admin reply:
- Tool name (
claude/gemini/qodercli):echo '{"enabled":true,"cli":"<chosen-tool>","confirmed_at":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' \ > ~/coding-cli-config.json "no"or decline:echo '{"enabled":false,"cli":null,"confirmed_at":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' \ > ~/coding-cli-config.json
Step 2: Assigning a Coding Task (CLI mode enabled)
When coding-cli-config.json has enabled: true:
Ensure the Worker has the
coding-cliskill. Checkworkers-registry.json:cat ~/workers-registry.json | jq '.workers[] | select(.name=="<worker>") | .skills'If
coding-cliis missing, distribute it:bash /opt/hiclaw/agent/skills/worker-management/scripts/push-worker-skills.sh \ --worker <worker-name> --skill coding-cliAdd a "Coding CLI Mode" section to spec.md (see template below).
Step 3: Handling a coding-request: Message
When a Worker sends a message containing coding-request: (in their Worker Room or a Project Room):
Parse the message:
task-{task-id} coding-request:
workspace: /root/hiclaw-fs/shared/tasks/{task-id}/workspace
---PROMPT---
{prompt content}
---END---
Execute:
# 1. Sync workspace from MinIO
task_id="task-YYYYMMDD-HHMMSS"
workspace="/root/hiclaw-fs/shared/tasks/${task_id}/workspace"
mc mirror "${HICLAW_STORAGE_PREFIX}/shared/tasks/${task_id}/" "/root/hiclaw-fs/shared/tasks/${task_id}/"
# 2. Check for processing marker (task coordination)
bash /opt/hiclaw/agent/skills/task-coordination/scripts/check-processing-marker.sh "$task_id"
if [ $? -ne 0 ]; then
# Another process is working on this task
echo "Task ${task_id} is being processed by another operation. Retry later."
exit 1
fi
# 3. Create processing marker
bash /opt/hiclaw/agent/skills/task-coordination/scripts/create-processing-marker.sh "$task_id" "manager" 15
# 4. Save prompt to file
timestamp=$(date +%Y%m%d-%H%M%S)
prompt_dir="/root/hiclaw-fs/shared/tasks/${task_id}/coding-prompts"
mkdir -p "$prompt_dir"
prompt_file="$prompt_dir/${timestamp}.txt"
cat > "$prompt_file" << 'PROMPT_EOF'
{extracted prompt content}
PROMPT_EOF
# 5. Get configured CLI
cli=$(jq -r '.cli' ~/coding-cli-config.json)
# 6. Run CLI
bash /opt/hiclaw/agent/skills/coding-cli-management/scripts/run-coding-cli.sh \
--cli "$cli" \
--workspace "$workspace" \
--prompt-file "$prompt_file" \
--timeout 600
exit_code=$?
# 7. Remove processing marker
bash /opt/hiclaw/agent/skills/task-coordination/scripts/remove-processing-marker.sh "$task_id"
# 8. On success (exit 0): push changes to MinIO
if [ "$exit_code" -eq 0 ]; then
mc mirror "/root/hiclaw-fs/shared/tasks/${task_id}/workspace/" "${HICLAW_STORAGE_PREFIX}/shared/tasks/${task_id}/workspace/" --overwrite
fi
On success — send to Worker in the same Room:
@{worker}:DOMAIN task-{task-id} coding-result:
CLI 工具已完成编码。请同步工作目录并 review 变更:
hiclaw-sync
变更记录:/root/hiclaw-fs/shared/tasks/{task-id}/workspace/coding-cli-logs/
On failure (exit ≠ 0 or timeout) — see Step 4.
Step 4: Handling Failure
Notify Worker in the task Room:
@{worker}:DOMAIN task-{task-id} coding-failed:
CLI 工具执行失败(exit code: {code})。请自行完成编码任务。
你生成的提示词已保存于:/root/hiclaw-fs/shared/tasks/{task-id}/coding-prompts/
Notify Human Admin via primary channel (see channel-management skill "Sending Messages to Primary Channel"):
Worker {worker-name} 的编码委托任务 {task-id} 中,{cli} 工具执行失败。
错误信息:{last lines from log file}
建议检查:
- ~/.{cli}/ 凭证是否有效(token 是否过期)
- /host-share/.{cli}/ 软链是否正常(ls -la /root/.{cli})
- {cli} binary 是否在容器内可用(which {cli})
Record in config (optional, for heartbeat diagnostics):
jq --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg tid "$task_id" \
'.last_failure = {task_id: $tid, failed_at: $ts}' \
~/coding-cli-config.json > /tmp/cfg.json && \
mv /tmp/cfg.json ~/coding-cli-config.json
Spec.md Coding CLI Mode Template
Append to the end of spec.md when CLI mode is enabled:
## Coding CLI Mode
本任务涉及代码修改。请使用 **Coding CLI 委托模式** 完成:
1. 克隆/准备代码到工作目录:`/root/hiclaw-fs/shared/tasks/{task-id}/workspace/`
2. 推送到 MinIO:`mc mirror /root/hiclaw-fs/shared/tasks/{task-id}/workspace/ ${HICLAW_STORAGE_PREFIX}/shared/tasks/{task-id}/workspace/`
3. 根据你的理解和 `coding-cli` skill 生成编码提示词,发送给我
4. 等待我执行 CLI 工具并返回结果
5. Sync 拉取变更:`hiclaw-sync`
6. Review 变更并报告完成
如收到 `coding-failed:`,请自行完成编码工作。
Source: agentscope-ai/HiClaw — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核