# Coding CLI

将编码工作委托给持有 CLI 的 agent（Manager / Leader / 获授权 Worker）的 AI CLI 工具（Claude Code / Gemini...

- Repository: https://github.com/agentscope-ai/AgentTeams (5913 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add agentscope-ai/AgentTeams --skill coding-cli -g -a claude-code -y`
Codex: `npx skills add agentscope-ai/AgentTeams --skill coding-cli -g -a codex -y`
Cursor: `npx skills add agentscope-ai/AgentTeams --skill coding-cli -g -a cursor -y`
Gemini CLI: `npx skills add agentscope-ai/AgentTeams --skill coding-cli -g -a gemini-cli -y`

## Description

将编码工作委托给持有 CLI 的 agent（Manager / Leader / 获授权 Worker）的 AI CLI 工具（Claude Code / Gemini CLI / qodercli / Qwen Code / OpenCode）执行

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Coding CLI Delegation

When the delegating agent (Manager / Leader / 获授权 Worker) assigns you a task with a "## Coding CLI Mode" section in `spec.md`, you do **not** write the code yourself. Instead, you:

1. Understand the task deeply
2. Prepare the workspace
3. Generate a precise coding prompt
4. Delegate execution to the delegating agent's CLI tool
5. Review the result

**Operational reference**: [`references/delegation-guidance.md`](references/delegation-guidance.md), one-shot delegation from the delegator's side: what it is, task-spec discipline, what it does not provide, and where results and logs land. Later capabilities (supervision, steering, approval) are documented in the management-side guidance.

---

## When to Use This Skill

Check `spec.md` for the task. If it contains `## Coding CLI Mode`, use this skill for all code changes.

---

## Step-by-Step Workflow

### 1. Prepare the Workspace

Set up the workspace directory under the shared filesystem:

```bash
workspace="/root/agentteams-fs/shared/tasks/{task-id}/workspace"
mkdir -p "$workspace"

# Clone a repo (example)
git clone <repo-url> "$workspace"

# Or copy existing code
cp -r /path/to/source "$workspace/"
```

**Constraint**: The workspace path **must** be under `/root/agentteams-fs/`. The delegating agent accesses the same path via MinIO mirror.

### 2. Push Workspace to MinIO

Before sending the coding-request, push all workspace files so the delegating agent can access them:

```bash
mc mirror "/root/agentteams-fs/shared/tasks/{task-id}/workspace/" \
  ${AGENTTEAMS_STORAGE_PREFIX}/shared/tasks/{task-id}/workspace/
```

### 2b. Check for Processing Marker

Before modifying the workspace or sending a coding-request, check if the task directory is being processed:

```bash
# Sync latest state from MinIO
mc mirror "${AGENTTEAMS_STORAGE_PREFIX}/shared/tasks/{task-id}/" \
  "/root/agentteams-fs/shared/tasks/{task-id}/"

The rest: https://github.com/agentscope-ai/AgentTeams/blob/HEAD/manager/agent/worker-skills/coding-cli/SKILL.md
