Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计通过

codex-teamCodex team 命令行

Agent Skill

codex-team 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

12,254

周安装

521

GitHub Stars

318

下载量

4,293
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codex-team(Codex team 命令行)
来源仓库:https://github.com/boshu2/agentops
仓库路径:skills/codex-team
安装命令:
npx skills add https://github.com/boshu2/agentops --skill codex-team
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/boshu2/agentops --skill codex-team

简介

codex-team 协调多个 Codex 代理并行处理独立子任务。

  • 由主节点担任锁管理器,防止文件写入冲突。
  • 适用于 bug 修复、模块重构等多任务并发场景。
  • 需确保 tmux 环境与 git worktree 可用,替换原生 Task 工具。
  • codex-team 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Codex Team

The lead orchestrates, Codex agents execute. Each agent gets one focused task. The team lead prevents file conflicts before spawning — the orchestrator IS the lock manager.

For Claude-runtime feature compatibility (agents/hooks/worktree/settings), use the shared contract at skills/shared/references/claude-code-latest-features.md, mirrored locally at references/claude-code-latest-features.md, when this skill falls back to /swarm.

When to Use

  • You have 2+ tasks (bug fixes, implementations, refactors)
  • Tasks are well-scoped with clear instructions
  • You want Codex execution with predictable isolation
  • You may be in Claude or Codex runtime (skill auto-selects backend)

Don't use when: Tasks need tight shared-state coordination. Use /swarm for dependency-heavy wave orchestration.

Backend Selection (MANDATORY)

Select backend in this order:

  1. spawn_agent available -> Codex experimental sub-agents (preferred)
  2. Codex CLI available -> Codex CLI via Bash (codex exec...)
  3. skill tool is read-only (OpenCode) -> OpenCode subagentstask(subagent_type="general", prompt="<task prompt>")
  4. None of the above -> fall back to /swarm

Pre-Flight (CLI backend only)

# REQUIRED before spawning with Codex CLI backend
if ! which codex > /dev/null 2>&1; then
  echo "Codex CLI not found. Install: npm i -g @openai/codex"
  # Fallback: use /swarm
fi

# Model availability test (uses the user's configured Codex default)
if ! codex exec --full-auto -C "$(pwd)" "echo ok" > /dev/null 2>&1; then
  echo "Default Codex model unavailable. Falling back to /swarm."
fi

Canonical Command

codex exec --full-auto -C "$(pwd)" -o <output-file> "<prompt>"

Uses the user's default Codex model. Add -m "<model>" before -C only when you intentionally want to pin a specific model.

Flag order: --full-auto -> -C -> -o -> prompt (insert -m before -C only when overriding the model).

Valid flags: --full-auto, -m, -C, -o, --json, --output-schema, --add-dir, -s

