Vibe Coding

How You Work with Vibe Coding

A session-by-session guide: what you type, attach, accept, reject, and commit from opening the editor to shipping a slice.

You are the director. The model is the intern.

Vibe coding is not chatting until something appears. It is a job split. You decide the product, the slice, and what “done” means. The agent drafts files. You read, run, and keep or throw away. If you skip those last three, you are not vibe coding — you are gambling.

You doThe agent doesNobody should do
Pick one goal for this sessionRead the files you attachInvent a product you never described
Name files, constraints, and a done commandWrite a plan, then a small diffRewrite the whole repo “to be clean”
Read every changed lineExplain a confusing hunk if you askAccept a patch you cannot explain
Run tests and the real commandSuggest a fix from a tracebackTrust “tests passed” in chat without looking
Commit, revert, or ask for a smaller sliceApply the next approved stepLet the agent run destructive git commands

Keep this page open the first week. After Setup, come back here whenever a session feels chaotic. Chaos almost always means the slice is too big or you skipped review.

Two ways to use this course

PathWhat you doWhen
Read alongFollow Next through every lesson. Copy prompts into a notes file. Do not ship anything yet.You want the method before you touch an editor.
Practice as you goFinish Tools and Setup, then do the 30-minute session below. After each later lesson, repeat one tiny task in the same folder.You learn by doing. This is the recommended path.

Either path ends at Build a Project. Keep the prompt cheatsheet in a second tab while you work.

Before you open chat

Do this every session, even a short one. It takes two minutes and saves an hour of thrash.

  1. Open the project root in the editor, not your home folder or a parent of many repos.
  2. Confirm Git is clean, or commit what you already trust. You need a restore point.
  3. Activate the virtual environment. You will run pytest yourself.
  4. Write the goal in one sentence in the chat box before you hit send. If you cannot, you are not ready.
  5. Decide the done check: a command, a test name, or a UI action you can repeat.

Goal sticky note

Goal: python notes.py list prints notes one per line.
Files: notes.py, test_notes.py
Must not: add packages, touch other folders
Done: pytest -q exits 0

Your first 30-minute session

Use a tiny Python folder from Setup, in the tool you picked inTools. Do not start on a production app. The point is to feel the loop once.

TimeYouWhat you type or click
0–3 minExploreOpen Agent chat. Attach nothing yet. Ask: “List the files in this folder and what each one is for. Do not edit anything.”
3–8 minPlan“Do not write code. I want a function unique_words(text) that returns sorted unique words, case-insensitive. List files, tests, and open questions.”
8–10 minDecideAnswer questions in one message: “Ignore punctuation for now. Empty string returns []. Implement tests first only.”
10–15 minTestsLet it create test_words.py. Read the tests. If they match the spec, say “Keep those tests. Now implement words.py only.”
15–20 minReviewOpen the diff. Check it only touched the files you named. Reject extra folders or a new web app.
20–25 minTestIn the terminal: pytest -q. You run it. If it fails, paste the traceback — do not say “fix it.”
25–30 minCommitgit add words.py test_words.py then git commit -m "Add unique_words helper". Stop. That is a complete slice.

If you are still generating at minute 30, the slice was too big. Revert to the last commit and ask for tests only, or one function only.

How you talk to the agent in the editor

Most work uses three moves. Pick the smallest one that fits.

MoveWhenHow
Chat with @filesA feature or bug that spans a file or twoType @notes.py and @test_notes.py in an editor, or name those paths in a CLI agent. Two or three files. Not the whole repo.
Inline on a selectionRename, extract, or fix one functionHighlight the function, then ask to change only that selection.
Terminal + pasteSomething failedYou run the command. You paste the exact output. The agent does not get to “remember” a green run.

Standing rules live in AGENTS.md (see Setup). Today’s task lives in the prompt. Do not paste a manifesto every time.

Accept, reject, or ask again

After every generation, you make one of four calls. Make it out loud if you have to.

  1. Accept and commit — the diff matches the ask, you can explain it, tests you ran are green.
  2. Accept with a fix prompt — almost right. “Change only line X. Do not touch tests.”
  3. Reject the extras — keep the useful file, restore the rest: “Revert helpers.py. Keep notes.py.”
  4. Revert the slice — the agent wandered. git restore the files, then send a smaller prompt.

Decision prompts

# Almost right
Keep the new function. Undo the import you added in utils.py.
Do not reformat other files.

# Wandered
Stop. Revert your last edits.
Implement only unique_words in words.py.
Files allowed: words.py, test_words.py.

“Looks fine, Accept All” is the most expensive click in this course. If a file appeared that you did not name, that is a reject unless you can say why you want it.

A normal working day

