run-codex
向助手发出协助请求,适用于代码审核、逻辑推理、科学与哲学思考、深度分析、策略制定、市场分析等任务场景。
When & Why to Use This Skill
The run-codex skill empowers Claude to delegate high-complexity tasks to specialized external models such as GPT-5.1 Codex and o3 through the Model Context Protocol (MCP). By operating in a clean, isolated runtime environment, it ensures precision in code auditing, logical reasoning, and deep strategic analysis, making it an essential tool for developers and researchers requiring advanced problem-solving capabilities.
Use Cases
- Automated Code Auditing: Utilize the specialized Codex model to perform deep-dive reviews, identify security vulnerabilities, and suggest architectural refactoring in an isolated environment.
- Complex Logical & Scientific Reasoning: Leverage high-reasoning models like o3 to solve intricate mathematical problems, scientific theories, or philosophical inquiries that require extended thought processes.
- Strategic Market & Business Analysis: Conduct comprehensive market research and formulate data-driven business strategies by processing complex datasets without context contamination.
- Isolated Task Execution: Execute sensitive logic or code-heavy tasks in a dedicated, runtime-isolated workspace to ensure security and maintain a clean context for every request.
| name | run-codex |
|---|---|
| description | 向助手发出协助请求,适用于代码审核、逻辑推理、科学与哲学思考、深度分析、策略制定、市场分析等任务场景。 |
功能简介
通过 MCP 工具向一位外部助手发出协助请求,请对方在一个上下文干净的、运行时隔离的、独立环境中,执行代码审核、逻辑推理、科学与哲学思考、深度分析、策略制定、市场分析等任务。
使用方法
使用 mcp__plugin_headless-knight_runCLI__codex 工具来向助手发出请求,可传入参数包括:
prompt: string,从上下文整理出的完整的任务描述,必填参数systemPrompt: string,从上下文整理出的需要该助手遵守的系统提示词,用于约束他的行为,可选workDir: string,工作目录,默认为当前目录,可选model: string,指定使用哪个模型,取值为"gpt-5.1-codex"、"gpt-5.1"、"gpt-5-mini"、"gpt-5-nano"或"o3"等 OpenAI 的 GPT 系列模型的代号,可选,默认为 gpt-5.1-codexenv: object,自定义环境变量,键值对,可选
模型选择
- o3: 适用于复杂的科学、数学、逻辑推理、哲学思考、策略分析与制定等任务与问题
- gpt 5/5.1 系列: 适用于代码审核、重构方案制定、BUG 分析、数学科学与哲学问题的深度思考等任务与问题,根据任务或问题的难度调整使用原版、mini 版还是 nano 版,codex 版更专注于代码审核
相关环境变量
如果不另外设置,则自动使用当前对话上下文中的配置
OPENAI_API_KEY: Codex CLI 的 API_KeyHTTP_PROXY: HTTP 代理地址HTTPS_PROXY: HTTPS 代理地址ALL_PROXY: 默认代理地址OPENAI_CODEX_COMMAND: Codex 命令行地址或名称(确保在 PATH 中包含了路径)NODE_ENV: 环境参数,比如 "development"