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

codex

하는 일

이 스킬은 자동화된 코딩 작업을 위한 작업자로 OpenAI Codex CLI를 실행합니다. 스크립트나 자동화로 코드 변경과 점검을 하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓채팅 창 없이 백그라운드에서 코딩 작업을 실행하고 싶을 때.
  • ✓스크립트, CI 작업, 서버에서 Codex를 설정해야 할 때.
  • ✓파일을 바꾸지 않고 코드베이스를 읽기 전용으로 분석하고 싶은 경우.

스킬 링크

https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/codex/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“제 저장소를 읽기 전용으로 검토하고, 파일을 바꾸지 않은 채 위험한 부분을 목록으로 정리해 주세요.”

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

작동 방식

에이전트는 안전한 샌드박스 설정으로 codex exec 명령을 사용하고, 작업을 프롬프트로 전달한 뒤 결과를 돌려줍니다. 실행 전에 도구가 설치되어 있는지 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Codex CLI

Use Codex CLI as a deterministic, non-interactive worker suitable for automation and agent orchestration.

Operating Rules

  1. Use codex exec, not the interactive codex TUI.
  2. Pass the task as the positional PROMPT argument. Do not use -p for the prompt; -p selects a profile.
  3. For ordinary unattended code changes, prefer:
codex exec \
  -C /path/to/repo \
  --sandbox workspace-write \
  --ask-for-approval never \
  "<TASK>"
  1. Use --yolo only inside an externally hardened and disposable runner. It disables Codex approvals and sandboxing.
  2. For harnesses and CI, prefer --json plus --output-last-message.
  3. Do not make the run depend on a human answering questions. Resolve ambiguity using repository evidence and conservative defaults.
  4. Treat credentials as secrets. Inject CODEX_API_KEY only into the single codex exec process when possible.
  5. Before giving version-sensitive advice, inspect codex exec --help or current official Codex documentation if available.
  6. On Windows, choose one execution environment per task: native PowerShell for Windows toolchains or WSL2 for Linux toolchains. Do not casually mix paths, installations, or authentication across them.

Choose the Execution Mode

Read-only analysis

Use when the task must not modify files:

codex exec \
  -C /path/to/repo \
  --sandbox read-only \
  --ask-for-approval never \
  "Analyze the repository and report risks. Do not modify files."

Workspace-scoped implementation

Use as the default for autonomous repository work:

codex exec \
  -C /path/to/repo \
  --sandbox workspace-write \
  --ask-for-approval never \
  "Implement the task, run relevant tests, and report unresolved blockers."

Externally isolated unrestricted execution

Use only when the enclosing container, VM, or sandbox enforces the real security boundary:

codex exec \
  -C /workspace/repo \
  --yolo \
  "Implement the task and validate the result."

Never recommend --yolo on a normal developer machine or a runner containing unrelated secrets, host mounts, SSH keys, cloud credentials, or a Docker socket.

Construct an Autonomous Prompt

When headless execution could encounter choices, prepend these instructions:

Work fully autonomously.

Do not ask the user questions and do not request interactive input.
Inspect the repository and available context before making assumptions.
When several valid approaches exist, choose the option that:
1. minimizes unrelated changes,
2. preserves backward compatibility,
3. introduces the fewest new dependencies,
4. avoids destructive or irreversible actions.

Continue until the task is complete or a concrete blocking error is reached.
Record assumptions, validation performed, and unresolved blockers in the final response.

Do not simulate "always select the first option." Option ordering is not a safety or quality policy. Apply the explicit decision rules above instead.

Handle request_user_input Failures

When Codex reports that request_user_input is unavailable in Default mode or non-interactive mode:

  1. Confirm the invocation uses codex exec and is intentionally headless.
  2. Add the autonomous prompt policy above.
  3. Supply missing decisions in the task prompt or AGENTS.md when they are known in advance.
  4. Replace open-ended requests such as "ask me which approach" with deterministic selection criteria.
  5. If the choice is safety-critical, destructive, or impossible to infer, make the run fail clearly rather than selecting randomly.
  6. Do not attempt to emulate terminal keystrokes unless the subprocess itself, rather than Codex, requires input and the workflow explicitly defines the safe answer.

Pass Prompts and Context

Use a direct positional prompt:

codex exec "Summarize the repository structure."

Read the prompt from stdin:

codex exec - < prompt.md

Pipe dynamic context while retaining an explicit task:

npm test 2>&1 | codex exec "Analyze this test output and fix the repository."

Use --skip-git-repo-check only for intentional one-off directories outside Git:

codex exec \
  --skip-git-repo-check \
  -C /tmp/task \
  "Analyze the files in this directory."

Produce Harness-Friendly Output

Capture only the final message

codex exec \
  -C /workspace/repo \
  --output-last-message /output/final.md \
  "Review the codebase."

Stream JSONL ev

자주 묻는 질문

실행 중에 질문하나요?

스킬은 사람이 지켜보지 않는 실행을 위해 만들어졌습니다. 그래서 모호한 부분은 저장소와 안전한 기본값으로 해결합니다.

API 키는 안전한가요?

스킬은 인증 정보를 비밀로 다루고, 그 키가 필요한 프로세스 하나에만 전달하라고 안내합니다.

Windows에서도 작동하나요?

네. 스킬은 기본 PowerShell과 WSL2를 모두 다루며, 작업마다 한 환경만 고르라고 안내합니다.

상세 정보

작성자의 원본 설명

Operate OpenAI Codex CLI in non-interactive headless environments. Load only when the user explicitly authorizes this skill or names Codex / codex. Before any command, confirm the `codex` binary is available; if missing, stop and give install or auth guidance. Covers `codex exec` automation in Bash or PowerShell, native Windows or WSL2, scripts, CI/CD, Docker, Kubernetes, remote servers, agent harnesses, sandbox and approval modes, JSONL events, session resume, and stdin prompts.

repo: XiaomiMiMo/MiMo-Code

인기도

GitHub 스타
14k
순위
#11305
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