Once the first session feels natural, a real day looks like several small loops, not one giant chat.

  1. Morning: pull, run the test suite, write the day’s goal in one sentence.
  2. Loop 1: plan a slice, implement, review, test, commit (20–40 minutes).
  3. Loop 2: next slice, same ritual. Do not chain five features in one prompt.
  4. When stuck: after two failed fixes, paste the failing test and ask for causes, not a rewrite.
  5. End of day: only green, explained commits on the branch. Unfinished mess gets restored, not left for tomorrow.

That is the whole job. Later lessons add skill to each step: better prompts, tighter context, tests first, Git undo. They do not replace this rhythm.

How each chapter helps you work

When you are…Open
Choosing Cursor, Copilot, Claude Code, or another agentTools
Installing the editor and making a practice folderSetup
Staring at a blank chatBetter Prompts
Lost in a long sessionThe Workflow
The model invented a second helperGive Context
About to ask for a multi-file featurePlan First
Looking at a diff you did not expectReview the Diff
Unsure the code is actually correctTests as Guardrails
pytest is redDebug with AI
The tree is a messGit and Commits
Repeating the same bad habitCommon Mistakes

What “good work” looks like in Git

Your history should read like a story a teammate can skim:

Add unique_words helper
Add notes CLI add and list
Add notes delete command
Fix delete IndexError on last item

Bad history: Update files, more fixes, agent stuff. You write the message. You choose the files. The agent does not own the repo.

Try it yourself

Exercise 1: Write a four-line sticky note (goal, files, must-not, done) for this task: “Users should be able to search notes by a word.”

Show solution
Goal: python notes.py search milk prints matching notes.
Files: notes.py, test_notes.py
Must not: new packages, new JSON format, web UI
Done: pytest -q and python notes.py search milk

Exercise 2: The agent added server.py and a requirements.txt with Flask when you asked only for unique_words. What do you do, in order?

Show solution

Reject the extras. Restore or delete server.py and requirements.txt. Keep only words.py / test_words.py if they match the spec. Send: “Do not add a server or dependencies. Only words.py and test_words.py.” Run pytest -q yourself, then commit the small slice.

Key takeaways

  • You pick the goal, files, constraints, and done command. The agent drafts.
  • Work in 20–30 minute slices: explore, plan, implement, review, test, commit.
  • Attach two or three files. Run tests in your terminal. Write the commit message yourself.
  • Accept, fix, reject extras, or revert. Never Accept All on a surprise diff.
  • This course is a playbook for that loop. Next, pick a tool, set up the practice folder, and start.

FAQ: How You Work with Vibe Coding

Common questions about this page.

What is vibe coding?

Vibe coding is building software by directing an AI in natural language while you review, test, and own the result. The StudyGrid Vibe Coding course teaches the workflow, prompts, and habits that make it work.

Should I run how to vibe code examples locally for better learning?

Yes. Use the browser editor on StudyGrid for a quick check, then Download the example and run it on your computer. Local runs show real errors and the real toolchain, which is one of the fastest ways to learn how to vibe code in this Vibe Coding AI lesson (How You Work with Vibe Coding).

How do I vibe code the right way?

Give one clear goal, attach the files that matter, ask for a plan first, review every diff, run tests, then commit a small slice. The How You Work lesson is the session guide. Best Practices is the full playbook.

How does a user actually work with vibe coding?

You open a real project in an agent editor or CLI agent (Cursor, VS Code + Copilot, Claude Code, and similar), write one goal, attach two or three files, ask the agent to plan then implement a small slice, read the diff, run tests yourself, and commit. You are the director. The model drafts. The How You Work lesson walks through a 30-minute session. The Tools lesson is the stack picker.

Is vibe coding only for experts?

No. Beginners can use it to learn faster if they read the generated code. Experts use it to move quicker on boilerplate while keeping architecture and review in their hands.

What tools do I need for vibe coding?

You need an agent that can read your project, edit files, and show a diff — for example Cursor, VS Code with GitHub Copilot, Claude Code, Codex CLI, Continue, or Windsurf — plus Git for undo and a language you can read (this course uses Python). A browser chatbot is not enough. The Tools lesson compares the stacks. Setup covers the checklist.

Which AI coding tool should I use for vibe coding?

Pick one stack and stay with it for a project. Cursor is a common agent editor. VS Code plus GitHub Copilot fits if you already work there. Claude Code and Codex CLI are terminal agents. Continue, Windsurf, Zed, and JetBrains AI Assistant also work if they can apply a diff. Do not hop tools on a dirty tree.

Is the Vibe Coding course free?

Yes. The full Vibe Coding course on StudyGrid (studygrid.in) is free. Open the header menu, start at What Is Vibe Coding, then How You Work and Tools, and follow Next through the project and cheatsheet.