Logo di Codex Worker

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").

Panoramica

Pubblicato dalbc9168
Repositoryantigravity-codex-worker
Nome della skillcodex-worker
Stelle
174
Fork
4
File inclusi
5
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 5

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da lbc9168 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Codex Worker in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/lbc9168/antigravity-codex-worker/tree/main
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lbc9168/antigravity-codex-worker.git \
  .claude/skills/codex-worker
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Codex Worker in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Codex Worker non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Codex Worker non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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").

Perché usare Codex Worker su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Codex Worker è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Codex Worker in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/lbc9168/antigravity-codex-worker/tree/main. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Codex Worker?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Codex Worker?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Codex Worker: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Codex Worker è gratuita?

Sì. È pubblicata su GitHub da lbc9168 con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