You have read about vibe coding. You have picked your tool. Now it is time to actually do it. This article walks you through a complete vibe coding session — step by step, with real prompts and real AI output.

We will build a working CLI tool from nothing. By the end, you will understand the core cycle of vibe coding: prompt, review, test, iterate.

If you have not set up your tools yet, read the Claude Code Setup Guide or install Cursor first. For help choosing, see Choosing Your AI Coding Tool.

What We Are Building

A simple but useful tool: a link checker that scans a website and finds broken links.

Why this project? It is small enough to build in one session but real enough to be actually useful. It involves file I/O, HTTP requests, HTML parsing, and command-line arguments — a good mix of concepts.

We will use Python because it is the most common language for CLI tools, but the vibe coding approach works the same in any language.

Step 1: Set Up the Project

Open your terminal. Create a folder.

mkdir link-checker && cd link-checker

Now start Claude Code (or open the folder in Cursor).

claude

That is all the manual setup you need. No boilerplate. No config files. The AI will create everything.

Step 2: The First Prompt

This is the most important moment. Your first prompt sets the direction for everything that follows. Be specific about what you want.

Here is what I typed:

Build a Python CLI tool called "linkcheck" that checks a website
for broken links.

Requirements:
- Takes a URL as input (required argument)
- Crawls the page and finds all <a href> links
- Checks each link with an HTTP HEAD request
- Reports broken links (status 4xx or 5xx) and unreachable links
- Shows a summary at the end: total links, broken count, ok count
- Use the click library for CLI, requests for HTTP,
  beautifulsoup4 for HTML parsing
- Add a --timeout flag (default 10 seconds)
- Add a --verbose flag that shows every link as it's checked
- Create a requirements.txt file

Notice what I did:

  • Named the tool — “linkcheck”
  • Listed specific requirements — not vague wishes
  • Specified the libraries — I know which libraries I want
  • Included flags — timeout and verbose
  • Asked for requirements.txt — so anyone can install dependencies

This level of detail is what separates good vibe coding from bad vibe coding. Vague prompts give vague results.

Step 3: Reviewing the AI Output

Claude Code created two files:

linkcheck.py — about 60 lines of code. It used Click for the CLI, requests for HTTP calls, and BeautifulSoup for parsing. The structure was clean: a main function, a function to extract links, and a function to check a single link.

requirements.txt — three lines listing the dependencies.

