Codex Worker logo

Codex Worker

Community
lbc9168
codex-worker

Orchestrate local OpenAI Codex CLI (`codex exec`) as a sandboxed coding worker while you act as Architect and Code Reviewer. Activate this skill whenever the user asks to design a plan/spec and delegate coding, refactoring, bug fixing, or secondary codebase research to Codex CLI / GPT CLI (e.g., "让 Codex 写代码", "设计方案派发给 Codex/GPT", "用架构师+Codex 模式", "delegate implementation to Codex").

Overview

Publisherlbc9168
Repositoryantigravity-codex-worker
Skill namecodex-worker
Stars
174
Forks
4
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by lbc9168 on GitHub. Read the source before you install it.

Installation

Install the Codex Worker AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/lbc9168/antigravity-codex-worker/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lbc9168/antigravity-codex-worker.git \
  .claude/skills/codex-worker
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codex Worker in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codex Worker on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codex Worker is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Codex Worker Orchestration & Review Skill

When this skill is active, operate strictly in an Architect + Worker + Reviewer split:

  • Your Role (Antigravity — Gemini / Opus): Chief Architect, Spec Writer, and Strict Quality Gatekeeper.
  • Codex CLI's Role (codex exec): Sandboxed Implementation / Research Worker executing inside the workspace.
  • Hard Boundary: Do NOT directly modify project business source files with edit_file or write_file. You only author task specification files inside <workspace>/.codex-tasks/ (and initialize Git if the user asks). All production/test code changes must be performed by Codex CLI and verified by you.

Pre-Flight Check: Git Repository Baseline

codex exec requires a Git repository by default, and git diff is essential for your review gate. Before dispatching a task in a workspace:

  1. Run git rev-parse --is-inside-work-tree (sandboxed) in the workspace.
  2. If already a Git repo:
    • Check git status --short so you know if there are pre-existing uncommitted changes before Codex starts.
    • Note: run-codex.ps1 / run-codex.sh automatically adds .codex-tasks/ to .git/info/exclude so task files never pollute git status or the project's committed .gitignore.
    • Special edge case: if the Git repo was just git init-ed with zero commits (git rev-parse --verify HEAD fails), ask or create an initial baseline commit first so git diff works cleanly.
  3. If NOT a Git repo:
    • Ask the user whether to initialize local Git first (git init -b main, git add ., git commit -m "chore: initial baseline" — recommended), or pass -SkipGitCheck / --skip-git-check if they explicitly prefer running without Git.

5-Stage Delegation Lifecycle

Stage 1: DEFINE (Research & Architecture)

  1. Inspect the relevant files, types, interfaces, tests, and build scripts yourself.
  2. Make all architectural and design decisions upfront (data structures, function signatures, file layout, edge cases). Do not leave architectural ambiguity for Codex to guess.
  3. If user requirements are ambiguous, clarify with the user before writing the spec.

Stage 2: COMPOSE (Write Task Specification)

  1. Pick the matching template from ./resources/:
  2. Write the filled specification to <workspace>/.codex-tasks/<task-id>-spec.md (e.g., .codex-tasks/001-auth-middleware-spec.md).
  3. Always keep the rule in the spec forbidding Codex from running git commit, git push, git reset --hard, or git checkout -- so every modification remains visible in the working tree for your inspection.

Stage 3: SPAWN (Dispatch to Local Codex CLI)

Resolve <skill-dir> as the directory containing this SKILL.md file, then invoke the launcher matching the host OS:

  • Windows (pwsh): run-codex.ps1

  • macOS / Linux (bash): run-codex.sh

  • Execution Rule: Because codex reads authentication from ~/.codex and connects to the OpenAI API over the network, set WaitMsBeforeAsync: 10000 when calling run_command (and if your run_command tool schema exposes a BypassSandbox parameter, set BypassSandbox: true ONLY on this dispatch command while keeping your own inspection/review commands sandboxed).

  • Async Handling: Coding tasks often take 30–180 seconds. If the command moves to background after 10 seconds, stop calling tools and wait — the system automatically wakes you when the background task finishes. Never poll in a loop.

  • Command Shape (resolve <skill-dir> and <workspace-abs-path> to concrete literal paths — avoid $(...) or shell variables so user approval prefix-matches cleanly):

