Перейти к содержанию
Skillpedia
Агенты20k · #10371

codex-cli

Что он делает

Этот скилл показывает ИИ, как запускать Codex в неинтерактивном режиме как помощника для кода, анализа или ревью. Он нужен разработчикам, которые хотят, чтобы другая модель выполнила или проверила задачу.

Когда использовать

  • ✓Когда вы хотите передать задачу по коду или рефакторингу Codex и получить результат обратно.
  • ✓Когда вы хотите, чтобы вторая модель проверила ваши изменения и указала на проблемы.
  • ✓Когда вы хотите запустить долгую однотипную задачу по коду, пока сами продолжаете планировать работу.

Ссылка на скилл

https://github.com/kortix-ai/suna/blob/dev/.agents/skills/codex-cli/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/kortix-ai/suna/blob/dev/.agents/skills/codex-cli/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Передай этот рефакторинг Codex и расскажи, что он изменил, чтобы я смог проверить.”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

ИИ формулирует задачу, запускает codex exec в выбранной папке с настройкой песочницы, сохраняет итоговое сообщение в файл, а затем сам проверяет изменённые файлы и тесты.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

<skill name="codex-cli"> <overview> Codex CLI is OpenAI's terminal coding agent (Rust). Its **non-interactive** mode, `codex exec`, makes it a perfect disposable sub-agent: you write the metaprompt, Codex explores/edits/runs commands on its own, and returns a final message you capture and verify. You stay the long-context planner; Codex is the implementer.

The golden rule: Codex's self-report is a claim, not the truth. Always capture its output, then independently verify the artifacts yourself (read the files, re-run the tests) before treating the task as done.

Verified available on this machine: codex-cli 0.137.0, logged in via ChatGPT (no API key needed). Confirm with codex login status. </overview>

<the-core-command> The one shape you'll use most:
codex exec \
  --cd <workdir> \
  --sandbox <read-only|workspace-write|danger-full-access> \
  -o /tmp/codex_<rand>.txt \
  "your metaprompt here"  2>>/tmp/codex_<rand>.log
  • Prompt as the final arg, OR pipe via stdin: echo "$PROMPT" | codex exec - (good for long/generated prompts). If both are given, stdin is appended.
  • -o, --output-last-message <file> — writes ONLY Codex's final message to a file. This is your clean capture; read it back, don't scrape the TUI stream.
  • 2>>/tmp/...log — Codex streams progress/reasoning to stderr; the final message goes to stdout. Redirect stderr to a log so it doesn't bloat your context. Generate the suffix with openssl rand -hex 4.
  • --cd <dir> — Codex's working root. Scope it to the relevant subdir (e.g. apps/api), not the whole monorepo, so it stays focused.
  • --skip-git-repo-check — only needed when running outside a git repo.</the-core-command>
<sandbox-tiers> Pick the **least** privilege that lets the task succeed:
  • read-only (default) — Codex can read/grep/run read-only commands but cannot edit files or hit the network. Use for review, analysis, planning, "find the bug", second opinions.
  • workspace-write — can edit files in --cd (and --add-dir paths) and run commands, but no network by default. Use for real implementation/refactors.
  • danger-full-access — no sandbox at all. Avoid; only for throwaway/ephemeral dirs you fully control.

Approvals: in exec mode Codex does not prompt for approvals. For a fully autonomous run with no gating at all, add --dangerously-bypass-approvals-and-sandbox. This is powerful — only use it when the user has explicitly authorized autonomous edits AND the --cd is scoped, or when running in an already-sandboxed/throwaway dir. When unsure, ask the user which sandbox tier before running with write access. </sandbox-tiers>

<output-modes> - Default: human-readable, final message on stdout (+ capture with `-o`). - `--json` — newline-delimited JSON events on stdout (tool calls, file changes, messages). Use when you want to parse what Codex actually did, not just its prose summary. - `--output-schema <file.json>` — force Codex's final response to conform to a JSON Schema. Use for reliable structured hand-back (e.g. a list of findings). - `-m, --model <model>` — pin the model. `-i, --image <file>` — attach images. `--add-dir <dir>` — extra writable roots. `--ephemeral` — don't persist the session to disk. </output-modes> <session-resume> Codex sessions are stateful. To continue a prior run with its context intact:
codex exec resume --last "now also update the tests"   # most recent session
codex exec resume <session-id> "..."                   # a specific one

The session id is printed at the start of each exec run. Use resume for multi-turn delegation (draft → refine → fix) instead of re-sending all context. </session-resume>

<delegation-patterns> - **One-shot task** — scope `--cd`, `workspace-write`, `-o` capture, verify. - **Second opinion / adversarial review** — `read-only`, ask Codex to find bugs or critique your diff. Different model, different blind spots. - **Plan/implement split** — you write the spec, Codex implements it, you review. - **Refactor + test split** — Codex does the mechanical edit; you write/verify the tests (or vice-versa). Cross-checking catches more. - **Parallel fan-out** — for N independent files/tasks, launch N `codex exec` runs, each with its own `-o`/log file. To avoid edit collisions when multiple WRITE runs touch the repo at once, give each its own git worktree (`git worktree add`) and point `--cd` there. - **Cost routing** — small mechanical fixes → C
Частые вопросы

Получает ли Codex полный доступ к моему компьютеру?

Нет. Он работает в рамках уровня песочницы, заданного для каждого запуска, например только чтение или запись в рабочую папку.

Нужен ли ключ API OpenAI?

Скилл говорит, что достаточно входа через ChatGPT, и это можно проверить командой codex login status.

Стоит ли доверять отчёту Codex?

Нет. Скилл говорит, что самоотчёт — это утверждение, поэтому ИИ должен сам проверить файлы и заново запустить тесты.

Подробности

Оригинальное описание автора

Drive OpenAI's Codex CLI (`codex exec`) as a non-interactive coding sub-agent from inside Claude Code. Load WHENEVER you want to delegate a coding/analysis/refactor task to Codex, get a second opinion / adversarial review from another model, fan out parallel agents across files or worktrees, or run a long mechanical job while you stay the planner. Covers the exact `codex exec` flags, sandbox tiers, output capture, JSON/schema modes, session resume, parallel fan-out, and the mandatory "delegate → capture → independently verify, never trust the self-report" supervision loop.

repo: kortix-ai/suna

Популярность

Звёзды на GitHub
20k
Место в рейтинге
#10371
Лицензия
—
Обновлён
02.11.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы