跳到正文
Skillpedia
通用编程48k · #4211

commandcode-delegate

它能做什么

这个工具可以把编程任务委托给一个名为 Command Code 的工具来完成。你负责编写指令,并在最终采用之前检查它生成的代码。

适用场景

  • ✓当你想让另一个工具编写一段代码,并且在使用前想先审查时。
  • ✓当用户明确要求使用 Command Code 时。
  • ✓适用于定义清晰、可以与其他工作分开的编程任务。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/commandcode-delegate/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/commandcode-delegate/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“委托编写一个 Python 脚本,为这个表单添加邮箱验证功能。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要写一份详细的“任务说明”,写清楚要做什么。Command Code 工具会执行这些指令并生成代码。之后你检查代码,决定是否采用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Command Code Delegate

When to Use

  • You want to delegate a bounded coding task to a separate commandcode implementer (Command Code) and then review its diff yourself.
  • The user explicitly asked for delegation to this implementer.

You are the orchestrator. This skill lets you hand a bounded coding task to a separate implementer — the Command Code CLI (cmd) — then review what it produced and land it yourself. You write the brief and own the judgment; Command Code does the typing in your working tree; you verify and commit.

Nothing here is specific to one orchestrating agent. The loop needs only the ability to run a shell command and read a file, so it works the same whether you are Claude Code, OpenCode with a selected model, or any comparable agent. (It is designed for and run on Claude Code; treat other orchestrators as designed-for, not yet proven.)

When NOT to use this

  • The task is small enough to just do inline — delegation overhead is not worth it.
  • The cmd CLI is not installed or not authenticated (run cmd login).
  • You want to write the code yourself, or you only need a review (Command Code has its own /review).
  • You are on native Windows and cmdc --version does not work. Upstream recommends WSL for stable Windows use.

Read this before the first dispatch: the autonomy model

Command Code's headless mode has exactly two states, with nothing in between:

  • Default (-p with no --yolo): read, grep, and glob work. Every write, edit, and shell call is refused by the CLI's permission layer, and headless mode has no prompt to grant them mid-run. This is the relay's --read-only.
  • --yolo (alias --dangerously-skip-permissions): every tool is allowed, anywhere the process can reach. There is no filesystem sandbox and no path restriction. This is what an implementation run needs, so the relay passes it by default.

--permission-mode auto-accept and --tools-all do not lift the headless write gate. Direct CLI probes refused write, edit, and shell with both. So an implementation run through Command Code is a full-trust run: scope it with a tight brief and a clean working tree, not with a sandbox. The brief is guidance, and a git worktree isolates a checkout without containing the process. If writes outside the target tree are unacceptable, use an OS-enforced sandbox such as codex-delegate or run this one inside a container.

Before the first write-capable run, explain this unsandboxed full-trust mode and obtain explicit human acceptance. A request to delegate to Command Code is not by itself consent to host-wide access.

Prerequisites (check once)

  1. cmd --version succeeds and cmd status reports authenticated. If not, install Command Code and run cmd login.
  2. Confirm the CLI on PATH. On macOS/Linux, command -v cmd shows the active cmd. On native Windows, use cmdc --version; cmd is the system shell. The relay uses cmdc there and launches its npm .cmd shim through cmd.exe. COMMANDCODE_BIN remains an absolute-path override and must never point to the system command interpreter. The relay records the version it ran in result.json, so a wrong binary is visible after the fact.
  3. You are in (or will point --cd at) the target git repository, and its tree is clean before you dispatch — a full-trust run is much easier to review against a clean baseline.

The loop

Run these five steps per task. Steps 1, 4, and 5 are your judgment; 2 and 3 are mechanical.

1. Write the brief

Command Code sees only the text you send — no repo memory, no chat history, no shared context (beyond the repo's own AGENTS.md, which it reads automatically). Everything the task needs goes in the brief: the goal, the current state, what to change, what to leave untouched, the project's actual gate commands (discover them from the repo's AGENTS.md/CLAUDE.md/Makefile — do not assume), and a report contract. Tell it that it will not commit (you will). Keep one task per brief. Full guidance and a template: references/writing-the-brief.md.

2. Dispatch

Send the brief to Command Code with the bundled helper. It wraps cmd -p, captures the run, and writes a structured result.json — so your only job is "run a command, read a file." (<skill-dir> below is this skill's installed directory — the folder containing this SKILL.md, i.e. the directory

…

常见问题

什么是 Command Code?

它是一个命令行工具,可以根据你的指令编写和修改代码。

我为什么不自己写代码?

委托可以让你把精力放在审查和策略上,而由工具负责编写代码。对于重复性任务,或者当你想要一个自动化的第二意见时,这很有用。

Command Code 什么都能做吗?

不能,它只能完成定义清晰的编程任务。它无法获取项目上下文之外的信息,并且在使用前,你需要负责审查和批准代码。

详情

作者的原始描述

Delegate coding tasks to the Command Code CLI (`cmd`) only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4211
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能