Most people open Codex, see the chat window, and treat it like a fancier ChatGPT. As a result, 90% of users miss out on its truly powerful features.
They don't know how to build Skills, don't know how to deploy online, and don't know how to let automation tasks run in the background. This article will use 14 steps to take you from an _empty folder_ to a _fully functional AI workflow_ in 30 minutes.
Codex is the AI programming assistant launched by OpenAI—not the 2021 deprecated code completion API, but a brand new version. It was first released in April 2025 as a command-line tool (CLI) and subsequently developed into desktop applications, IDE plugins for VS Code/Cursor/Windsurf, and a cloud version.
Sam Altman revealed in April 2026 that Codex already has about 4 million weekly active users. It is now the most direct competitor to Claude Code.
If you've used Claude Code, you can understand Codex in one sentence: A local folder + a markdown configuration file + an AI agent that can read all files + Skills, MCP servers, automation tasks, and a built-in browser.
Different tool shells, different models, but the same core philosophy.

14 steps. 3 levels. One folder handles all workflows.
Part I · Basic Setup
01. Create a project folder on your computer
Codex doesn't have its own database, file system, or "workspace." A Codex project is just a regular folder on your computer. When you start a new project, Codex will ask you to select a folder.
Once selected, all files inside can be freely operated on by Codex: read, written, edited, organized, and moved.
This simple design brings huge flexibility:
- Projects are completely portable. The same folder can be opened in Codex CLI, Codex Desktop, VS Code/Cursor/Windsurf IDE plugins—or even with Claude Code or Cursor. The tool changes, but the project content remains.
- Version control like code. Git, GitHub, Vercel—these are all standard tools, no special integration required.
- Backup, sharing, and migration are simple, just like handling a normal folder.

Codex runs in agent mode by default—it can automatically read, edit, and run commands within the working directory. Content outside the folder and network access still require your approval. The folder is the trust boundary.
02. Write the AGENTS.md configuration file: The first document Codex reads at startup
This is the most underrated file in Codex. AGENTS.md is placed in the project root, and Codex reads it every time you open a new conversation in that folder.
It tells the AI agent: who you are, what the project is, what the goals are, and what the constraints are.
Tip: Don't write from scratch. Tell Codex your project goals in simple words and let it draft an AGENTS.md for you. You'll get a well-structured file that you can then modify as needed. This is faster, more complete, and less likely to miss things.
1# Project: YouTube Comment Intelligent Analysis23## Background4I run a YouTube channel about AI tools. I want to understand5what viewers are asking, what they want to see, and what tools they are comparing—6without manually reading every comment.78## Goals9Build a workflow to extract recent comments, classify them,10discover patterns, and visualize results on a real-time dashboard.1112## Constraints13- Use YouTube Data API v3 and API key (no OAuth).14- Save credentials in .env.local, never commit to the repository.15- Output target: Excel workbook for analysis + Web dashboard.16- Deploy dashboard to Vercel.17- Refresh data weekly via automation.1819## Working Habits20- Save failed methods to project memory to avoid repeating mistakes.21- Always confirm the plan before writing code.
A good AGENTS.md should include:
- Background—one paragraph. Who you are and why you're doing this project. This avoids re-explaining every time.
- Goals—one paragraph. Describe the end state, not specific steps. Steps belong in Plan Mode (Step 3).
- Constraints—list format. Hard rules. Such as API choices, languages to avoid, security boundaries, output formats. The more concise and specific, the better.
- Working Habits—list format. For example, "Save lessons learned to memory," "Always confirm plan first," "Never run X." These accumulate into reliable working patterns.
OpenAI's official best practices guide states: "Codex works best when you treat it as a configurable and continuously improving teammate rather than a one-off assistant. Start with the right task context, use AGENTS.md for persistent guidance, and configure Codex to match your workflow."

03. Use Plan Mode for every build
Plan Mode means Codex won't execute immediately. It will brainstorm first, ask clarifying questions, show trade-offs between different solutions, and then generate a numbered plan for your approval before writing code. Skipping Plan Mode is the biggest reason projects go wrong.

