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
-
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.
-
Ask the AI to build it
Open your chatbot and describe the page. Copy this prompt and change the words in [brackets]:
PromptBuild 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.htmlis the easiest thing to publish. You only have one thing to copy. -
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.
-
Copy the final code
When you are happy, send this so you get the whole page in one piece:
PromptGive 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.
Like Google Docs version history, or Track Changes.
- GitHub
An online platform where people collaborate and store the tracking system.
Like Google Docs (online) versus Word (on your computer).
- 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.
Like Pressing Cmd / Ctrl + S in Word, except a commit doesn't overwrite the file.
- Branch
Lets you work on changes without affecting the main version of the project.
Like Making a copy of a Google Doc for your own edits or highlighting. Once you're happy with the edits, you can merge them back into the main document.
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
-
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.
-
Create a repository
A repository (“repo”) is a folder for your project.
- Click the + in the top right corner, then New repository.
- Type a name with no spaces, such as
my-first-site. - Choose Public.
- Turn on Add a README file.
- Click Create repository.
-
Add your page
- In your new repo, click the + button, then Create new file.
- Name the file exactly
index.html(all lowercase). - Click in the big empty box and paste the code from the AI.
- Click the green Commit changes button, then Commit changes again in the pop-up. “Commit” just means save.
-
Turn on GitHub Pages
- Click the Settings tab at the top of your repo. If your window is narrow, the tabs collapse and Settings moves under More.
- Click Pages in the left sidebar.
- Under “Build and deployment,” set Source to Deploy from a branch.
- Under Branch, choose main and / (root), then click Save.
-
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.
-
Keep improving it
- Go back to the AI and ask for a change, then ask for the complete
index.htmlagain. - In your repo, click
index.html, then the pencil icon to edit. - Select everything, delete it, and paste the new code.
- Click Commit changes. Your live site updates in about a minute.
- Go back to the AI and ask for a change, then ask for the complete
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.
-
Connect GitHub to Claude
- Sign in to github.com (opens in a new tab) in your browser first, with the account that owns your repo.
- In Claude, open Customize, then Connectors.
- Select GitHub Integration, then Connect.
- GitHub asks you to authorize Claude. Approve it.
-
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.
- Go to github.com/apps/claude/installations/new (opens in a new tab).
- Choose your own GitHub account.
- Choose Only select repositories and pick your repo, or choose All repositories.
- Click Install.
-
Add your repo to a chat
- Start a new chat in Claude.
- Click the + at the lower left of the message box, then Add from GitHub.
- Search for your repo, or paste its address, such as
https://github.com/your-username/my-first-site. - Click Add repository.
-
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]:
PromptLook 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.
-
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.
- Copy the corrected code from Claude.
- In your repo, open
index.html, click the pencil icon, replace everything, and click Commit changes. - 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?
Vibecheck
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.