Automatically translated.View original post

How to use codex together with claude in the same folder

This range is starting to use more Claude Code + Codex counterparts.

And I found that many times the Codex solved Claude's infinite point.

So give it an audit.

See how to get both of them to work and understand projects in the same folder... 👇🏻

We don't need to build a new project.

Or duplicate projects to move to Codex.

Because actually both Claude Code and Codex

The same Knowledge Base can be used, e.g.

• docs

• Cite

• scripts

• Context files

• Various wiki

What's really different is only config and instruction structure.

Claude Code uses:

• CLAUDE.md

• .claude /

Codex uses:

• AGENTS.md

• .codex /

• agents /

👇🏻

Which AI can almost completely convert us to.

📌 keep this Prompt available:

"This project was built with Claude Code.

Help create AGENTS.md, .codex config.

Move skills / agents to suit Codex

And read the docs of both tools to convert them correctly. "

Another very useful technique is the Handoff Session.

Let Claude conclude:

• Context

• Active Files

• Decisions

• Next Steps

And then copy it for Codex to continue immediately.

Finally, a very important mindset is:

Don't lock yourself in with one tool.

Be a Tool-Agnostic.

Use each Agent according to its strengths. 🚀

5/19 Edited to

... Read moreจากประสบการณ์การทำงานกับ AI Agents อย่าง Claude Code และ Codex การใช้ทั้งสองเครื่องมือนี้ในโปรเจกต์เดียวกันสามารถช่วยเพิ่มประสิทธิภาพและความแม่นยำในการแก้ไขโค้ดเป็นอย่างมาก สิ่งที่ผมพบว่ามีประโยชน์คือการใช้ Knowledge Base ร่วมกัน เช่นเอกสาร (docs), เอกสารอ้างอิง (references), สคริปต์ (scripts) และไฟล์ context ต่าง ๆ ทำให้ทั้ง Claude Code และ Codex สามารถทำงานประสานกันโดยไม่เสีย context ของโปรเจกต์ แม้ทั้งสองจะมีโครงสร้างของ config และ instruction ที่แตกต่างกัน เช่น Claude ใช้ CLAUDE.md กับโฟลเดอร์ .claude/ ขณะที่ Codex ใช้ AGENTS.md และโฟลเดอร์ .codex/ กับ agents/ แต่ด้วยการใช้ AI ในการช่วยแปลงไฟล์และย้ายความสามารถ (skills/agents) ทำให้ไม่ต้องตั้งค่าใหม่ทั้งหมดทีละขั้นตอน เทคนิคที่ผมชอบใช้มากคือ Session Handoff โดยเริ่มจากให้ Claude สรุปข้อมูลสำคัญ เช่น context ของโปรเจกต์, ไฟล์ที่กำลังใช้งาน, การตัดสินใจที่ผ่านมา และขั้นตอนถัดไป จากนั้นก็ส่งต่อให้ Codex ทำงานต่อทันที ซึ่งช่วยลดเวลาการเริ่มต้นและรักษาความต่อเนื่องของงาน ข้อคิดสำคัญคือการไม่ยึดติดกับเครื่องมือเดียว (Tool-Agnostic) เพราะแต่ละ Agent มีจุดแข็งที่แตกต่างกัน การปรับใช้ให้เหมาะสมจะช่วยเพิ่ม productivity ได้อย่างมาก ผมเองพบว่าการใช้ Claude Code คู่กับ Codex อย่างมีระบบทำให้การทำงานลื่นไหลและลดข้อผิดพลาดลงมาก สุดท้าย การเข้าใจและจัดการกับ config และ instruction structure ให้ถูกต้องคือหัวใจที่จะทำให้การใช้ Claude Code และ Codex ร่วมกันในโฟลเดอร์เดียวกันเกิดประโยชน์สูงสุด ผมแนะนำให้เก็บ Prompt สำหรับแปลงโปรเจกต์ไว้ใช้ เช่น "โปรเจกต์นี้สร้างด้วย Claude Code ช่วยสร้าง AGENTS.md, .codex config ย้าย skills/agents ให้เหมาะกับ Codex และอ่าน docs ของทั้งสอง tool เพื่อแปลงให้ถูกต้อง" เนื่องจากจะช่วยให้ AI ทำงานแปลงไฟล์ได้อัตโนมัติและแม่นยำมากขึ้น การใช้สองเครื่องมือนี้ไม่เพียงแต่ช่วยแก้ไขจุดที่อีกตัวทำไม่ได้นั้นได้เท่านั้น แต่ยังช่วยเพิ่มความยืดหยุ่นและความสามารถในการจัดการโปรเจกต์ที่ซับซ้อนได้อย่างมีประสิทธิภาพ