ワンクリックで
codex
Use the OpenAI Codex CLI for quick fixes, targeted edits, and non-interactive automation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use the OpenAI Codex CLI for quick fixes, targeted edits, and non-interactive automation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Feishu/Lark platform interaction via MCP - documents, tasks, calendar, Bitable, messaging
Use the Claude Code CLI for complex refactors, multi-file changes, and sustained codebase exploration
Use external coding tools (Claude Code, Codex, Cursor) via invoke_coding_tool and coding_tool_apply to implement, debug, and refactor code
Use the Cursor CLI agent mode for IDE-integrated coding with project rules and repo-aware edits
Learn from experience — capture insights, organize knowledge, share reusable practices as skills, and refine your role over time
Design and create AI agent packages — manifest format, directory structure, file writing workflow
| name | codex |
| description | Use the OpenAI Codex CLI for quick fixes, targeted edits, and non-interactive automation |
Codex (codex binary) is OpenAI's agentic coding CLI. Markus invokes it via invoke_coding_tool({ tool: "codex", ... }). Use it for fast, focused changes where speed and non-interactive automation matter more than deep multi-turn exploration.
npm install -g @openai/codex
codex --version
Verify with markus doctor. Requires authentication via codex login or CODEX_API_KEY env var for non-interactive mode.
Markus runs Codex in fully automated, non-interactive mode:
codex exec --full-auto --json --skip-git-repo-check "<prompt>"
| Flag | Purpose |
|---|---|
exec --full-auto | Non-interactive mode — auto-approves all file edits and shell commands |
--json | Emits JSONL events for structured progress parsing |
--skip-git-repo-check | Allows running outside strict git repo requirements |
Additional args can be configured via CodingToolConfig.defaultArgs.
In a Markus agent session, there is no human at the terminal to approve Codex actions. The exec --full-auto mode is essential:
Note: OPENAI_BASE_URL is deprecated and no longer supported by Codex CLI. Custom endpoint configuration should use ~/.codex/config.toml.
Implication: Write precise prompts with clear scope boundaries. Codex will act autonomously on whatever the prompt authorizes.
Codex reads project-level instruction files to understand repo conventions. The standard file is AGENTS.md in the repository root — a markdown file describing:
If the repo already has AGENTS.md, Codex uses it automatically. Ensure it stays accurate for the project.
When you pass task_id to invoke_coding_tool, Markus additionally writes task-specific context to:
.agent_context/task_context.md
This file contains the full Markus task context (title, description, dependencies, progress-reporting CLI commands). Codex can read it during execution alongside any existing AGENTS.md.
Best practice: Keep permanent project guidance in AGENTS.md. Task-specific instructions come from Markus injection — do not manually duplicate task details into AGENTS.md.
Codex runs in a sandboxed environment that restricts what the agent can access:
workdir)Implications for prompts:
pnpm test packages/core)If Codex fails due to sandbox restrictions, note the error and either adjust the prompt to work within constraints or switch to claude-code for less restrictive execution.
invoke_coding_tool({
tool: "codex",
prompt: "Fix the off-by-one error in src/utils/pagination.ts line 42. The page size should default to 20, not 21. Run tests in that package after fixing.",
workdir: "/path/to/repo",
task_id: "task-456"
})
invoke_coding_tool({
tool: "codex",
prompt: "Add a --json flag to the task list command in packages/cli/src/commands/task.ts. Follow the existing output pattern used by other commands. Add a test case.",
workdir: "/path/to/repo",
task_id: "task-456"
})
invoke_coding_tool({
tool: "codex",
prompt: "Update the GitHub Actions workflow in .github/workflows/test.yml to add a matrix entry for Node 22. Do not change other jobs.",
workdir: "/path/to/repo",
task_id: "task-456"
})
| Choose Codex | Choose something else |
|---|---|
| Single-file or few-file fix | Multi-package refactor → claude-code |
| Clear, narrow prompt | Exploratory "figure out how this works" → claude-code |
| Speed is priority | Need token/cost reporting → claude-code |
Repo has good AGENTS.md | Heavy .cursor/rules setup → cursor-agent |
Codex supports per-invocation model and effort overrides:
invoke_coding_tool({
tool: "codex",
prompt: "...",
model: "gpt-5-codex", // default if not specified
effort: "medium", // sets CODEX_REASONING_EFFORT env var
})
| Model | Best for | Cost note |
|---|---|---|
gpt-5.4-mini | Trivial fixes, typos, config | Cheapest option |
gpt-5-codex | Standard coding work | Cost-effective default for coding |
gpt-5.5 | Complex reasoning, architecture | ~4x more expensive than gpt-5-codex |
Strategy: gpt-5-codex is the right default for most Codex work. Only use gpt-5.5 when the task involves complex reasoning that simpler models fail at. Prefer gpt-5.4-mini for trivial, low-risk changes.
minimal / low — Simple fixes with minimal reasoningmedium — Standard development (default)high / xhigh — Complex problem solving, only when neededCodex does not expose structured cost data through Markus. Estimate cost by:
Voluntarily call request_user_approval before using gpt-5.5 for tasks that might run long.
Focus on result quality:
result.success and result.summaryresult.modifiedFiles — should match expected scoperesult.testResult if quality verification ranresult.error and retry with a narrower promptIf Codex modifies unexpected files, discard changes (git checkout -- . in workdir) and re-invoke with explicit file boundaries:
"Modify ONLY packages/cli/src/commands/task.ts. Do not touch any other files."
AGENTS.md exists for project conventions (create or update if missing)task_id for task context injectiongit diff before coding_tool_applygpt-5-codex as the default — escalate only when justifiedexec --full-auto is handled by Markus — do not try to run Codex interactively from an agentCodex runs in --full-auto mode by default, which means it will make changes without asking for confirmation. This makes quality verification especially important:
result.diffStats and result.modifiedFiles before coding_tool_applyshell_execute before applyingAGENTS.md in project reposgpt-5-codex for cost-effectivenessclaude-codegpt-5.5 by default — its cost is ~4x higher