codex-worker — community codex-worker, kimi-cli, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Multi-Tasking Agents needing parallel execution of independent subtasks using Codex CLI and git worktrees Kimi Code CLI is your next CLI agent.

MoonshotAI MoonshotAI
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The codex-worker skill by MoonshotAI is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Multi-Tasking Agents needing parallel execution of independent subtasks using Codex CLI and git worktrees

Core Value

Empowers agents to orchestrate multiple Codex CLI agents running in parallel, each in its own git worktree and tmux session, utilizing protocols like git and tmux for efficient task management

Capabilities Granted for codex-worker

Automating issue triage by spawning one codex worker per issue
Refactoring multiple modules concurrently with one worker per module
Debugging and fixing lint errors in parallel across different codebases

! Prerequisites & Limits

  • Requires git worktree and tmux setup
  • Limited to tasks that can be split into independent subtasks
  • Dependent on Codex CLI availability and compatibility
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

codex-worker

Install codex-worker, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

codex-worker

Orchestrate multiple Codex CLI (codex) agents running in parallel, each in its own git worktree and tmux session.

When to use: Whenever you identify that a task can be split into independent subtasks — don't wait for the user to ask for parallelism. Examples:

  • User says "triage all open issues updated in the last 7 days" → fetch the issue list, then spawn one codex worker per issue.
  • User says "refactor these 5 modules" → one worker per module.
  • User says "fix lint errors across packages" → one worker per package.

Replaces Task tool: When codex and tmux are available in the environment, use codex workers instead of the built-in Task (subagent) tool. Codex workers are full-featured agents with their own file system access, shell, and isolated worktree — far more capable than subagents.

Preflight check

bash
1command -v codex && codex login status && command -v tmux

All three must succeed. The project must be a git repository.

Naming convention

Git branch and worktree directory share a task name:

<type>-<issue number (optional)>-<short description>

The tmux session adds a codex-worker- prefix so workers are easy to filter:

FormatExample
Task name<type>-<number>-<desc>issue-836-prompt-dollar-sign
Git branchsame as task nameissue-836-prompt-dollar-sign
Worktree dir<project>.worktrees/<task>kimi-cli.worktrees/issue-836-prompt-dollar-sign
tmux sessioncodex-worker-<task>codex-worker-issue-836-prompt-dollar-sign

More examples:

  • issue-518-mcp-config-isolation
  • fix-share-dir-skills-path
  • feat-ask-user-tool
  • refactor-jinja-templates

List only codex workers: tmux ls | grep ^codex-worker-

Usage

Prefer tmux + interactive codex for all tasks. It supports multi-turn dialogue, the user can tmux attach to inspect or intervene, and you can send follow-up prompts from outside.

Spawn a worker

bash
1NAME="issue-836-prompt-dollar-sign" # task name 2SESSION="codex-worker-$NAME" # tmux session name 3PROJECT_DIR="$(pwd)" 4WORKTREE_DIR="$PROJECT_DIR.worktrees" 5 6# 1. Create worktree (skip if exists) 7git worktree add "$WORKTREE_DIR/$NAME" -b "$NAME" main 2>/dev/null 8 9# 2. Launch interactive codex inside tmux 10tmux new-session -d -s "$SESSION" -x 200 -y 50 \ 11 "cd $WORKTREE_DIR/$NAME && codex --dangerously-bypass-approvals-and-sandbox"

Send a prompt

The Codex TUI needs time to initialize before it accepts input. After launching a session, wait at least 5 seconds before sending a prompt. Then send the text followed by Enter. If the prompt stays in the input field without being submitted, send an additional Enter.

bash
1sleep 5 # wait for Codex TUI to initialize 2tmux send-keys -t "$SESSION" "Your prompt here" Enter 3# If it doesn't submit, send another Enter: 4# tmux send-keys -t "$SESSION" Enter

Peek at output

bash
1tmux capture-pane -t "$SESSION" -p | tail -30

Attach for hands-on interaction

bash
1tmux attach -t "$SESSION"

Parallel fan-out

bash
1TASKS=( 2 "issue-518-mcp-config-isolation|Triage #518: MCP config 被子 agent 继承的隔离问题。分析根因,给出修复方案。" 3 "issue-836-prompt-dollar-sign|Triage #836: prompt 包含 $ 时启动静默失败。分析根因,给出修复方案。" 4) 5 6PROJECT_DIR="$(pwd)" 7WORKTREE_DIR="$PROJECT_DIR.worktrees" 8 9for entry in "${TASKS[@]}"; do 10 NAME="${entry%%|*}" 11 PROMPT="${entry#*|}" 12 SESSION="codex-worker-$NAME" 13 git worktree add "$WORKTREE_DIR/$NAME" -b "$NAME" main 2>/dev/null 14 tmux new-session -d -s "$SESSION" -x 200 -y 50 \ 15 "cd $WORKTREE_DIR/$NAME && codex --dangerously-bypass-approvals-and-sandbox" 16 sleep 5 # wait for Codex TUI to fully initialize 17 tmux send-keys -t "$SESSION" "$PROMPT" Enter 18done

Fallback: codex exec

Only use codex exec when you explicitly don't need follow-up (e.g. CI, pure analysis with -o output). It does not support multi-turn dialogue.

bash
1codex exec --dangerously-bypass-approvals-and-sandbox \ 2 -o "/tmp/$NAME-result.md" \ 3 "Your prompt here"

Lifecycle management

List active workers:

bash
1tmux ls | grep ^codex-worker-

Kill a finished worker:

bash
1tmux kill-session -t "codex-worker-$NAME"

Clean up worktree after merging:

bash
1tmux kill-session -t "codex-worker-$NAME" 2>/dev/null 2git worktree remove "$WORKTREE_DIR/$NAME" 3git branch -d "$NAME"

Batch cleanup of dead sessions:

bash
1tmux list-sessions -F '#{session_name}:#{pane_dead}' \ 2 | grep ':1$' \ 3 | cut -d: -f1 \ 4 | xargs -I{} tmux kill-session -t {}

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is codex-worker?

Perfect for Multi-Tasking Agents needing parallel execution of independent subtasks using Codex CLI and git worktrees Kimi Code CLI is your next CLI agent.

How do I install codex-worker?

Run the command: npx killer-skills add MoonshotAI/kimi-cli/codex-worker. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for codex-worker?

Key use cases include: Automating issue triage by spawning one codex worker per issue, Refactoring multiple modules concurrently with one worker per module, Debugging and fixing lint errors in parallel across different codebases.

Which IDEs are compatible with codex-worker?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for codex-worker?

Requires git worktree and tmux setup. Limited to tasks that can be split into independent subtasks. Dependent on Codex CLI availability and compatibility.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add MoonshotAI/kimi-cli/codex-worker. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use codex-worker immediately in the current project.

Related Skills

Looking for an alternative to codex-worker or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI