본문으로 건너뛰기
Skillpedia
에이전트20k · #10371

codex-cli

하는 일

이 스킬은 AI가 Codex를 비대화형 모드로 실행해 코딩, 분석, 검토를 돕도록 안내합니다. 다른 모델에게 작업을 수행하거나 확인하게 하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓코딩 또는 리팩터링 작업을 Codex에 맡기고 결과를 돌려받고 싶을 때.
  • ✓내 변경 사항을 두 번째 모델이 검토하고 문제를 짚어 주기를 원할 때.
  • ✓계획은 계속 세우는 동안 길고 반복적인 코딩 작업을 돌리고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/kortix-ai/suna/blob/dev/.agents/skills/codex-cli/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 리팩터링을 Codex에 맡기고, 무엇을 바꿨는지 알려 주셔서 제가 확인할 수 있게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI가 명확한 작업 지시를 작성하고, 선택한 폴더에서 샌드박스 설정과 함께 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가 내 컴퓨터에 전체 접근 권한을 갖나요?

아니요. 실행할 때마다 정해진 샌드박스 수준, 예를 들어 읽기 전용이나 작업 공간 쓰기 권한 안에서만 작동합니다.

OpenAI API 키가 필요한가요?

스킬은 ChatGPT 로그인으로 충분하다고 안내하며, codex login status 명령으로 확인할 수 있다고 설명합니다.

Codex의 보고를 믿어도 되나요?

아니요. 스킬은 Codex의 자체 보고를 하나의 주장으로 보므로, AI가 파일을 직접 확인하고 테스트를 다시 실행해야 한다고 안내합니다.

상세 정보

작성자의 원본 설명

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
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