codex-mcp-dev

👤 hollywood3 📦 v1.0.0 ⭐ 4.4 ⬇️ 841 下载
💻 开发编程 免费

📖 技能介绍


name: codex-mcp-dev description: Use the local Codex CLI through mcporter and codex-mcp-server for real coding work in the current project. Use when the user asks to build features, fix bugs, refactor code, debug failures, write or update tests, review implementation options, or otherwise delegate non-trivial development work to the machine-local Codex installation.


Codex MCP Dev

Use the local Codex installation through the wrapper script at {baseDir}/scripts/codex_mcp.py. This gives a stable path:

OpenClaw → mcporter → codex-mcp-server → local codex

Quick Setup

Install prerequisites first:

  • mcporter
  • local codex
  • codex-mcp

Create the project MCP entry if config/mcporter.json does not exist yet:

mcporter config add codex-cli --scope project --command codex-mcp

This skill expects a workspace-local MCP server named codex-cli.

Workflow

  1. Use this skill for non-trivial coding tasks.
  2. If it is the first use in a session or something looks broken, run:
  3. python3 {baseDir}/scripts/codex_mcp.py doctor
  4. Choose a mode:
  5. Analysis / planning / explanation: use ask without --full-auto
  6. Implementation / refactor / test-writing: use ask --full-auto
  7. Always set --cwd to the target repo or project directory.
  8. Give Codex a concrete prompt with files, constraints, and acceptance criteria.
  9. After Codex responds, inspect files and run local tests yourself when feasible instead of trusting the tool output blindly.
  10. Summarize changes, tests run, and any remaining risks.

Good Uses

  • Implementing features across multiple files
  • Fixing bugs with real repo context
  • Refactoring with constraints
  • Writing or updating tests
  • Debugging failing commands or stack traces
  • Asking local Codex for a second implementation pass or review

Command Patterns

Health check

python3 {baseDir}/scripts/codex_mcp.py doctor

Version info

python3 {baseDir}/scripts/codex_mcp.py version

Normal implementation

python3 {baseDir}/scripts/codex_mcp.py ask \
  --cwd /absolute/path/to/repo \
  --full-auto \
  --prompt "Implement the requested change, update tests, and summarize what changed."

Read-only analysis

python3 {baseDir}/scripts/codex_mcp.py ask \
  --cwd /absolute/path/to/repo \
  --sandbox-mode read-only \
  --approval-policy never \
  --prompt "Explain the bug, identify likely root cause, and propose the smallest safe fix."

Long prompt from file

python3 {baseDir}/scripts/codex_mcp.py ask \
  --cwd /absolute/path/to/repo \
  --full-auto \
  --prompt-file /tmp/codex-task.txt

Prompting Rules

Include as many of these as possible:

7w4.net小葱技能站收录全网优质技能,值得收藏。

  • Target files or directories
  • Desired behavior
  • Exact error messages or failing tests
  • Constraints on scope
  • Required test updates
  • Expected output format

Prefer prompts like:

  • "Fix the failing test in tests/api.test.ts without changing public behavior. Run the relevant tests and summarize the root cause."
  • "Refactor src/cache.py for readability, keep behavior identical, and add regression tests for TTL edge cases."
  • "Review the auth flow in server/ and identify the top 3 correctness risks with concrete file references."

Guardrails

  • Prefer --full-auto for ordinary implementation work.
  • Do not use --yolo unless the user explicitly wants aggressive execution.
  • Use repo-specific --cwd; do not run against the wrong directory.
  • Validate with local reads/tests when possible.
  • If the task is tiny or surgical, skip this skill and edit directly.

🤖 AI 评测

这个 Skill 质量不错,文档写得很详细清楚,操作流程设计合理。优点是功能划分清晰,有健康检查和多种使用模式,安全建议也很到位。缺点是配置依赖较多,新手上手需要先装一堆工具;文件结构太简单,缺少示例文件参考。总体适合有一定经验的开发者使用。

📊 多维度评分

适应性4.8
规范性4.3
有效性4.3
可靠性4.5
可信度4.2

📁 包含文件 (3 个)

📄 SKILL.md 3.5 KB
📄 _meta.json 132 B
📄 scripts/codex_mcp.py 7 KB