Hey everyone, I'm Oil. This is Lesson 1 of Vibe Coding from Scratch: everyday AI Agent workflows—covering what an AI Agent can actually do for you, how to set up a project folder, when to use Markdown vs. HTML, which permission and reasoning settings to turn on before starting, how to brief tasks with built-in web search and image generation, and how to steer a running task or hand off when context fills up.
Once you've picked a desktop client you like—such as Codex, Claude Code, or Cursor (see Choosing an AI Agent & Environment Setup for tools and network setup)—getting these core concepts and daily actions clear will make everything that follows much smoother.
What an AI Agent Can Actually Do
Many people new to Vibe Coding are already used to web chatboxes like ChatGPT, Claude, or DeepSeek. When they switch to a desktop AI Agent client, the first question is usually: how is this different from a browser chat?
The core difference is simple: a web chatbox can only reply with text in a Q&A loop, whereas an AI Agent can directly do work on your computer.
Specifically, when you give an AI Agent a task, it relies on three core capabilities:
- Reading, writing, and managing local files directly: Instead of you copying and pasting code or articles into a chatbox, it can inspect existing files, create new documents, and edit code straight inside your computer's folders.
- Running commands automatically and reacting to the output: It can invoke your computer's terminal (the command-line window where programmers used to manually type commands to install software, start local previews, or run scripts—now the AI types and runs them for you). More importantly, when a command throws an error, you don't have to copy the log back to it; it reads the output itself and keeps troubleshooting until the issue is fixed.
- Calling built-in tools to assist with the task: Beyond files and terminal commands, it can search the web for up-to-date information, call image-generation models for illustrations, or ask you clarifying questions when requirements are underspecified.
Once you understand those two fundamental actions—reading/writing local files and running terminal commands on its own—every daily habit in this guide clicks into place: why you isolate each project in its own folder, why you use plain-text formats the AI can read cleanly, and why you grant full execution permissions up front.
Give Every Project Its Own Folder
Open any AI Agent client and the primary entry point in the left sidebar is Project. A project is simply one folder on your computer.
1. Why You Need a Dedicated Folder
You create a dedicated folder so everything related to one piece of work lives together in one place.
A single chat thread's history—its context (the short-term memory the AI can reference inside that one conversation)—disappears the moment you close it or start a new thread. With an isolated project folder, the AI treats that folder as a long-term local knowledge base: not just the code it writes, but also the design specs, technical plans, and workflow docs you agree on stay saved as files inside the folder. Even in a brand-new conversation later, the AI can read those files and immediately pick up where things left off.
2. Never Use Your Desktop as the Project Directory
Many beginners skip creating a new folder and pick their computer's Desktop directly as the project directory.
That causes two immediate headaches: first, every time you come back to ask for edits, you have to spell out which folder on the Desktop the AI should touch; second, when the AI searches for files across the Desktop, it can easily wander into unrelated folders and edit the wrong things.
So before starting any new project or task, step one is always to create a clean, empty folder on your computer and open that folder as a project in your AI Agent.
Understanding Markdown vs. HTML
Right after creating a project folder to store reference notes or ask the AI for a plan, many people reach for what they use at work every day: a Word document (.docx).
In AI coding and Agent workflows, we almost never use Word. The two file formats you will deal with every single day are Markdown (.md) and HTML (.html). Remember their core division of labor: Markdown is for human-AI collaboration; HTML is for viewing visual results.
1. Why Not Word Documents
Word was built for humans to format and print documents in a graphical editor. Under the hood, it is not clean plain text—it packs text, fonts, and layout metadata inside a complex compressed container.
An AI Agent cannot simply read a .docx file directly as plain text. Every read or edit requires running extra conversion tools to unpack and parse it, which is slow, loses formatting easily, and wastes context space.
Markdown (.md) and HTML (.html), by contrast, are completely open plain-text source files. You can open either in a basic text editor and see every single character—and AI Agents can read and edit them with zero friction.
2. Markdown: The Human-AI Collaboration Format
Markdown started as a lightweight plain-text format programmers used for technical writing: one # before text creates a main heading, ## creates a subheading, and - creates a bullet list. Even without asking, AI Agents default to Markdown for plans and documentation.
Below, the left side shows raw Markdown source, and the right side shows how an app renders it for reading:
Why is Markdown ideal for working with AI? Compared to Word or webpage code, it has three big advantages:
- Readable right in the source: Even without a renderer, seeing
#and-makes the document's structure obvious at a glance. - Token-efficient and fast to generate: A Token is roughly the billing and capacity unit AI uses to read and write text—fewer characters and simpler markup mean fewer tokens spent. Marking a heading in Markdown takes a single
#with no verbose styling boilerplate, so the AI reads and writes it fastest while using the least context. - Fault-tolerant and easy to revise: Even if one formatting symbol in Markdown is slightly off, the rest of the document still reads and renders fine.
So in day-to-day work—whether asking AI for a PRD, documenting design specs, or saving workflow notes—any file used to exchange ideas, align plans, and iterate between you and AI should be Markdown.
3. HTML: The Visual Webpage Format
HTML is the standard webpage format. Using nested tags (like <div class="card"> and <button>), CSS styling, and scripts, a browser renders it directly into a visual page with colors, multi-column grids, charts, and interactive buttons.
Below, the left side shows HTML tags and CSS code, and the right side shows the live page rendered in a browser:
Whenever you need to inspect real color palettes, horizontal grid layouts, animations, or a clickable style preview page, linear plain-text Markdown isn't enough—that's when you ask AI to generate HTML and open it in your browser.
Why not ask AI to write HTML for everything? Because HTML carries two clear costs:
- High token overhead and slower output: To look good, AI often writes hundreds of lines of CSS and markup. Generating HTML usually consumes 2× to 4× the tokens of equivalent Markdown and takes noticeably longer.
- Low structural fault tolerance: HTML requires strict tag pairing (every opening
<tag>needs a matching</tag>). In a 700- or 800-line HTML file, one broken tag near the bottom can break the whole page, and stuffing all that styling code into chat eats up context when iterating on text.
The cleanest workflow is: discuss plans, take notes, and store specs in lightweight Markdown; once the plan is settled and you need to inspect visual styling or interactions, have AI generate HTML and open it in your browser. (A single-file HTML works great for lightweight pages and prototypes. When you build a larger full website, a single file gets too long, so we use frontend frameworks—tools that split complex webpages into smaller modular files—though what gets delivered to the browser is still HTML.)
Three Settings to Configure Before You Start
Once your folder is ready and you know which format to use, look at the toolbar under the chat input and the app settings. Before sending your first prompt, adjust these three switches:
1. Set Permissions to Full Access
By default, every time an AI Agent wants to edit a local file or run a terminal command, the app pauses and pops up a confirmation dialog for safety. Input toolbars typically offer permission tiers—manual approval per step, sensitive-only approval, or the highest tier, Full Access (if you use Claude Code in the terminal, you can launch it with claude --dangerously-skip-permissions to skip approval prompts).
My take: grant full access right away. Modern AI Agents are built for continuous multi-step execution. Without full access, every file edit and every shell command halts waiting for your click, breaking flow and tanking productivity.
You also don't need to worry too much about safety—even with full access turned on, current AI Agents generally pause to double-check before doing genuinely destructive actions like deleting important files.
2. Set Reasoning Effort to High or Max
Most input toolbars also include a Reasoning / Effort selector.
Beginners often ask: what does "reasoning effort" actually control?
Before replying or editing code, modern models run an internal thinking pass—like working out a hard problem on scratch paper first. They plan out the steps, decide which files to inspect, and anticipate edge cases before touching anything. Reasoning effort controls how much time and compute the AI is allowed to spend thinking before acting:
- At a low setting (such as
low), the AI jumps straight into action with almost no scratchpad planning. Responses start faster, but on anything moderately complex it easily misses edge cases. - At a higher setting (such as
high,max, orextra high), the AI spends a few extra seconds reasoning through context and boundary conditions before editing, which dramatically raises the first-pass success rate.
Labels vary slightly across models and clients (typically low, medium, high, max, or extra high; CLI tools often let you switch via /effort). I almost always keep mine on high or max, and I recommend beginners do the same to cut down on avoidable rework.
3. Enable Prevent Sleep While Running
When you kick off a larger task that will run in the background for several minutes, open the app's General settings and turn on Prevent sleep while running. That way, even if you step away from your desk, your computer won't lock and sleep in the middle of an active run.
Briefing Tasks, Referencing Files, and Pasting Screenshots
With the base settings in place, it's time to send prompts. Three questions come up constantly for beginners: when to turn on Plan mode, how to make AI understand your idea without writing an essay, and how to reference files or paste screenshots.
1. When to Use Plan Mode
Most mainstream AI Agents offer a Plan mode toggle in the input toolbar. When enabled, the AI maps out an implementation plan first instead of editing code immediately.
I don't turn on Plan mode for every chat. I use it when building a complex feature, starting a project from scratch, or tackling a major piece of work.
For large tasks, I want to verify what the AI intends to do over the next long stretch of work and catch any mismatch early—plus reading its plan is a great way to learn how it breaks down architecture. For quick, straightforward tweaks, just stay in default mode and let it make the change.
2. Have the AI Interview You First
Staring at an empty prompt box, many beginners feel they have to write a massive spec up front. As I also share in Four Habits That Make AI Work Better, the fastest way to help AI understand your goal is to let it ask you questions.
When starting a new feature or site, flip on Plan mode and say:
I want to build [your idea]. To do it well, what information do you need from me? Please ask me questions first.
Telling it to question you lets the AI probe the exact gaps it hasn't figured out yet. In Plan mode, tools like Codex even format those questions into interactive cards with recommended options—you just click through or answer briefly by voice to align every detail quickly.
3. @-Mentions for Files and Pasting Images Directly
Many older tutorials tell beginners to type @ in the prompt box to attach a specific file from the project.
Honestly, manually @-mentioning individual files is much less common now. Day to day, people more often use / or @ to invoke a packaged Skill (a folder bundling reusable rules and scripts, covered in detail in a later guide).
We used to @ files manually to save the AI from searching the codebase and burning extra context tokens. Today's models are strong enough to locate the right files accurately from plain-language descriptions—and many Vibe Coding builders don't even keep track of every filename in their folder anymore. So you don't need to stress over @-mentioning files.
Only use @ when you know the exact file you want it to follow (such as a specific design spec) or want to restrict edits to one specific file.
In addition, modern AI Agent input boxes support direct image paste. Whenever you spot a broken layout, like a reference site's color palette, or hit an unfamiliar error popup, don't struggle to describe it in words—take a screenshot, press Command + V (Ctrl + V on Windows) right inside the prompt box, and let the AI inspect the image directly.
Built-In Web Search and Image Generation
Beyond local files and screenshots, modern AI Agents come with two very practical built-in capabilities—web search and image generation—that you can trigger in plain language:
1. Web Search
When you need up-to-date technical docs, background research on a topic, or public information about yourself to build a personal website, just ask the Agent directly:
Use web search to look up information about [topic or name], and organize it into a project doc.
The Agent searches like a human—running initial queries, branching into follow-up keywords, and synthesizing information from public pages, GitHub, and technical communities. When it finishes, the reply typically includes Source links at the bottom so you can click through and verify the facts rather than trusting unverified claims.
2. Image Generation and Green-Screen Cutouts
When Vibe Coding websites, games, or cards, you often need custom illustrations or icons. Some AI Agents include built-in image generation backed by external image models (for instance, Codex ships with a /imagegen command, while other Agents use different names or triggers).
You don't need to memorize slash commands for this—just ask in plain language for an image, or ask "Do you have an image generation tool?" If it has built-in image generation or an installed image tool, it will write the prompt, call the model, save the image into your project folder, and wire it into your code automatically.
One practical trick for cleaner websites: many image models cannot natively output a transparent-background PNG. Drop a regular image onto a colored webpage and you get an awkward white or mismatched box around it.
When that happens, ask for a solid green screen + cutout script right in the chat:
Generate a hand-drawn dog illustration on a solid green background (or solid gray), then write a script to remove the background color and save it as a transparent PNG.
Just like chroma-keying in film production, the AI generates the artwork and writes a quick script to cleanly knock out the background, leaving a much sharper result on your page.
Controlling Running Tasks and Rolling Back Changes
Once you send a prompt, an AI Agent may run continuously for several minutes. Here are three daily controls for staying in charge while it works:
1. Queuing Messages vs. Steering Immediately
While the AI is still working, if you think of the next thing you want done, just send it—new messages enter a Queue by default and run automatically once the current step finishes.
If you watch its output and see it heading in the wrong direction, click the interrupt/steer button next to the input box (such as Steer or Stop in Codex) to inject a course correction immediately.
2. Side Questions with /btw and /side
Sometimes your main thread is deep in building a feature, and you suddenly have a quick unrelated question—or notice a tiny UI tweak you want fixed right away. Sending it into the main thread both interrupts the main flow and clutters its context. Two slash commands solve this cleanly:
/btw(available in tools like Claude Code): Type/btwfollowed by your question for a quick side query. The AI answers using the current context without writing that side exchange into the main thread history./side(opens a right-hand sidebar session in Codex): Typing/sideopens a separate sidebar thread that automatically inherits all context from the main thread on the left. You can ask side questions or even run lightweight parallel edits—for example, making a quick interaction tweak while the main thread is busy. Just remember that/sideis a temporary session that expires after a set time (expiring only means you can't keep chatting in that sidebar window; any file edits it already wrote locally remain intact), so save heavy work for regular threads.
3. How to Undo If the AI Breaks Your Files
Beginners frequently ask: if the AI's latest edit looks wrong or breaks a working page, how do I undo it?
Keep in mind that many mainstream AI Agents no longer include a built-in file undo button. The most reliable way to protect your work and roll back at any time is Git—the standard version-control tool programmers use, essentially a save-and-reload time machine for your project folder. After every milestone you like, ask the AI to save a checkpoint; if a later edit breaks things, one sentence rolls everything cleanly back to the previous version. We walk through Git step by step in Git & GitHub: A Practical Guide.
Managing Context and Handing Off Across Threads
After a dozen back-and-forth turns inside the same thread, you'll see the context meter or percentage near the input box steadily climbing.
1. What Eats Up Context?
Context is everything in your conversation with the AI, plus every tool call it makes—files it reads, terminal commands it runs, and images it inspects all count toward context.
Every model has a fixed context window limit. Once usage approaches roughly 90%, most Agents automatically trigger context compaction—condensing earlier conversation history into a shorter summary to free up room (you can also run /compact manually). However, compaction inevitably drops some fine details, and the fuller a context window gets, the more instruction-following quality tends to slip.
2. Three Ways to Hand Off Across Threads
When a milestone wraps up, context is nearly full, or you want to move the project to a different AI Agent, it's better to open a fresh thread. Three reliable ways bring the new thread up to speed:
- Have it write a
handoff.mddocument: This is the most universal and dependable method. Before closing the old thread, tell the Agent: "Summarize what we've finished, which files we changed, and what's next into ahandoff.mdfile in the project." Then open a fresh thread (even in a completely different AI Agent client) and tell it to readhandoff.mdfirst. - Fork the current thread: If your next task depends heavily on the exact full context so far, many clients let you Fork the conversation from the top-right menu, sidebar right-click menu, or
/fork. The forked thread inherits everything up to that point so you can explore a new direction independently. @-mention a previous thread: In clients like Codex, you can open a clean new thread, type@plus a keyword from an earlier thread's title, and select that previous thread. The Agent pulls in a condensed summary of the earlier thread—getting the background without dragging in every verbose intermediate step.
Put this daily loop together—dedicated project folders, Markdown for plans, Full Access and High/Max reasoning, having the AI ask questions first, steering or using side threads mid-run, and handing off via handoff.md when context fills—and you'll handle any AI Agent smoothly. In the next lesson, we'll unpack the core engineering and AI concepts you need to ship complete products.


