Lesson 1

Vibecode your first webpage

By the end you will have a real webpage with its own link that anyone can open. It costs nothing and takes about 20 minutes.

Prerequisites

  • A free GitHub account
  • A free AI chatbot, such as Claude. Pick one from Tools.

Sign up for both with a personal email, not a school (.edu) one.

Part 1: Make the page with AI

  1. Decide what your page is about

    Keep it small. One page about one thing: yourself, your pet, a favorite recipe, a club, a tiny game.

  2. Ask the AI to build it

    Open your chatbot and describe the page. Copy this prompt and change the words in [brackets]:

    Prompt

    Build me a one-page website about [my dog Mochi]. Include [a short intro, three fun facts, and a list of her favorite things]. Make it look [playful and colorful] and work well on phones. Put everything (HTML, CSS, and JavaScript) in a single file called index.html. Do not use any outside images or libraries.

    Why one file? A single index.html is the easiest thing to publish. You only have one thing to copy.

  3. Look at it and ask for changes

    Most chatbots show a preview of the page. Talk to the AI the way you would talk to a designer:

    • “Make the title bigger and change the background to light blue.”
    • “Add a button that shows a random fun fact.”
    • “The text is hard to read on my phone. Fix it.”

    Repeat until you like it. This back‑and‑forth is vibecoding.

  4. Copy the final code

    When you are happy, send this so you get the whole page in one piece:

    Prompt

    Give me the complete, final index.html in one code block.

    Use the copy button on the code block. Keep this tab open.

Part 2: Put it online with GitHub

GitHub stores your file for free and turns it into a live website with a feature called GitHub Pages.

Core concepts

The basics

Git

The tracking system.

GitHub

An online platform where people collaborate and store the tracking system.

Repo (repository)

A project folder that stores all the essential “ingredients” that make the project work.

my-website/
├── index.html
├── style.css
└── images/

Saving your work

Commit

A saved snapshot of your work.

Branch

Lets you work on changes without affecting the main version of the project.

Moving your work around

Push

Sends the changes on your computer (or Codespace) to GitHub.

Pull

Downloads the latest changes from GitHub to your computer.

Clone

Downloads a copy of a GitHub repository onto your computer.

Fork

Makes a copy of someone else's project in your own account.

Steps

  1. Create a free GitHub account

    Go to github.com/signup (opens in a new tab). Enter your email, a password, and a username, then verify your email.

    Choose your username with care. It becomes part of your website's address.

  2. Create a repository

    A repository (“repo”) is a folder for your project.

    1. Click the + in the top right corner, then New repository.
    2. Type a name with no spaces, such as my-first-site.
    3. Choose Public.
    4. Turn on Add a README file.
    5. Click Create repository.
  3. Add your page

    1. In your new repo, click the + button, then Create new file.
    2. Name the file exactly index.html (all lowercase).
    3. Click in the big empty box and paste the code from the AI.
    4. Click the green Commit changes button, then Commit changes again in the pop-up. “Commit” just means save.
  4. Turn on GitHub Pages

    1. Click the Settings tab at the top of your repo. If your window is narrow, the tabs collapse and Settings moves under More.
    2. Click Pages in the left sidebar.
    3. Under “Build and deployment,” set Source to Deploy from a branch.
    4. Under Branch, choose main and / (root), then click Save.
  5. Visit your live site

    Wait a minute or two, then refresh the Pages settings screen. Your link appears at the top. It looks like this:

    https://your-username.github.io/my-first-site/

    Open it. Send it to a friend. You have a website.

  6. Keep improving it

    1. Go back to the AI and ask for a change, then ask for the complete index.html again.
    2. In your repo, click index.html, then the pencil icon to edit.
    3. Select everything, delete it, and paste the new code.
    4. Click Commit changes. Your live site updates in about a minute.

Part 3: Connect your AI tool to GitHub