Effective usage:
- Describe goals, not steps. For example, "Extract recent comments from my YouTube channel and generate an Excel report"—rather than "Use Python to call the YouTube API and then write to xlsx."
- Let it ask questions. Codex in Plan Mode usually returns 3-5 clarifying questions. Answer them seriously. Every question helps you avoid future bugs.
- Approve the plan before execution. Read the steps carefully. If you find issues—like missing edge case handling, poor tool choice, or unnecessary complexity—bring them up. Modifying at the planning stage is much easier than changing code after it's written.
Plan Mode works especially well with AGENTS.md: constraints in the config file will influence the solutions Codex proposes. Combining the two significantly reduces trial and error.
04. Manage API keys with .env.local
All API keys, secrets, and credentials should be placed in a .env.local file in the project root. The dot before the filename is not a decoration—it tells Codex (and git) to exclude this file from public commits.
Two iron rules to prevent leaks:
- Never paste keys into a randomly named secrets.txt, and definitely don't paste them directly into chat messages. Both practices will eventually end up in version control. Once you push code, the keys are public.
- Test immediately after adding a key. Have Codex do a minimal API call to confirm the key works. Catch authentication errors before they affect the entire build.

If a key is accidentally committed, rotate it immediately at the service provider (Google Cloud, OpenAI, etc.). Don't just delete it from the file and push the deletion—the key is still in the old commit history, and bots will scan GitHub commits within minutes to find leaked secrets. The only safe way is to rotate credentials.
Part II · Connect and Build
05. Connect MCP Servers and Plugins
Codex uses the Model Context Protocol (MCP)—an open standard also used by Claude Code. This means most existing MCP servers can be used in Codex: GitHub, Slack, Notion, Linear, Drive, Figma, and dozens of community-developed servers.

What changes: Instead of describing your data to Codex, you let it read your data directly. Instead of describing what you want to do, you let it execute directly. Conversations change from _"Here is what's in my repo"_ to _"Create a PR with this fix and notify the owner."_
Three high-ROI use cases:
- GitHub MCP — Read repos, create branches, initiate PRs, comment on issues. Immediate benefit for any developer.
- Vercel MCP — Deploy, check status, rollback. Works with GitHub to achieve a full "Build → Commit → Deploy" loop.
- Notion or Drive MCP — Extract internal docs as context, write decision logs back to a central knowledge base. Codex stops being a black box and becomes part of the team memory.
06. When there's no plugin, let Codex help you set up the API
Not every service has an MCP server. YouTube Data API doesn't. Internal company APIs don't. Niche SaaS tools usually don't.
In these cases, you don't need to find a third-party wrapper library. Ask Codex directly. In Plan Mode, tell it your integration goal—like "Extract recent comments from my YouTube channel."
It will return different options (API Key vs. OAuth), recommend one, and generate a step-by-step plan to set up credentials, enable relevant APIs, and test the connection.
Long-term effective practices:
- Try the first method first. Codex will choose a plan based on trade-offs. Let it try.
- Record lessons when they fail. For example, "PowerShell encountered a TLS error, Python works. Save this to project memory so we don't try the wrong path again." Future conversations will inherit this knowledge.
- Lock in working solutions. Once an integration is stable, convert it into a Skill (Step 9). You won't have to set it up again.
This is the most important habit in AI-assisted work. Try, fail, record the failure, and don't repeat the same mistake. Codex's AI agent only has short-term memory by default—it will forget what it learned today tomorrow unless you write it down.
Whenever you encounter a lesson worth recording, tell Codex to update AGENTS.md or project memory. The system gets smarter the more you use it.
07. Build real deliverables with specific prompts
The value of any tool lies in its deliverables. For most users, the first deliverable is something concrete—an Excel report, an automation script, a dashboard, or generated documentation. Something that proves the tool's value.
The key factor determining the quality of the first build: Prompt specificity. "Analyze my YouTube comments" will generate an Excel sheet with only "Positive," "Negative," and "Neutral" categories, which isn't very useful. "Analyze my YouTube comments and classify them by: Tool Comparisons, Content Suggestions, Technical Issues, General Feedback—then sort them by reply priority for me as a creator" will generate a workbook you'll actually use.
Two tips to quickly improve output quality:
- State the purpose of the output — "For me as a creator," "For a board report," "For my engineering team." The audience determines the structure.
- List the categories or dimensions you care about. Don't let classification rely on default judgment. Tell Codex your taxonomy.
If the first version is okay but not great, don't start over. <u>Add more detail and run it again.</u> Iterating three times with clearer prompts is better than starting from scratch five times.
08. Use gpt-image-2 to generate concepts before building UI
Codex has built-in image generation using gpt-image-2—OpenAI's image model. Call it explicitly with $imagegen in your prompt, or just describe what you need, and Codex will recognize it automatically.