Before changing anything, I read through the code. Here is what I looked for:

  1. Does the structure make sense? Yes — clean separation of concerns.
  2. Are the libraries correct? Yes — Click, requests, BeautifulSoup.
  3. Are there obvious bugs? One — it did not handle relative URLs (like /about instead of https://example.com/about).
  4. Does it match my requirements? Mostly — but it was missing the --verbose flag implementation.

This review step is critical. Do not skip it. You do not need to understand every line, but you should understand the overall structure and catch obvious gaps.

Step 4: Testing

Before giving feedback, test what you have.

pip install -r requirements.txt
python linkcheck.py https://example.com

The output:

Checking links on https://example.com...

Found 1 links

Results:
  OK: https://www.iana.org/domains/example (200)

Summary: 1 total, 1 ok, 0 broken

It works for the basic case. Good. Now test a site with more links:

python linkcheck.py https://kemalcodes.com

This one found the relative URL bug. Links like /posts/what-is-vibe-coding/ caused errors because the tool tried to make HTTP requests to /posts/what-is-vibe-coding/ instead of https://kemalcodes.com/posts/what-is-vibe-coding/.

Step 5: Iterate with Feedback

Now I know exactly what to fix. Here is my second prompt:

Two issues:
1. Relative URLs like "/about" crash. Convert them to absolute
   URLs using the base URL before checking.
2. The --verbose flag is defined but nothing happens when I
   use it. Add verbose output that shows each link being checked
   in real time with its status.

Claude Code fixed both issues in about 10 seconds. It used urllib.parse.urljoin to resolve relative URLs and added click.echo calls inside the link-checking loop when verbose mode is on.

Step 6: Test Again

python linkcheck.py https://kemalcodes.com --verbose

Now the output showed each link being checked:

Checking links on https://kemalcodes.com...

Found 47 links

Checking: https://kemalcodes.com/posts/what-is-vibe-coding/ ... OK (200)
Checking: https://kemalcodes.com/posts/claude-code-setup-guide/ ... OK (200)
Checking: https://kemalcodes.com/categories/ai-tools/ ... OK (200)
...

Summary: 47 total, 45 ok, 2 broken

Broken links:
  https://oldsite.example.com/page (Connection error)
  https://kemalcodes.com/posts/deleted-article/ (404)

It works. Both bugs are fixed. The tool is functional and useful.

Step 7: Polish

The tool works, but I want to make it better. Here is my third prompt:

Add these improvements:
1. Color output — green for OK, red for broken, yellow for
   redirects (3xx)
2. Add a --recursive flag that follows links to other pages on
   the same domain (max depth 2)
3. Add a --output flag that saves results to a JSON file
4. Handle duplicate links — don't check the same URL twice

Claude Code made all four changes. The recursive crawling was the most complex part — it added a visited set to avoid infinite loops and respected the max depth.

Testing the recursive mode:

python linkcheck.py https://kemalcodes.com --recursive --verbose

It crawled the home page, then followed links to individual articles, checking links on those pages too. Found 3 broken links across the whole site.

Total time from start to working tool: 12 minutes.

The Prompt-Code-Test Cycle

What you just saw is the core cycle of vibe coding:

1. Prompt — Describe what you want clearly and specifically.

2. Code — AI generates the code. You review the structure and logic.

3. Test — Run the code. Try edge cases. See what breaks.

4. Iterate — Give specific feedback about what is wrong or missing.

5. Repeat — Keep cycling until the code does what you need.

Most features take 2-4 iterations. Complex features might take 5-7. If you are past 7 iterations and still not happy, your initial prompt was probably too vague. Start over with a better description.

What Good Prompts Look Like

After building hundreds of things with AI, here are the patterns that work best.

Be specific about inputs and outputs

Bad: “Build a file converter.”

Good: “Build a Python CLI tool that converts CSV files to JSON. Input: a CSV file path. Output: a JSON file in the same directory with the same name but .json extension.”

Name the libraries

Bad: “Build a web scraper.”

Good: “Build a web scraper using requests and BeautifulSoup. Parse the page, extract all article titles from h2 tags, and return them as a list.”

Describe the behavior, not the implementation

Bad: “Use a for loop to iterate over the items and check if each one matches the filter.”

Good: “Filter the items list to only include items where the price is under 50 and the category is ’electronics’.”

Let the AI decide how to implement it. You describe what the code should do.

Include edge cases

Bad: “Parse the date string.”

Good: “Parse the date string. Handle these formats: YYYY-MM-DD, MM/DD/YYYY, and ‘January 5, 2026’. Return None if the format is not recognized.”

Give context about the project

Bad: “Add a search feature.”

Good: “Add search to the notes app. We use SQLite for storage. The notes table has columns: id, title, content, created_at. Search should match against both title and content.”

Common Mistakes to Avoid

Starting too big. Do not ask AI to build your entire app in one prompt. Start with the core feature. Add things one at a time. Each prompt should be one clear task.

Not reading the code at all. You do not need to read every line, but read the structure. Check that functions exist. Check that files are in the right places. Check that libraries are the ones you expected.

Accepting code that “mostly works.” If there is a bug, fix it now. Do not move on thinking “I will fix it later.” AI-generated bugs get harder to fix as the project grows.

Rewriting your prompt from scratch after a bad result. Instead, tell the AI what went wrong. “The search results are not sorted by relevance” is better than rewriting the entire search prompt. Iteration is faster than restart.

Not using context files. If you are building a real project, create a CLAUDE.md or .cursorrules file. It tells the AI about your project structure, coding standards, and preferences. Read more about this in Context Engineering, article 8 in this series.

What to Do When AI Gets Stuck

Sometimes AI gives you wrong code three times in a row. It keeps making the same mistake. This happens, and there are ways to handle it.

Rephrase the problem. If “fix the sorting” does not work after two tries, describe the problem differently. “The list shows oldest items first. I need newest items first. The sort key is the created_at timestamp.” More detail gives the AI a better chance.

Show the error. Copy the exact error message and paste it in your next prompt. “When I run this, I get: TypeError: Cannot read property ’name’ of undefined on line 23.” Error messages give AI precise information about what went wrong.

Break the task into smaller pieces. If “build a search feature with filters, sorting, and pagination” keeps failing, try “build a basic search that matches the title field” first. Get that working. Then add filters. Then add sorting. Then add pagination. Small steps work better than big leaps.

Start fresh. If you are 10 iterations deep and going in circles, start a new conversation. Your conversation history might be confusing the AI. A fresh start with a clear, detailed prompt often solves the problem immediately.

Switch tools. If Cursor keeps generating the wrong pattern, try Claude Code for that specific task. Different tools have different strengths. Sometimes switching models (from Sonnet to Opus, or from GPT-4 to Claude) fixes the issue immediately.

Try It Yourself

Here are three small projects perfect for your first vibe coding session. Pick one and try it today:

Project 1: Pomodoro Timer CLI

Build a terminal pomodoro timer. 25 minutes work, 5 minutes break.
Show a countdown in the terminal. Play a system beep when the
timer ends. Track how many pomodoros were completed today.

Project 2: File Organizer

Build a Python script that organizes files in a folder by type.
Move images to an "images" folder, documents to "documents",
videos to "videos", and everything else to "other".
Take the folder path as a command-line argument.

Project 3: Git Stats

Build a CLI tool that shows git stats for the current repository.
Show: total commits, commits this week, most active files,
top contributors, and average commits per day.
Use gitpython library.

Each of these should take 10-15 minutes with AI. That is the magic of vibe coding — you can build useful tools in the time it takes to drink a coffee.

Key Takeaways

  • Start with a specific, detailed first prompt. Name the tool, list requirements, specify libraries, and include flags or options.
  • Always test the AI output before iterating. Real bugs are easier to describe than hypothetical ones.
  • The core cycle is prompt, review, test, iterate. Most features take 2-4 iterations.
  • Good prompts describe behavior and outcomes, not implementation details. Let the AI decide how to write the code.
  • Start small. Build one feature at a time. Do not try to generate an entire app in one prompt.

What’s Next?

Now that you have built your first project, you need to know where AI falls short. Read When NOT to Vibe Code — the anti-patterns and situations where AI coding makes things worse.

For a quick reference on prompts and commands, check the AI Coding Tools Cheat Sheet.


This is part 3 of the Vibe Coding series.