Once connected, the AI reads your repo itself, so you no longer paste your code into the chat. These steps use Claude and work on the free plan.

  1. Connect GitHub to Claude

    1. Sign in to github.com (opens in a new tab) in your browser first, with the account that owns your repo.
    2. In Claude, open Customize, then Connectors.
    3. Select GitHub Integration, then Connect.
    4. GitHub asks you to authorize Claude. Approve it.
  2. Give Claude access to your repo

    This is the step people miss. Connecting your account is not enough: the Claude GitHub App also has to be installed on your repo.

    1. Go to github.com/apps/claude/installations/new (opens in a new tab).
    2. Choose your own GitHub account.
    3. Choose Only select repositories and pick your repo, or choose All repositories.
    4. Click Install.
  3. Add your repo to a chat

    1. Start a new chat in Claude.
    2. Click the + at the lower left of the message box, then Add from GitHub.
    3. Search for your repo, or paste its address, such as https://github.com/your-username/my-first-site.
    4. Click Add repository.
  4. Ask for the fix in plain words

    Describe the problem the same way you would in the Tips tab. Copy this prompt and change the words in [brackets]:

    Prompt

    Look at the GitHub repo I added. On my page, [the Submit button does nothing on my phone]. Find the cause in index.html and explain it in plain words. Then give me the complete corrected index.html in one code block.

  5. Save the fix and check your site

    On the free plan Claude can read your repo but cannot change it, so you save the fix yourself.

    1. Copy the corrected code from Claude.
    2. In your repo, open index.html, click the pencil icon, replace everything, and click Commit changes.
    3. Refresh your live site after about a minute.

    Next time, start a new chat and add the repo again so Claude sees the latest version.

If the connection does not work

Claude says it cannot access my repo

The Claude GitHub App is not installed on that repo yet. Repeat step 2. To check, go to github.com/settings/installations (opens in a new tab), click Configure next to Claude, and make sure your repo is listed under Repository access.

My repo does not show up in the list

Check that the GitHub account signed in to your browser is the one that owns the repo. A school account and a personal account are two different accounts. Then paste the repo address instead of searching for it.

It says Connected but still fails

In Customize, then Connectors, disconnect GitHub and connect it again. Then start a new chat. Access changes sometimes need a reconnect to take effect, and it can take a second try.

The Claude desktop app gets stuck or keeps looping

Connect GitHub from claude.ai (opens in a new tab) in a web browser instead. The connection belongs to your Claude account, so it then shows up in the desktop app too.

I cannot install the app with my school account

School-managed accounts can block app installs. Use a personal GitHub account and a personal Claude account.

Want the AI to save changes for you? The free connection is read-only. On a paid Claude plan, Claude can work in a cloud session that edits your repo and pushes the changes for you.

Using a different AI tool?

The steps differ, but the idea is the same: connect your GitHub account, then give the tool access to your repo.

ChatGPT

Called Plugins. Look for GitHub in the plugin directory.

Grok

Called Connectors. Add one at grok.com/connectors.

FAQs

My link shows a “404” page

Wait a few minutes and refresh. If it still fails, check that the file is named exactly index.html, that it sits at the top level of the repo (not inside a folder), and that Pages is set to the main branch.

Pages is not working in Settings

On a free account the repo must be Public. Go to Settings, scroll to the bottom, and change the visibility to Public.

My changes are not showing up

Give it a minute, then do a hard refresh: Ctrl + Shift + R on Windows or Cmd + Shift + R on Mac.

I want to rename my repo

Open Settings at the top of your repo (under More if your window is narrow). The Repository name box is at the top of the page. Type the new name and click Rename. Your website address changes to match the new name, so share the new link.

I want to delete a repo

Open Settings and scroll to the very bottom, to the section called Danger Zone. Click Delete this repository and follow the prompts, which ask you to type the repo name to confirm. This cannot be undone, and the website for that repo goes offline.

The page looks broken or a button does nothing

See the Tips tab. Tell the AI exactly what you see and what you expected, then replace your file with the corrected code.

Need help debugging?

Go to Tips →

Vibecheck

Question 1 of 3What should you name the file you add to your repo?
Question 2 of 3What does a commit do?
Question 3 of 3Which GitHub feature turns your repo into a live website?

Takeaways

In this lesson, you

  • Built a webpage by describing it to an AI in plain language.
  • Learned the core GitHub terms, such as repo, commit and branch.
  • Published your page for free with GitHub Pages.
  • Connected your AI tool to GitHub so it can read your code directly.

Up next

This lesson covered the basic, 101 way to vibecode. The next lesson moves on to more advanced techniques, using Supabase and Vercel.