Generated images become project assets that subsequent builds can reference.
How to unlock this: Generate concept art before writing UI code. Let Codex simulate the dashboard's look with one or two images first. Save them to the project.
Then ask it to build the dashboard and reference those concept images. The final visual result will be much better than letting the model design from text descriptions alone.
09. Convert workflows into Skills
A Skill is a reusable recipe that Codex loads on demand. Once you've built a working workflow—like extracting comments, generating reports, and deploying a dashboard—you can convert it into a Skill and run it with a single command next time.
Skills in Codex are markdown files in a folder. There is a SKILL.md file in the directory containing metadata (name + description) and the instruction body. You can optionally put scripts and reference files alongside it.
1---2name: youtube-comment-insights3description: Extracts recent YouTube comments via Data API,4 classifies them by content category and tool mentions,5 sorts by reply priority, and outputs an Excel workbook with6 summary tabs and charts. Triggered whenever I ask for7 "comment insights" or "weekly youtube report".8---910# YouTube Comment Insights1112## Setup13- Read YOUTUBE_API_KEY from .env.local.14- Fetch ~200 latest comments from the 10 most recent videos.1516## Classification17- Categories: Tool Comparisons, Content Suggestions, Technical Issues,18 General Feedback, Irrelevant.19- Tool Mention Tracking: Codex, Claude Code, Cursor, API, GPT, etc.20- Priority Signals: Questions > High engagement comments > Others.2122## Output23- Workbook tabs: Summary, Classification, Tool Mentions,24 Priority Replies, Content Ideas, Raw Data.25- Charts on Summary tab: Category distribution, Tool rankings.
Two storage levels worth knowing:
- Global Skills — Stored in ~/.agents/skills/. Available in every Codex project on your computer.
- Project-level Skills — Stored inside the project folder. Only available in that project. Good for client-specific or project-specific recipes.
Three factors determining if a Skill triggers automatically when needed:
- Description is everything. Codex matches your task based solely on the description text for implicit calls. Put key use cases and trigger words upfront; vague descriptions will never trigger.
- Two ways to call. Explicitly (via /skills in CLI/IDE, or mentioning $skillname), or implicitly (when your prompt matches the description and Codex auto-selects the skill).
- Open Standard. Skills launched for Codex in December 2025 and are now part of the cross-platform Agent Skills standard—the same format works in Codex, Claude Code, Gemini CLI, and Cursor. Write once, run anywhere.
10. Deploy local services online <u>GitHub → Vercel → Production</u>
Excel sheets are backends. Dashboards are frontends. Localhost is a development address. None of these can be delivered directly.
To go from local to online, you need to connect two services: GitHub for the repository and Vercel for hosting. Codex coordinates the entire process.
1> Connect this project to GitHub. Create a private repo named2 "yt-comments-dashboard" and push the code.3▲ Codex Authenticating with gh CLI…4 - Created github.com/you/yt-comments-dashboard (private)5 - Initial commit pushed6✓ Repo ready78> Connect Vercel to the same GitHub account.9 Import this repo. Deploy.10▲ Codex Connecting Vercel…11 - Vercel project created12 - Build successful in 38s13✓ Live at: https://yt-comments-dashboard.vercel.app

Key detail: GitHub and Vercel communicate continuously after the initial connection. Every push to the main branch triggers an automatic Vercel deployment. You don't need to log into Vercel again. You work in Codex, Codex pushes to GitHub, and Vercel deploys automatically. Three tools, one workflow.
11. Set up automation tasks—and specify the model clearly
The Codex app has an automation tab. You can run scheduled tasks via cron expressions. Combined with Skills, this is how you make a dashboard "update automatically while you sleep."
A real Sunday night automation: Extract new comments, run the Insights Skill, update the Excel file, push new data, and let Vercel auto-deploy. End-to-end refresh without human intervention. By Monday morning, the dashboard is up to date.

