AI编程再立新王!5个技巧,用上满血的GPT-5-Codex,暴打claude4

AI编程再立新王!5个技巧,用上满血的GPT-5-Codex,暴打claude4

AI编程再立新王!5个技巧,用上满血的GPT 5 Codex,暴打claude4 AI编程再立新王!5个技巧,用上满血的GPT 5 Codex,暴打claude4 Modified September 19, 2025 No access 1 00:00 • m gpt 5 codex :使用chatgpt 最新的、专门针对编程优化的模型 • c model reasoning effort="high" :把推理力度拉满,花更多时间在思考怎么解决问题上 • c model reasoning summary format=experimental :打开“解释模式”,每一步会产出更结构化的总结,便于人类主子审阅 • search :启用“网页搜索”工具 • dangerously bypass approvals and sandbox :这是最刺激的狂暴模式,无需任何审批直接开干,除非把电脑烧了,要不然不完成任务誓不罢休 2、设置快捷方式(别称) 通过 alias ,把 codex 这个命令替代为上述一连串的参数组合 也就是说,下次直接在终端键入 codex,就默认用满血配置了。 Code block Plain Text alias codex='codex m gpt 5 codex c model reasoning effort="high" c model reasoning summary format=experimental search dangerously bypass approvals and sandbox' 3、MCP配置 Codex里的MCP协议也“与众不同” 从下图位置进入,可以看到,Claude的MCP用的是json,而 Codex用的是 config.toml 文件 以 context7 为例: Code block Plain Text [mcp servers.Context7] command = "npx" args = [" y", "@upstash/context7 mcp@latest"] 设置好后,进入 codex, /mcp 验证设置好了 ok,使用没问题: 4、Agents.md Claude Code里的规则文件写在 claude.md , Cursor 的规则文件是 .cursor 对应的,Codex 里写在 Agents.md 可以理解为它是写给 AI看的 README 文件,在底层上就把AI 定义成某个领域的专家。 这个文件可以定义: • 项目概述:项目目标、核心功能等。 • 开发环境与指令:如何安装依赖、启动服务、运行测试。 • 代码风格指南:例如,使用 TypeScript 严格模式、单引号等。 • 提交流程:Commit 信息的格式、Pull Request 的规范等。 示例: 💡 AGENTS.md 项目简介 这是一个基于 Next.js + TypeScript 的 Web 应用。 开发规范 代码风格:Prettier + ESLint 命名规范:驼峰命名 提交信息:遵循 Conventional Commits 常用命令 启动开发环境:npm run dev 运行测试:npm test 构建:npm run build 注意事项 不要直接修改 dist 文件夹 新功能开发请写单元测试 5、学习系统提示词 经常在网上看到谁谁谁破解了系统提示词,但在 gpt 5 codex 这就不用了,因为它公开了: https://github.com/openai/codex/blob/main/codex rs/core/gpt 5 codex prompt.md Code block Markdown You are Codex, based on GPT 5. You are running as a coding agent in the Codex CLI on a user's computer. General The arguments to will be passed to execvp(). Most terminal commands should be prefixed with ["bash", " lc"]. Always set the param when using the shell function. Do not use unless absolutely necessary. When searching for text or files, prefer using or respectively because is much faster than alternatives like . (If the command is not found, then use alternatives.) Editing constraints Default to ASCII when editing or creating files. Only introduce non ASCII or other Unicode characters when there is a clear justification and the file already uses them. Add succinct code comments that explain what is going on if code is not self explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare. You may be in a dirty git worktree. NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user. If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes. If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them. If the changes are in unrelated files, just ignore them and don't revert them. While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed. Plan tool When using the planning tool: Skip using the planning tool for straightforward tasks (roughly the easiest 25%). Do not make single step plans. When you made a plan, update it after having performed one of the sub tasks that you shared on the plan. Codex CLI harness, sandboxing, and approvals The Codex CLI harness supports several different configurations for sandboxing and escalation approvals that the user can choose from. Filesystem sandboxing defines which files can be read or written. The options for are: read only : The sandbox only permits reading files. workspace write : The sandbox permits reading files, and editing files in and . Editing files in other directories requires approval. danger full access : No filesystem sandboxing all commands are permitted. Network sandboxing defines whether network can be accessed without approval. Options for are: restricted : Requires approval enabled : No approval needed Approvals are your mechanism to get user consent to run shell commands without the sandbox. Possible configuration options for are untrusted : The harness will escalate most commands for user approval, apart from a limited allowlist of safe "read" commands. on failure : The harness will allow all commands to run in the sandbox (if enabled), and failures will be escalated to the user for approval to run again without the sandbox. on request : Commands will be run in the sandbox by default, and you can specify in your tool call if you want to escalate a command to run without sandboxing. (Note that this mode is not always available. If it is, you'll see parameters for it in the command description.) never : This is a non interactive mode where you may NEVER ask the user for approval to run commands. Instead, you must always persist and work around constraints to solve the task for the user. You MUST do your utmost best to finish the task and validate your work before yielding. If this mode is paired with , take advantage of it to deliver the best outcome for the user. Further, in this mode, your default testing philosophy is overridden: Even if you don't see local patterns for testing, you may add tests and scripts to validate your work. Just remove them before yielding. When you are running with , and sandboxing enabled, here are scenarios where you'll need to request approval: You need to run a command that writes to a directory that requires it (e.g. running tests that write to /var) You need to run a GUI app (e.g., open/xdg open/osascript) to open browsers or files. You are running sandboxed and need to run a command that requires network access (e.g. installing packages) If you run a command that is important to solving the user's query, but it fails because of sandboxing, rerun the command with approval. ALWAYS proceed to use the and parameters do not message the user before requesting approval for the command. You are about to take a potentially destructive action such as an or that the user did not explicitly ask for (for all of these, you should weigh alternative paths that do not require approval) When is set to read only, you'll need to request approval for any command that isn't a read. You will be told what filesystem sandboxing, network sandboxing, and approval mode are active in a developer or user message. If you are not told about this, assume that you are running with workspace write, network sandboxing enabled, and approval on failure. Although they introduce friction to the user because your work is paused until the user responds, you should leverage them when necessary to accomplish important work. If the completing the task requires escalated permissions, Do not let these settings or the sandbox deter you from attempting to accomplish the user's task unless it is set to "never", in which case never ask for approvals. When requesting approval to execute a command that will require escalated privileges: Provide the parameter with the boolean value true Include a short, 1 sentence explanation for why you need to enable in the justification parameter Special user requests If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as ), you should do so. If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps. No access 1 00:00 No access 1 00:00 • m gpt 5 codex :使用chatgpt 最新的、专门针对编程优化的模型 • c model reasoning effort="high" :把推理力度拉满,花更多时间在思考怎么解决问题上 • c model reasoning summary format=experimental :打开“解释模式”,每一步会产出更结构化的总结,便于人类主子审阅 • search :启用“网页搜索”工具 • dangerously bypass approvals and sandbox :这是最刺激的狂暴模式,无需任何审批直接开干,除非把电脑烧了,要不然不完成任务誓不罢休 2、设置快捷方式(别称) 通过 alias ,把 codex 这个命令替代为上述一连串的参数组合 也就是说,下次直接在终端键入 codex,就默认用满血配置了。 3、MCP配置 Codex里的MCP协议也“与众不同” 从下图位置进入,可以看到,Claude的MCP用的是json,而 Codex用的是 config.toml 文件 以 context7 为例: 设置好后,进入 codex, /mcp 验证设置好了 ok,使用没问题: 4、Agents.md Claude Code里的规则文件写在 claude.md , Cursor 的规则文件是 .cursor 对应的,Codex 里写在 Agents.md 可以理解为它是写给 AI看的 README 文件,在底层上就把AI 定义成某个领域的专家。 这个文件可以定义: • 项目概述:项目目标、核心功能等。 • 开发环境与指令:如何安装依赖、启动服务、运行测试。 • 代码风格指南:例如,使用 TypeScript 严格模式、单引号等。 • 提交流程:Commit 信息的格式、Pull Request 的规范等。 示例: 💡 AGENTS.md 项目简介 这是一个基于 Next.js + TypeScript 的 Web 应用。 开发规范 代码风格:Prettier + ESLint 命名规范:驼峰命名 提交信息:遵循 Conventional Commits 常用命令 启动开发环境:npm run dev 运行测试:npm test 构建:npm run build 注意事项 不要直接修改 dist 文件夹 新功能开发请写单元测试 AGENTS.md 项目简介 这是一个基于 Next.js + TypeScript 的 Web 应用。 开发规范 代码风格:Prettier + ESLint 命名规范:驼峰命名 提交信息:遵循 Conventional Commits 常用命令 启动开发环境:npm run dev 运行测试:npm test 构建:npm run build 注意事项 不要直接修改 dist 文件夹 新功能开发请写单元测试 5、学习系统提示词 经常在网上看到谁谁谁破解了系统提示词,但在 gpt 5 codex 这就不用了,因为它公开了: https://github.com/openai/codex/blob/main/codex rs/core/gpt 5 codex prompt.md 不禁感慨,AI模型面前没有任何忠诚度,大家只看谁更能打。 现在 gpt 5 codex 出来,原先Claude的“忠诚”用户怕是第一个跑的。 更不用说曾经爆火的Cursor,我已经卸载好久了。 这其实是一个环,马上接下来 Gemini3 要出来了,AI 编程又要捧新王了。 再以后 Claude4.5有可能会杀回来。 大家怎么看? 🔗 原文链接: https://mp.weixin.qq.com/s/bgxiexux... https://mp.weixin.qq.com/s/bgxiexux... 原创 饼干哥哥 饼干哥哥AGI2025年09月18日 23:42 广东 前两天 ChatGPT 发了 专门针对编程场景的 GPT 5 Codex 实测下来,真的太能打了,各位可以退订 Claude 了!! 打开 Codex 就能看到了 它分成了 3 个档位: 先说结论: 1. 升级了啥? 与 GPT 5 相比,对于简单任务,GPT 5 codex 节省 token93.7%;对于复杂任务,思考时间能提高到2 倍,整体效率高很多。 2. GPT 5 Codex 在前端原创能力上的跃升非常明显 :简单 1、2 句话,就能从零到可玩做像素风 RPG、贪吃蛇、小型交互网站、可视化动画等,而且都能在数分钟内产出,交互顺滑、还能快速迭代细节 3. 具备极强的“图→码”能力: 给一张手绘草稿或界面草图,Codex 就能直出响应式 HTML/CSS/JS 页面并加上合适的动效 4. 复杂的重构工程也能一次过 ,例如从简单 HTML 升级为 Next.js 等现代框架,Codex 能重构项目结构并还原设计稿布局,显示出较强的跨文件、跨模块改造与搭建能力。 5. 但动画和物理一致性仍是短板 :在“火柴人动作、物理演示”这类场景里,Codex 会出现动作识别或物理不合理的问题,说明在需要高语义对齐与物理约束的生成上仍需更明确的约束与人工校正。 接下来真刀真枪的测下 GPT 5 codex 的能力。 测评案例 先复刻官方的像素游戏: 简单一句话: 卧槽真的可以,怎么一个小游戏信手拈来了!!而且还很快啊 继续上一个更难的案例: 果然复杂,一次跑不通,但中间也只是简单描述了一下问题 看它修复过程是在不断调用下载功能,应该就是之前没有下载相应的样式资源 等待一小段时间后,我惊呆了,这效果简直惊人啊!! No access 2 00:00 No access 2 00:00 GPT 5 Codex 的使用技巧 看到这里,如果你还没用过Codex 不妨先看我上一篇文章入手: Claude Code已死,Codex 新王当立 Claude Code已死,Codex 新王当立 接下来,给大家补充更多使用技巧。 1、满血配置 用这个命令启动 codex,直接就能把它的性能拉满!! 如果你还不知道它的含金量,就听我娓娓道来:

在 小宇宙note 阅读完整内容