Logo Codex Worker

Codex Worker

Cộng đồng
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").

Tổng quan

Nhà phát hànhlbc9168
Kho mãantigravity-codex-worker
Tên kỹ năngcodex-worker
Sao
174
Bản fork
4
Tệp đi kèm
5
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được lbc9168 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Codex Worker trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/lbc9168/antigravity-codex-worker/tree/main
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lbc9168/antigravity-codex-worker.git \
  .claude/skills/codex-worker
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Codex Worker trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Codex Worker ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Codex Worker với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Codex Worker làm được gì?

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

Vì sao nên dùng Codex Worker trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Codex Worker là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Codex Worker trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/lbc9168/antigravity-codex-worker/tree/main. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Codex Worker?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Codex Worker với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Codex Worker với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Codex Worker có miễn phí không?

Có. Kỹ năng này được lbc9168 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