The model selector in the automation panel does not inherit settings from your active conversation. New automation tasks use the panel's default values, which might be slower or cheaper than the model you actually want for production runs.
Explicitly set the model for each automation task, otherwise you'll wonder why a task that usually takes 7 minutes suddenly takes 40. The same issue occurs if you have a file open locally that Codex needs to overwrite—close it first.
12. Choose the right thread mode—Local, Worktree, or Cloud
Every conversation thread in the Codex app runs in one of three modes:
- Local — Works directly in your current project directory. Fastest and simplest, but every change affects your actual working files. Good for small, controlled edits when you trust the AI agent.
- Worktree — Isolates changes in a Git worktree (a separate working directory linked to the same repo). The AI agent works in a separate branch without affecting your main branch. This is the default choice for any significant build. If something goes wrong, just delete the worktree. Zero risk.
- Cloud — Runs remotely in a configured cloud environment. Your laptop can be turned off. Pair this with automation tasks (Step 11) for true asynchronous workflows that don't depend on your machine being online.
Rule of thumb: Worktree for important work, Local for small tweaks, Cloud for long-running automations. Three trust levels, chosen by task.
13. Use the built-in browser for QA testing
After building a dashboard, have Codex open it in the built-in browser, click around, try to find issues, and report back. It will do it.
It will find issues you can't see by staring at code—broken external links, empty states that look too bare, rigid search behavior, accessibility flaws, and minor UI inconsistencies.

How to turn this from a one-off into a habit: Write QA testing into your project memory or Skills.
Every time you release a new feature, the AI agent runs browser tests before returning to you. You are no longer the QA tester. The AI agent does the testing; you review the report.
However, the browser isn't just for QA. It's a universal tool when APIs don't exist:
- Log into tools without APIs — Traditional admin panels, vendor portals, internal dashboards.
- Extract reports from dashboards that don't provide programmatic interfaces — Analytics views, billing tools, status pages.
- Automate multi-step UI flows you'd normally have to click manually. Describe the steps in natural language; Codex executes them.
14. Use the UX features most people ignore
The Codex app has UI features that turn it from a "tool I use" into an "environment where I work." They seem small individually but are powerful together.
- Side Conversations. Open a side thread from the main conversation. Same project context, different dialogue. Ask quick questions without polluting the main thread. Close when done.
- Slash Commands. Type / to browse: /skills to call a Skill explicitly, /clear, /help, etc. The slash menu shows all Codex features.
- @ Mentions. Tag specific files in prompts: "Add a new page referencing @example.tsx, listing items from @resources.ts." Much cleaner than pasting paths.
- Model Switcher + Reasoning Intensity. The switcher below the chat input allows switching models per conversation. Reasoning intensity controls how long Codex thinks before responding. Higher intensity = better performance on complex tasks, more tokens consumed, faster rate limit hits. Match intensity to the task.
- $imagegen + Skill Mentions. Type $ to mention skills inline. Same syntax as @ for files. Allows combining multiple skills in one prompt.
- Auto-context Sync with IDE Extensions. If the Codex IDE extension is installed, the app and editor sync automatically when both are in the same project. You can see threads running in the app inside the editor and vice versa. Toggle "Auto-context" to let Codex track the file you're currently viewing.
- Full Access Mode. Settings → Toggle to skip approval prompts. Faster, more dangerous. Start with the default. Only switch to Full Access once you trust the project boundaries.

Habits that keep Codex at only 3% potential
- No AGENTS.md. Re-explaining the project every conversation, getting different answers every time.
- Skipping Plan Mode. Changing forty files to fix a one-sentence misunderstanding.
- Putting keys in chat or secrets.txt. Publicly exposed as soon as you push.
- Never recording lessons. Making the same mistakes over and over because nothing was written down.
- Vague prompts. Getting generic deliverables and then being surprised at why the output is so generic.
- One-off builds. Rebuilding the same workflow from scratch every week instead of converting it into a Skill.
- Using Local mode for everything. A bad AI run wipes out your working files because you didn't use a worktree.
- Letting automations use default models. A 7-minute task takes 40 minutes.
- No QA testing. Releasing dashboards with broken links and bare empty states.
- Tool tribalism. Choosing Codex vs. Claude Code based on identity rather than the task at hand. Both have strengths depending on the situation.
Summary
Codex looks like a chat window. But it's not a chat window. It's a folder with an AI agent that knows the content—plus Skills, MCP, automation tasks, and a browser layer, all configured via markdown files inside the folder.
This folder is portable. Open it in Codex, Claude Code, Cursor, or any tool supporting the Agent Skills standard. The tool shell changes, but the work remains.
Most users will continue typing questions into the chat box and stopping there. They'll get answers, copy code, and move on. The 4 million weekly active users truly making an impact with Codex are those who configure their folders.
Pick one step you haven't done—maybe AGENTS.md or your first real Skill—and add it tomorrow.
Codex's output depends on Codex's configuration.
Reference article from: https://substack.com/@0xmovez





