在主 Agent 里调用本机腾讯 CodeBuddy CLI(codebuddy,别名 cbc)执行任务。
发给你的 Agent 一句话:
安装这个技能:https://github.com/mhgd3250905/codebuddy-help-me
手动:
git clone https://github.com/mhgd3250905/codebuddy-help-me.git ~/.agents/skills/codebuddy-help-me技能名放在任务前或后都行:
- 默认模型(跟随
codebuddy config list,当前hy4-preview):$codebuddy-help-me 审查登录流程的输入校验 审查登录流程的输入校验 $codebuddy-help-me - 显式指定模型:
$codebuddy-help-me 用 glm-5.3 审查登录流程的输入校验 审查登录流程的输入校验,使用模型 glm-5.3 $codebuddy-help-me
宿主 Agent 可向 doctor/run/batch 传递 --model(省略时跟随 codebuddy config list 的默认模型,当前 hy4-preview;--effort 独立传参,默认 high,与模型解耦、无后缀推导):
# 检查环境并验证模型可用性
python3 scripts/cb_helper.py doctor --json
python3 scripts/cb_helper.py doctor --json --model glm-5.3
# 单任务派发(显式模型)
python3 scripts/cb_helper.py run --preset review-local --model glm-5.3 --request-stdin
# 独立多任务派发(单批次统一模型,支持 1..3 路并发;这里使用默认模型)
python3 scripts/cb_helper.py batch --request-stdin请求是单行 UTF-8 JSON;格式化多行请求请改用 --request-file。最小四字段模板、preset 额外字段和错误说明见 SKILL.md 与 references/fast-path.md。
run/batch 的五个 preset 默认传入完全免打扰三件套(-y --permission-mode bypassPermissions,并由 helper 仅向子进程注入 CODEBUDDY_IS_SANDBOX=1),任务授权和结构化验收不变;doctor 只做能力探测。
- 单任务(
run):单个明确任务(如审查、修改或验证),由 helper 运行单 lane CodeBuddy 并返回结构化结果。支持--model与独立的--effort(默认high)。 - 独立多任务(
batch):多个互不依赖的独立任务,由宿主 Agent 在单次调用中提交batch(支持1..3路并发,默认 3),内部统一调度,无需手动开启多个终端;--run-timeout是每个 lane 的独立 deadline。 - 并发与写保护:只读任务或不重叠工作区任务可并发执行;同一或重叠工作区的写任务(
change/repair)自动互斥,避免重叠并发写入。
codebuddy 已安装并登录(codebuddy --version 能跑通,实测 2.143.0)。本机有可用的 python3。仅支持 POSIX(macOS/Linux),v1 不支持 Windows。技能不负责安装和登录。
致谢:本技能是 mhgd3250905/antigravity-help-me 的 MIT 衍生项目。
Call your local Tencent CodeBuddy CLI (codebuddy, alias cbc) to execute tasks from inside your main Agent.
Usage — send your Agent one line:
Install this skill: https://github.com/mhgd3250905/codebuddy-help-me
Manually:
git clone https://github.com/mhgd3250905/codebuddy-help-me.git ~/.agents/skills/codebuddy-help-meExample — skill name before or after the task, either works:
- Default model (follows
codebuddy config list, currentlyhy4-preview):$codebuddy-help-me review input validation in the login flow review input validation in the login flow $codebuddy-help-me - Explicit model:
$codebuddy-help-me use glm-5.3 to review input validation in the login flow review input validation in the login flow with model glm-5.3 $codebuddy-help-me
The host agent can pass --model to doctor, run, or batch (omitting it follows the default model from codebuddy config list, currently hy4-preview; --effort is passed independently, defaults to high, and is decoupled from the model with no suffix derivation):
# Probe environment and verify model availability
python3 scripts/cb_helper.py doctor --json
python3 scripts/cb_helper.py doctor --json --model glm-5.3
# Single-task dispatch with an explicit model
python3 scripts/cb_helper.py run --preset review-local --model glm-5.3 --request-stdin
# Independent multi-task dispatch (one model per batch, 1..3 parallel lanes; default model shown)
python3 scripts/cb_helper.py batch --request-stdinRequests are a single UTF-8 JSON line; use --request-file for formatted multi-line JSON. See SKILL.md and references/fast-path.md for the minimal four-field template, preset requirements, and validation errors.
All five run/batch presets pass the full hands-free trio by default (-y --permission-mode bypassPermissions, plus CODEBUDDY_IS_SANDBOX=1 injected into the subprocess only), while task authorization and structured acceptance remain unchanged; doctor only probes capabilities.
- Single task (
run): Use for a single scoped task (review, edit, or verification). The helper manages one CodeBuddy lane and returns structured results. Supports--modeland an independent--effort(defaulthigh). - Independent multi-task (
batch): When dispatching multiple independent jobs, the host agent submits abatchin a single invocation with bounded concurrency (1..3, default 3), without requiring manually opened multiple terminals;--run-timeoutacts as an independent per-lane deadline. - Concurrency & write safety: Read-only tasks and non-overlapping workspaces run concurrently; write tasks (
change/repair) on overlapping workspaces are automatically serialized to avoid parallel overlapping writes.
Prerequisite — codebuddy is installed and signed in (codebuddy --version works; tested against 2.143.0). A working python3 is available. POSIX only (macOS/Linux); Windows is not supported in v1. The skill does not install or sign in for you.
Acknowledgment: this skill is an MIT-licensed derivative of mhgd3250905/antigravity-help-me.