DO NOT USE: -q, --quiet (don't exist)

Cross-Project Tasks

When tasks span multiple repos/directories, use --add-dir to grant access:

codex exec --full-auto -C "$(pwd)" --add-dir /path/to/other/repo -o output.md "prompt"

The --add-dir flag is repeatable for multiple additional directories.

Progress Monitoring (optional)

Add --json to stream JSONL events to stdout for real-time monitoring:

codex exec --full-auto --json -C "$(pwd)" -o output.md "prompt" 2>/dev/null

Key events:

  • turn.started / turn.completed — track progress
  • turn.completed includes token usage field
  • No events for 60s → agent likely stuck

Sandbox Levels

Use -s to control the sandbox:

LevelFlagUse When
Read-only-s read-onlyJudges, reviewers (no file writes needed)
Workspace write-s workspace-writeDefault with --full-auto
Full access-s danger-full-accessOnly in externally sandboxed environments

For code review and analysis tasks, prefer -s read-only over --full-auto.

Execution

Step 1: Define Tasks

Break work into focused tasks. Each task = one Codex agent (unless merged).

Step 2: Analyze File Targets (REQUIRED)

Before spawning, identify which files each task will edit. Codex agents are headless — they can't negotiate locks or wait turns. All conflict prevention happens here.

For each task, list the target files. Then apply the right strategy:

File OverlapStrategyAction
All tasks touch same fileMergeCombine into 1 agent with all fixes
Some tasks share filesMulti-waveShared-file tasks go sequential across waves
No overlapParallelSpawn all agents at once
# Decision logic (team lead performs this mentally):

tasks = [
  {name: "fix spec_path",    files: ["cmd/zeus.go"]},
  {name: "remove beads field", files: ["cmd/zeus.go"]},
  {name: "fix dispatch counter", files: ["cmd/zeus.go"]},
]

# All touch zeus.go → MERGE into 1 agent
tasks = [
  {name: "fix auth bug",     files: ["pkg/auth.go"]},
  {name: "add rate limiting", files: ["pkg/auth.go", "pkg/middleware.go"]},
  {name: "update config",    files: ["internal/config.go"]},
]

# Task 1 and 2 share auth.go → MULTI-WAVE (1+3 parallel, then 2)
# Task 3 is independent → runs in Wave 1 alongside Task 1
tasks = [
  {name: "fix auth",    files: ["pkg/auth.go"]},
  {name: "fix config",  files: ["internal/config.go"]},
  {name: "fix logging", files: ["pkg/log.go"]},
]

# No overlap → PARALLEL (all 3 at once)

Step 3: Spawn Agents

Strategy: Parallel (no file overlap)

Codex sub-agent backend (preferred):

spawn_agent(message="Fix the null check in pkg/auth.go:validateToken around line 89...")
spawn_agent(message="Add timeout field to internal/config.go:Config struct...")
spawn_agent(message="Fix log rotation in pkg/log.go:rotateLogFile...")

Codex CLI backend:

Bash(command='codex exec --full-auto -C "$(pwd)" -o .agents/codex-team/auth-fix.md "Fix the null check in pkg/auth.go:validateToken around line 89..."', run_in_background=true)
Bash(command='codex exec --full-auto -C "$(pwd)" -o .agents/codex-team/config-fix.md "Add timeout field to internal/config.go:Config struct..."', run_in_background=true)
Bash(command='codex exec --full-auto -C "$(pwd)" -o .agents/codex-team/logging-fix.md "Fix log rotation in pkg/log.go:rotateLogFile..."', run_in_background=true)

Strategy: Merge (same file)

Combine all fixes into a single agent prompt:

spawn_agent(message="Fix these 3 issues in cmd/zeus.go: (1) rename spec_path to spec_location in QUEST_REQUEST payload (2) remove beads field (3) fix dispatch counter increment location")

# CLI equivalent:
Bash(command='codex exec --full-auto -C "$(pwd)" -o .agents/codex-team/zeus-fixes.md \
  "Fix these 3 issues in cmd/zeus.go: \
   (1) Line 245: rename spec_path to spec_location in QUEST_REQUEST payload \
   (2) Line 250: remove the spurious beads field from the payload \
   (3) Line 196: fix dispatch counter — increment inside the loop, not outside"', run_in_background=true)

One agent, one file, no conflicts possible.

Strategy: Multi-wave (partial overlap)

# Wave 1: non-overlapping tasks (sub-agent backend)
spawn_agent(message='Fix null check in pkg/auth.go:89...')
spawn_agent(message='Add timeout to internal/config.go...')

# Wait for Wave 1 (sub-agent backend)
wait(ids=["<id-1>", "<id-2>"], timeout_ms=120000)

# Wave 1: non-overlapping tasks (CLI backend)
Bash(command='codex exec ... -o .agents/codex-team/auth-fix.md "Fix null check in pkg/auth.go:89..."', run_in_background=true)
Bash(command='codex exec ... -o .agents/codex-team/config-fix.md "Add timeout to internal/config.go..."', run_in_background=true)

# Wait for Wave 1
TaskOutput(task_id="<id-1>", block=true, timeout=120000)
TaskOutput(task_id="<id-2>", block=true, timeout=120000)

# Read Wave 1 results — understand what changed
Read(.agents/codex-team/auth-fix.md)
git diff pkg/auth.go

# Wave 2: task that shares files with Wave 1 (sub-agent backend)
spawn_agent(message='Add rate limiting to pkg/auth.go and pkg/middleware.go. Note: validateToken now has a null check at line 89. Build on current file state.')

# Wave 2: CLI backend equivalent
Bash(command='codex exec ... -o .agents/codex-team/rate-limit.md \
  "Add rate limiting to pkg/auth.go and pkg/middleware.go. \
   Note: pkg/auth.go was recently modified — the validateToken function now has a null check at line 89. \
   Build on the current state of the file."', run_in_background=true)

TaskOutput(task_id="<id-3>", block=true, timeout=120000)

The team lead synthesizes Wave 1 results and injects relevant context into Wave 2 prompts. Don't dump raw diffs — describe what changed and why it matters for the next task.

Step 4: Wait for Completion

# Sub-agent backend:
wait(ids=["<id-1>", "<id-2>", "<id-3>"], timeout_ms=120000)

# CLI backend:
TaskOutput(task_id="<id-1>", block=true, timeout=120000)
TaskOutput(task_id="<id-2>", block=true, timeout=120000)
TaskOutput(task_id="<id-3>", block=true, timeout=120000)

Step 5: Verify Results

  • Read output files from .agents/codex-team/
  • Check git diff for changes made by each agent
  • Run tests if applicable
  • For multi-wave: verify Wave 2 agents built correctly on Wave 1 changes

Output Directory

mkdir -p .agents/codex-team

Output files: .agents/codex-team/<task-name>.md

Prompt Guidelines

Good Codex prompts are specific and self-contained:

# GOOD: Specific file, line, exact change
"Fix in cmd/zeus.go line 245: rename spec_path to spec_location in the QUEST_REQUEST payload struct"

# BAD: Vague, requires exploration
"Fix the spec path issue somewhere in the codebase"

Include in each prompt:

  • Exact file path(s)
  • Line numbers or function names
  • What to change and why
  • Any constraints (don't touch other files, preserve API compatibility)

For multi-wave Wave 2+ prompts, also include:

  • What changed in prior waves (summarized, not raw diffs)
  • Current state of shared files after prior edits

Limits

  • Max agents: 6 per wave (resource-reasonable)
  • Timeout: 2 minutes default per agent. Increase with timeout param for larger tasks
  • Max waves: 3 recommended. If you need more, reconsider task decomposition

Fallback

If Codex is unavailable, delegate to /swarm which auto-selects the best available backend (native teams with messaging/redirect/graceful shutdown, or background tasks as last resort):

Skill(skill="swarm")
Note: /codex-team runs Codex CLI processes as background shell commands — this is fine (separate OS processes). For Claude agent orchestration, use /swarm which uses your runtime's native multi-agent primitives.

Quick Reference

ItemValue
ModelUser's configured Codex default (-m "<model>" to pin one)
Commandcodex exec --full-auto -C "$(pwd)" -o <file> "prompt"
Output dir.agents/codex-team/
Max agents/wave6 recommended
Timeout120s default
StrategiesParallel (no overlap), Merge (same file), Multi-wave (partial overlap)
Fallback/swarm (runtime-native)

Examples

Parallel Execution (No File Overlap)

User says: Fix three bugs in auth.go, config.go, and logging.go using /codex-team

What happens:

  1. Agent analyzes file targets (auth.go, config.go, log.go — no overlap)
  2. Agent selects PARALLEL strategy
  3. Agent spawns three Codex agents (sub-agents if available, else CLI via Bash)
  4. All agents execute simultaneously, write to .agents/codex-team/*.md
  5. Team lead verifies results with git diff and tests
  6. Team lead commits all changes together

Result: Three bugs fixed in parallel with zero file conflicts.

Merge Strategy (Same File)

User says: Fix three issues in zeus.go: rename field, remove unused field, fix counter

What happens:

  1. Agent analyzes file targets (all three tasks touch zeus.go)
  2. Agent selects MERGE strategy
  3. Agent combines all three fixes into a single Codex prompt with line-specific instructions
  4. Agent spawns ONE Codex agent with merged prompt
  5. Agent completes all three fixes in one pass
  6. Team lead verifies and commits

Result: One agent, one file, no conflicts possible.

Multi-Wave (Partial Overlap)

User says: Fix auth.go, add rate limiting to auth.go + middleware.go, update config.go

What happens:

  1. Agent identifies overlap: tasks 1 and 2 both touch auth.go
  2. Agent decomposes into waves: W1 = task 1 + task 3 (non-overlapping), W2 = task 2
  3. Agent spawns Wave 1 agents in parallel, waits for completion
  4. Agent reads Wave 1 results, synthesizes context for Wave 2
  5. Agent spawns Wave 2 agent with updated file-state context
  6. Team lead validates and commits after Wave 2

Result: Sequential wave execution prevents conflicts, context flows forward.


Troubleshooting

ProblemCauseSolution
Codex CLI not foundcodex not installed or not on PATHRun npm i -g @openai/codex or use fallback /swarm
Default Codex model unavailableAccount/config mismatch or unsupported defaultVerify codex exec --full-auto -C "$(pwd)" "echo ok" works, or pin a supported model with -m "<model>"
Agents produce file conflictsMultiple agents editing same fileUse file-target analysis and apply merge or multi-wave strategy
Agent timeout with no outputTask too complex or vague promptBreak into smaller tasks, add specific file:line instructions
Output files empty or missing-o path invalid or permission deniedCheck .agents/codex-team/ directory exists and is writable

Reference Documents

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.19%
按下载量换算1,511

Claude

27.98%
按下载量换算1,201

Cursor

19.07%
按下载量换算819

Gemini CLI

8.72%
按下载量换算374

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/boshu2/agentops --skill codex-team 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills