OpenAI Codex Tutorial #6 - Using the AGENTS.md file — Transcript
Full transcript
- 0:00Okay then my friends in the previous
- 0:02lesson we talked about commands which
- 0:04come baked into the Codex CLI tool and
- 0:07one of those commands was the init
- 0:08command which generates an agents.md
- 0:11file for us in this project. Now we're
- 0:13going to run this command shortly but
- 0:15just very quickly first of all I want to
- 0:16talk about what an agents file actually
- 0:18is and why we would use one. So you can
- 0:21think of an agents file as a bit like a
- 0:24readme but instead of being written for
- 0:25humans it's written for the coding
- 0:27agents that you're working with. It
- 0:29lives in your project, usually in the
- 0:31root folder, and it tells the agent how
- 0:33your codebase works, what commands it
- 0:35should use to build and test things,
- 0:37what coding styles you prefer, how your
- 0:39project is structured, and so forth.
- 0:41It's basically like a little cheat sheet
- 0:43that helps the agent slot into your
- 0:44workflow and code basically how you
- 0:47would like them to code. So, Codeex
- 0:50leans heavily into this agents.md file.
- 0:53And whenever you ask Codeex to do
- 0:55something either locally or on Codex
- 0:57cloud, it's going to look for that file
- 0:59in your project, if it's there, it's
- 1:01going to use any information inside that
- 1:03file as context within your prompts and
- 1:05any task that you give it. If you've
- 1:08used any other AI coding agents like
- 1:11Claude Code or Copilot, you have
- 1:13probably seen similar kinds of files in
- 1:15those things. In Clawed Code, we use a
- 1:17claw.md file for projectwide
- 1:19instructions. And in copilot, we use a
- 1:22copilot instructions markdown file for
- 1:24the same kind of uh stuff. And these all
- 1:27serve a similar purpose, right? In that
- 1:29they give each agent memory and concise
- 1:32project context. Where they differ is
- 1:35that the agents.mmd file is being pushed
- 1:38as a standard across different AI coding
- 1:41tools. So that instead of juggling these
- 1:43different files for different coding
- 1:44agents, the idea is that we can have
- 1:47just a unified agents file which could
- 1:50then be used across all of them. And
- 1:52there's already a bunch of different
- 1:53tools incorporating this agents.mmd
- 1:55file. So let's head back to the code
- 1:58then and use the codec cli to scaffold
- 2:01an agents file for us. Okay then. So I'm
- 2:04currently in a codec session and I'm
- 2:06going to use the init command to
- 2:08generate a new agents.mmd file. And when
- 2:12we use this command, codeex is
- 2:14automatically going to scan the codebase
- 2:16and scaffold the file for us with any
- 2:18code styles, testing preferences, and
- 2:21other things it finds. Sometimes it
- 2:23might add its own personal preferences
- 2:25as well. So you have to rein those in a
- 2:27little bit if you see those. And along
- 2:29the way, we might need to approve
- 2:30certain commands as well. But then after
- 2:32a few moments, it's going to make it for
- 2:33us and place it in the root of our
- 2:35project. Okay, so it looks like it's
- 2:38done it. Let's go and have a look over
- 2:40here at this new file. And you can see
- 2:42it's written some fairly comprehensive
- 2:44guidelines. It's a little lean, but you
- 2:47can always add to this later. So we have
- 2:49different headings for different things.
- 2:50So for example, the project structure
- 2:52and module organization talks about
- 2:54where different things live. So we have
- 2:57the app which lives inside this folder
- 2:59and then we have different route
- 3:02segments like this. We also have the
- 3:04layout and the global CSS file. Reusable
- 3:07UI components live here. Okay. So that
- 3:09all looks pretty good. Uh we've got some
- 3:12building testing and development
- 3:13commands down here which all look quite
- 3:16accurate. Yep. Then we have some coding
- 3:19style and naming conventions. It says
- 3:21use Pascal case like this. Okay. So
- 3:24basically this is all generic stuff but
- 3:26all it's doing is looking at our current
- 3:29uh project as it is at the moment and
- 3:32inferring the guidelines from there and
- 3:34it all looks quite accurate at the
- 3:36moment. It's got some testing guidelines
- 3:38down here as well and it talks about
- 3:41this test folder to put the test inside
- 3:44and then at the bottom we've got some
- 3:45commit and pull request guidelines as
- 3:47well. Awesome. So then you should also
- 3:50probably commit this agents file to your
- 3:52GitHub repository if you want the Codex
- 3:54cloud to use it when you're running
- 3:56remote tasks because again whenever you
- 3:58ask it to do something on the cloud it's
- 4:00going to look for this file
- 4:01automatically and it's going to use it
- 4:03as context for that task. And for that
- 4:05reason I'm going to push this change up
- 4:07to the GitHub repo once I finish
- 4:08recording this video just to keep
- 4:10everything up to date and in sync. And
- 4:12by the way, this file isn't something
- 4:14you should just create and forget about.
- 4:16As your project changes and evolves, you
- 4:18should update your agent file as well
- 4:20with anything new the coding agent
- 4:22should know about. For example, if you
- 4:24start using particular libraries or
- 4:26frameworks or if you change your project
- 4:28structure or testing procedures, etc.
- 4:31Because if you don't keep the file up to
- 4:33date, then codeex might go off track and
- 4:35do things the old way as outlined in the
- 4:37original agents file if you don't change
- 4:39it. So definitely come back and update
- 4:42the file as and when you need to.
About this transcript
This page contains the full transcript of OpenAI Codex Tutorial #6 - Using the AGENTS.md file by Net Ninja, generated from the public captions YouTube serves with the video. The transcript has 906 words across 129 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.