powershell
# Windows (PowerShell) — Implementation or Bugfix:
pwsh -NoProfile -ExecutionPolicy Bypass -File "<skill-dir>/scripts/run-codex.ps1" -WorkDir "<workspace-abs-path>" -SpecFile "<workspace-abs-path>/.codex-tasks/<task-id>-spec.md" -SummaryFile "<workspace-abs-path>/.codex-tasks/<task-id>-summary.md" -Sandbox workspace-write

# Windows (PowerShell) — Read-only Research / Audit:
pwsh -NoProfile -ExecutionPolicy Bypass -File "<skill-dir>/scripts/run-codex.ps1" -WorkDir "<workspace-abs-path>" -SpecFile "<workspace-abs-path>/.codex-tasks/<task-id>-spec.md" -SummaryFile "<workspace-abs-path>/.codex-tasks/<task-id>-summary.md" -Sandbox read-only
bash
# macOS / Linux (Bash):
bash "<skill-dir>/scripts/run-codex.sh" --work-dir "<workspace-abs-path>" --spec-file "<workspace-abs-path>/.codex-tasks/<task-id>-spec.md" --summary-file "<workspace-abs-path>/.codex-tasks/<task-id>-summary.md" --sandbox workspace-write

Optional flags supported by run-codex.ps1 (and --kebab-case equivalents in run-codex.sh):

  • -Model "<model-slug>" (--model): Overrides Codex's default model for this run. Only set when the user asks for a specific model; omit otherwise to use ~/.codex/config.toml default.
  • -ReasoningEffort "<level>" (--reasoning-effort): Overrides Codex's thinking effort (minimal, low, medium, high, xhigh, max, ultra) via -c model_reasoning_effort=.... Set when the user requests a specific thinking intensity; omit otherwise to use ~/.codex/config.toml default.
  • -ResumeLast (--resume-last): Resumes the most recent Codex session in -WorkDir (use for Stage 5 rework).
  • -SkipGitCheck (--skip-git-check): Allows execution outside a Git repository when explicitly requested.
  • -Image "<file-path>" (--image): Attaches reference screenshot/mockup file(s) to the prompt.

Stage 4: REVIEW (Strict Independent Acceptance)

Never trust Codex's summary at face value. Perform all three checks yourself (in Standard Sandbox Mode):

  1. Read Worker Summary: Read <workspace>/.codex-tasks/<task-id>-summary.md to understand Codex's claimed changes, test runs, and caveats.
  2. Inspect Actual Diffs:
    • Run git status --short (check for untracked files or unexpected deletions).
    • Run git diff (and read new untracked files with read_file) to review every changed line against your Stage 2 spec:
      • Did Codex follow the exact architecture and interfaces?
      • Did it touch any forbidden files?
      • Are error handling, types, security, and edge cases properly handled?
  3. Run Independent Verification: Run the project's test suite, typechecker, or linter yourself to confirm everything passes cleanly.

Stage 5: VERDICT (Approve or Rework)

  • If Review Fails:
    1. Write concrete, actionable feedback (exact file paths, line numbers, design deviations, or compiler/test error output) to <workspace>/.codex-tasks/<task-id>-rework-1.md.
    2. Dispatch rework by re-running the launcher with -ResumeLast (--resume-last), pointing -SpecFile to the rework file and -SummaryFile to <task-id>-rework-1-summary.md.
    3. Repeat Stage 4 review. Limit automatic rework to at most 2 rounds; if Codex still fails after 2 rounds, halt and report the exact blocker to the user.
  • If Review Passes: Report concisely to the user:
    1. Architectural design summary;
    2. Files created/modified by Codex;
    3. Your independent review & test verification results;
    4. Remind the user that changes are ready in the working tree for their final look or git commit.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codex Worker AI skill do?

Orchestrate local OpenAI Codex CLI (`codex exec`) as a sandboxed coding worker while you act as Architect and Code Reviewer. Activate this skill whenever the user asks to design a plan/spec and delegate coding, refactoring, bug fixing, or secondary codebase research to Codex CLI / GPT CLI (e.g., "让 Codex 写代码", "设计方案派发给 Codex/GPT", "用架构师+Codex 模式", "delegate implementation to Codex").

Why use Codex Worker on TypingMind?

Because you install it once and use it with any model. Codex Worker is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codex Worker in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lbc9168/antigravity-codex-worker/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codex Worker?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codex Worker?

As many as you like. As long as a model supports skills, you can use Codex Worker with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codex Worker AI skill free?

Yes. It is published on GitHub by lbc9168 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