| Takeaway | Detail |
|---|---|
| 82% of developers use or plan to use AI coding tools | The GitHub Developer Survey (March 2026) confirms near-universal adoption of AI-assisted development, making vibe coding a mainstream practice. |
| Enterprise AI coding tool adoption grew 340% year-over-year | Non-technical user adoption surged 520% in the same period, indicating vibe coding is expanding beyond professional developers into business and hobbyist domains. |
| Write a technical specification (PRD) before prompting | Including functional requirements, UI layout, data flow, and constraints in plain language improves AI output reliability and reduces iteration cycles. |
| Use Markdown for AI prompts—it's 67% more token-efficient than HTML | LLMs process Markdown more efficiently, making it the preferred input format when generating content for static sites on GitHub Pages. |
| Test locally with Python's http.server or VS Code Live Server | Simulating the GitHub Pages environment locally catches 404 errors from incorrect relative paths and missing assets before deployment. |
| Jekyll (51K+ stars) and Hugo (86K+ stars) are the top static site generators | Hugo offers faster build times due to its Go architecture; both integrate natively with GitHub Pages for automated deployment. |
| Client-side JavaScript is required—GitHub Pages does not support server-side languages | All logic must run in the browser or be pre-built as static files; third-party APIs require CORS-compatible endpoints or a proxy service. |
| Target under 2 seconds for first contentful paint using Google Lighthouse | This measurable benchmark helps evaluate AI-generated code quality for static sites, ensuring acceptable performance for end users. |
| Item | Rule / threshold |
|---|---|
| First contentful paint target | Under 2 seconds (measured via Google Lighthouse) |
| Markdown token efficiency | 67% more token-efficient than raw HTML for LLMs |
| Local testing tools | Python `http.server` module or VS Code Live Server extension |
| Static site generator stars | Jekyll: 51K+ GitHub stars; Hugo: 86K+ GitHub stars |
| AI code iteration loop | Prompt → Generate → Review → Test → Iterate (typical cycle) |
The term "vibe coding" entered the developer lexicon in February 2025 when Andrej Karpathy described a paradigm where users describe what they want in plain English and an AI model writes the corresponding code.
This guide walks through the complete workflow for taking a vibe-coded idea from a natural language prompt to a live site on GitHub Pages. You will learn how to structure prompts, test AI-generated code locally, avoid common pitfalls like hardcoded API keys and incorrect asset paths, and deploy using static site generators such as Jekyll or Hugo—all without writing a single line of code by hand.
What Can You Actually Build with Vibe Coding on GitHub Pages?
You can build functional single-page applications, interactive dashboards, documentation sites, and portfolio pages using vibe coding on GitHub Pages. The platform serves static files directly from a repository, so any tool that outputs valid HTML, CSS, and JavaScript can be deployed with zero server-side logic. A typical project includes an index.html file at the root, with assets organized in css/, js/, and assets/ subdirectories to prevent 404 errors on deployment.
The prompt-generate-review loop is the core workflow. You describe the desired interface or function in natural language, the AI model produces the code, and you test it locally by opening the HTML file in a browser. Iteration happens through follow-up prompts that refine layout, fix bugs, or add features. For example, a prompt like "build a markdown previewer with a split pane and live rendering" can produce a working tool in under ten minutes, provided the AI handles the event listeners and DOM manipulation correctly.
Third-party API integration is possible but requires client-side JavaScript and CORS-compatible endpoints. A vibe-coded tool that fetches data from the GitHub API or Google Sheets works if the API supports browser-based requests or you use a proxy service. GitHub Pages does not run server-side code, so any data source must be accessible via fetch() or XMLHttpRequest from the browser. For APIs that block CORS, you can use a free proxy like cors-anywhere during development, though production deployments should use a dedicated proxy or switch to a serverless function on a different host.
Static site generators like Jekyll and Hugo are also viable for vibe-coded projects, but they add a build step. Jekyll has 51K+ GitHub stars and integrates natively with GitHub Pages, while Hugo (86K+ stars) offers faster build times due to its Go architecture. If your AI tool outputs raw HTML files, you can skip the generator entirely and push the files directly. This avoids build errors and keeps the deployment instant, which is useful for rapid prototyping or tools that need frequent updates.
Custom domains and HTTPS are supported by default. You configure a CNAME file in the repository root or set the domain in the repository settings. The HTTPS certificate is provisioned automatically by GitHub, so no manual SSL setup is required. This makes it straightforward to publish a vibe-coded tool under a personal domain without additional infrastructure.
When testing locally, paths like ./js/app.js work, but the AI may generate absolute paths or reference external libraries without a fallback. Always verify that all asset links are relative and that the index.html file loads without console errors before pushing to the repository. Use the browser's developer tools to check for failed network requests.
To start building today, open a new GitHub repository, create an index.html file, and use an AI coding tool like Claude or ChatGPT to generate the initial code from a plain English description. Test locally by opening the file in a browser, then push to the main branch and enable GitHub Pages in the repository settings under the "Pages" section. The site will be live at https://your-username.github.io/repository-name/ within one to two minutes.
How Does the Prompt-Generate-Review Workflow Function?
The prompt-generate-review workflow is the core loop of vibe coding, and it functions as a structured cycle of specification, generation, and validation. The term "vibe coding" was coined by Andrej Karpathy in February 2025 to describe this paradigm where a user describes what they want in plain English and an AI model writes the corresponding code. As of March 2026, , making this workflow a standard practice rather than an experimental one.
The workflow begins with a natural language prompt that acts as a functional specification. Writing a technical specification (PRD) before prompting an AI improves output reliability; a spec should include functional requirements, UI layout descriptions, data flow, and constraints in plain language. For a GitHub Pages project, this means specifying the tool's purpose, the user interactions, the data sources (if any), and the visual layout. For example, a prompt like "build a single-page markdown previewer with a split pane, live rendering on every keystroke, and a dark mode toggle" provides enough context for the AI to generate a complete HTML file with embedded CSS and JavaScript.
The AI model then generates the code, typically outputting a single HTML file or a set of files (index.html, style.css, script.js) that you can save directly into your project folder. The review phase is critical and often overlooked. You must open the generated HTML file in a browser and test every interactive element. Use the browser's developer tools to check the console for errors, inspect network requests for failed asset loads, and verify that all relative paths resolve correctly. A common mistake is assuming the AI will handle file structure and relative paths correctly; always verify that all asset links are relative and that the index.html file loads without console errors before pushing to the repository.
Iteration happens through follow-up prompts that refine layout, fix bugs, or add features. If the AI generates code that breaks on mobile, you prompt "make the split pane stack vertically on screens narrower than 768px." If a button click does nothing, you prompt "the save button does not trigger any action; add an event listener that logs the markdown content to the console." Each iteration follows the same generate-review loop, and you can typically resolve three to five issues per round of prompting. For a vibe-coded single-page application on GitHub Pages, the project root must contain an index.html file, and all assets (CSS, JS, images) should be in subdirectories such as css/, js/, and assets/ to avoid 404 errors.
To test AI-generated code locally before deploying to GitHub Pages, use a local HTTP server to simulate the production environment. Python's http.server module (run python -m http.server in the project directory) or VS Code's Live Server extension both serve files with correct MIME types and handle relative paths properly. This step catches path errors and CORS issues that would otherwise appear only after deployment. The prompt-generate-review loop typically takes 10 to 30 minutes for a single-page tool, depending on the number of iterations required. For a tool that fetches data from an external API, you must also verify that the API supports browser-based requests or use a CORS proxy during development.
A concrete action you can take today: open a new GitHub repository, create an index.html file, and write a single prompt for a tool you need, such as "build a pomodoro timer with start, pause, and reset buttons, a circular progress indicator, and a notification sound when the timer ends." Generate the code, test it locally with a local HTTP server, push to the main branch, and enable GitHub Pages in the repository settings under the "Pages" section. The site will be live at https://your-username.github.io/repository-name/ within one to two minutes.
Choosing an AI Model for Your Vibe Coding Project
Different AI models produce different strengths in generated code. ChatGPT-4o and o4-mini have been used to generate 100% client-side JavaScript tools that deploy directly to GitHub Pages without a build step. GitHub Copilot offers inline completions useful for fixing specific CSS properties or JavaScript functions without regenerating the entire file. The choice depends on your project's requirements and which model's output you find most reliable after testing.
A common practitioner mistake is using a single model for the entire project without verifying the output against browser standards. Always test generated HTML with the W3C validator and check CSS with the CSS Validation Service before pushing to GitHub Pages. For JavaScript, run the code through ESLint with the recommended configuration to catch undefined variables and unreachable code. These validation steps add five to ten minutes per iteration but prevent deployment failures that take longer to debug live.
Both models output complete, self-contained files that require no build step, which is the core requirement for GitHub Pages deployment.The reliability difference stems from each model's training distribution. Claude 3.5 Sonnet excels at CSS layout because its training data includes extensive modern CSS patterns like flexbox, grid, and container queries, and it consistently generates mobile-first responsive designs without explicit prompting. GPT-4o produces more robust JavaScript because its training emphasizes interactive patterns, error handling, and DOM manipulation edge cases. For a typical vibe coding workflow, the practical approach is to use Claude for the initial HTML/CSS structure and GPT-4o for adding JavaScript interactivity, then combine the outputs manually. GitHub Copilot, integrated into VS Code, offers a third option with inline completions that are useful for fixing specific CSS properties or JavaScript functions without regenerating the entire file.
Edge cases matter.
Take this action today: open two browser tabs, one with Claude 3.5 Sonnet and one with GPT-4o. Prompt each with the same request for a simple tool, such as "build a markdown previewer with a textarea input and a live preview panel that updates on every keystroke." Compare the output for CSS responsiveness and JavaScript reliability, then combine the best parts from each into a single index.html file. Deploy that combined file to a test GitHub Pages repository to see which model's strengths produce a working site faster.
How Do You Structure a Project Folder for Zero-Build Deployment?
The project folder for a zero-build deployment on GitHub Pages must contain an index.html file at the root, with all assets in subdirectories named css/, js/, and assets/. This flat structure avoids 404 errors because GitHub Pages serves files exactly as they appear in the repository, with no build step or server-side processing. For a vibe-coded single-page application, the root index.html is the entry point, and every linked resource must use a relative path that matches the folder layout.
The zero-build requirement means you cannot use frameworks that require a compilation step, such as React with JSX, Vue with single-file components, or any npm-based bundler. Instead, you write vanilla HTML, CSS, and JavaScript, or use a CDN-hosted library like Alpine.js or htmx that loads at runtime. A typical folder layout for a vibe-coded tool looks like this: project-root/index.html, project-root/css/style.css, project-root/js/app.js, and project-root/assets/logo.svg. Every file reference in the HTML must match this exact path structure, because GitHub Pages does not rewrite URLs or resolve module imports.
The term "vibe coding" was coined by Andrej Karpathy in February 2025 to describe a development paradigm where a user describes what they want in plain English and an AI model writes the corresponding code. In practice, this means the AI generates the entire folder structure as a single output or as multiple files that you manually split. When you prompt an AI to build a tool, instruct it to output all code as a single index.html file with embedded CSS and JavaScript, or explicitly request separate files with correct relative paths. The latter approach requires you to create the subdirectories manually and copy each generated block into the correct file.
An edge case arises when the AI generates absolute paths like /css/style.css instead of css/style.css. On GitHub Pages, a leading slash refers to the root of the domain, not the repository root, which breaks navigation if the site is served from a subpath like username.github.io/repo-name/. Always verify that all paths in the generated HTML are relative and do not start with a forward slash. Another common mistake is including a node_modules folder or a package.json file, which GitHub Pages ignores but adds unnecessary clutter to the repository.
What Should a Technical Specification Include for an AI Coder?
A technical specification for an AI coder — often called a PRD (product requirements document) — should define functional requirements, UI layout, data flow, and constraints in plain language before a single prompt is written. The spec acts as a contract: the AI generates code against it, and you test the output against the same document.
The spec must include four sections. First, functional requirements: list every action the tool must perform, such as "accept a user's text input, store it in localStorage, and display it in a list below the input field." Second, UI layout: describe the visual structure in plain terms, for example "a header with the tool name, a centered input area with a submit button, and a results panel below that scrolls vertically." Third, data flow: specify how data moves between the user, the browser, and any external API. For a GitHub Pages site, all data must stay client-side because there is no backend server. Fourth, constraints: state that the code must use vanilla HTML, CSS, and JavaScript only, with no build step, and that all file paths must be relative.
Write the spec in a single markdown file or a text document. Keep each requirement to one sentence. Avoid ambiguous words like "intuitive" or "fast" — use concrete terms like "the button must be 48px tall" or "the page must load in under 2 seconds on a 4G connection." The AI coder (Claude, GPT-4o, Gemini 2.5 Pro) will interpret vague language differently each time. A precise spec reduces the number of follow-up prompts from an average of 8 to 3, based on workflow data from vibe coding practitioners.
An edge case that breaks many AI-generated tools is missing error handling. The spec should explicitly state what happens when the user enters invalid data, when localStorage is full (5 MB limit per origin), or when an external API call fails. Without this, the AI often omits try-catch blocks or validation logic. Another common mistake is omitting the responsive layout requirement. If the spec does not mention mobile viewports, the AI may generate a fixed-width layout that breaks on phones. Add a line like "the layout must use CSS Grid or Flexbox and work on screens from 320px to 1920px wide."
As noted above, the zero-build constraint for GitHub Pages means the spec must forbid any framework that requires compilation. If the spec mentions React or Vue, the AI will generate JSX or single-file components that cannot run on GitHub Pages without a build step. Instead, the spec should name allowed libraries like Alpine.js or htmx, which load from a CDN at runtime. Include the exact CDN URLs in the spec to prevent the AI from guessing outdated versions.
Take this action today: open a new text file and write a one-page spec for a simple tool — a to-do list or a note taker. Include exactly five functional requirements, one UI layout description, one data flow sentence, and two constraints. Then paste that spec into an AI chat as the first message, followed by "Generate the code." Compare the output to a second attempt where you skip the spec. The difference in correctness and completeness will be visible in the first five lines of code.
How Do You Test and Debug AI-Generated Code Locally?
To test AI-generated code locally before deploying to GitHub Pages, serve the project folder through a local HTTP server rather than opening the HTML file directly from the filesystem. The browser's same-origin policy blocks fetch() calls, import statements, and localStorage access when loading a page via the file:// protocol, which will cause most vibe-coded single-page applications to fail silently. Python's built-in http.server module provides the simplest solution: run python3 -m http.server 8000 from the project root directory, then open http://localhost:8000 in a browser. For developers using Visual Studio Code, the Live Server extension (by Ritwick Dey, over 50 million installs) adds a one-click "Go Live" button in the status bar that starts a local server with automatic reload on file changes.
Debugging AI-generated code requires a different approach than debugging hand-written code because the AI may introduce logical errors that are syntactically valid. Open the browser's Developer Tools (F12) and inspect the Console tab first — this is where uncaught exceptions, undefined variable references, and failed API calls appear as red error messages. The Network tab shows every HTTP request the page makes, including the response status and payload, which is essential for debugging fetch() calls to external APIs that may be blocked by CORS policies. For vibe-coded tools that manipulate the DOM, the Elements panel lets you inspect the generated HTML structure and computed CSS styles in real time, revealing layout issues like missing containers or incorrect class names that the AI may have hallucinated.
A structured debugging workflow reduces the time spent on each iteration. Start by verifying that the page loads without console errors — if errors appear, paste the exact error message back into the AI chat as a follow-up prompt. For example, "The browser console shows 'Uncaught TypeError: Cannot read properties of null (reading addEventListener)' on line 45. Fix the code." This targeted feedback produces a correct fix in one or two attempts, compared to generic prompts like "fix the bugs." After the console is clean, test each user interaction path: click every button, submit every form, and trigger every state change. AI-generated code often omits edge cases such as empty input fields, rapid double-clicks, or missing data in localStorage. Use the Application tab in DevTools to inspect localStorage contents and clear them to test the initial state.
Version control becomes critical when iterating with AI because the model may introduce regressions in later prompts. Initialize a Git repository in the project folder before the first AI generation, then commit after each successful local test. Use branch names that describe the feature, such as ai-json-validator, and write commit messages that include the prompt context, for example "AI-generated: added JSON validator tool with error highlighting." This practice lets you revert to a working state when a later AI prompt breaks functionality, and it creates a readable history that documents which parts of the codebase were AI-generated versus hand-edited. As noted above, the prompt-generate-review loop averages 3 iterations when the spec is precise, but without version control, a single bad generation can waste 15–30 minutes of debugging time.
One common mistake is testing only on a desktop viewport. AI models trained on web content often generate fixed-width layouts that break below 768 pixels. Resize the browser window to 375px width (the iPhone SE viewport) and verify that all elements remain visible and functional. The DevTools device toolbar (the phone icon next to the Elements panel) provides preset viewport sizes and touch event simulation. If the layout breaks, add a constraint to the spec for the next iteration: "The layout must use CSS Grid with grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) and work on screens from 320px to 1920px wide." This concrete instruction produces a responsive layout in one generation, whereas a vague request like "make it mobile-friendly" often results in incomplete media query additions.
Take this action today: create a test checklist for your next vibe-coded project. Include four items — verify no console errors on load, test all user interactions, inspect localStorage state after each action, and confirm the layout works at 375px and 1920px widths. Run this checklist after every AI generation before committing the code.
What Are the Key Trade-Offs: Static Site Generator vs. Raw Files?
For a vibe-coded project on GitHub Pages, the choice between a static site generator (SSG) and raw HTML/CSS/JS files comes down to a single question: does your project need a multi-page structure with shared layouts, or is it a single-page application? Raw files win for simplicity and zero build time. An SSG wins for maintainability when you have more than three pages that share headers, footers, or navigation. GitHub Pages natively supports both approaches, but the deployment mechanics differ in ways that affect your AI prompting strategy.
Raw files require no build step. You create an index.html in the repository root, place CSS in a css/ folder and JavaScript in a js/ folder, and push. GitHub Pages serves the files as-is. This is the fastest path from prompt to live site. For a single-page tool — a JSON validator, a markdown previewer, or a calculator — raw files are the correct choice. The AI model generates one HTML file, one CSS file, and one JS file. You test locally, fix errors, and deploy. The entire loop takes minutes.
The AI prompting workflow differs between the two. With raw files, you prompt the model to generate a complete, self-contained page each time. The model must reproduce the same navigation bar and footer in every file, which increases token usage and the chance of inconsistencies. With an SSG, you prompt the model to create a single layout template (for example, a default.html in Jekyll's _layouts directory) and then prompt for individual page content files. The model handles less code per prompt, and the generator handles the repetition. This reduces the number of iterations needed to fix layout bugs across pages.
Build time is a practical constraint. Raw files deploy instantly on push. Jekyll builds take 10–30 seconds for small sites. Hugo builds take under 2 seconds for most sites due to its Go-based architecture. If you are iterating rapidly — pushing a change, waiting for the build, checking the live site — the extra 30 seconds per iteration adds up over 10 or 20 cycles. For a vibe-coding session where you might push 15 revisions in an hour, raw files keep the feedback loop tight.
One common mistake is choosing an SSG for a single-page tool because "it's the professional way." This adds unnecessary complexity. The AI model must understand template syntax (Liquid for Jekyll, Go templates for Hugo) in addition to HTML, CSS, and JS. If the model generates invalid template syntax, the build fails, and you debug a build error instead of a runtime error. For single-page projects, raw files eliminate this failure mode entirely.
Take this action today: before you write your first prompt, decide the page count. If the project is one page with no navigation, use raw files. If it has three or more pages that share a header and footer, use Jekyll (the default on GitHub Pages) and include a line in your spec: "Use Jekyll with a default layout in _layouts/default.html. Each page is a separate Markdown file with front matter for the title." This single decision determines whether your vibe-coding session produces a live site in 10 minutes or 45.
What to do next
This guide has walked through the core loop of vibe coding—prompt, generate, review, deploy—and shown how GitHub Pages serves as a frictionless host for the results. The tools and workflows are evolving rapidly, so the best next step is to run your own controlled experiment with a small, well-defined project.
| Step | Action | Why it matters |
|---|---|---|
| 1. Define a spec | Write a one-page plain-language PRD for a simple tool (e.g., a Markdown-to-HTML converter or a personal link-in-bio page). Include functional requirements, UI layout, and data flow. | A written spec improves AI output reliability and gives you a baseline to measure generated code against. This follows the documented prompt-generate-review loop. |
| 2. Generate with a model | Paste your spec into ChatGPT-4o, o4-mini, or Claude 3.5 Sonnet. Ask it to produce a single `index.html` file with embedded CSS and JS that works entirely client-side. | These models have been used to produce deployable single-page tools. Keeping everything in one file avoids GitHub Pages path issues and simplifies testing. |
| 3. Test locally | Save the generated `index.html` to a folder. Serve it using Python’s `http.server` module (`python3 -m http.server 8000`) or the VS Code Live Server extension. Open `http://localhost:8000` in a browser. | Local testing catches broken paths, missing assets, and JavaScript errors before you push to a public URL. GitHub Pages will serve the same files verbatim, so local behavior mirrors production. |
| 4. Create a GitHub repository | Initialize a new public repository on GitHub named ` |
GitHub Pages requires this exact structure. The `index.html` file must be in the root of the default branch. Subdirectories prevent 404 errors on linked resources. |
| 5. Enable GitHub Pages | Go to the repository Settings → Pages. Under "Branch", select `main` (or `master`) and `/ (root)` as the source. Save. Wait 1–2 minutes for the first build. | This is the official deployment method documented by GitHub. No build step is needed for raw HTML/CSS/JS; the site will be live at `https:// |
| 6. Compare static site generators | If your next project needs multiple pages, evaluate Jekyll (51K+ GitHub stars) vs Hugo (86K+ stars). Create a test site with each using their official quick-start guides, then compare build times and template flexibility. | Jekyll is natively supported by GitHub Pages; Hugo offers faster Go-based builds. Choosing the right generator affects long-term maintenance and page load performance. |
Also worth reading: Streamlining DevOps Build a Robust Salesforce CI/CD Pipeline with GitHub Enterprise · Supercharge Your Development Workflow Using GitHub Copilot · Automate AI Documentation with GitHub and Azure DevOps · Unlocking Creativity How AI Empowers Innovative Idea Generation
Quick answers
What Can You Actually Build with Vibe Coding on GitHub Pages?
html file at the root, with assets organized in css/, js/, and assets/ subdirectories to prevent 404 errors on deployment. Jekyll has 51K+ GitHub stars and integrates natively with GitHub Pages, while Hugo (86K+ stars) offers faster build times due to its Go architecture.
How Does the Prompt-Generate-Review Workflow Function?
As of March 2026, , making this workflow a standard practice rather than an experimental one. The prompt-generate-review loop typically takes 10 to 30 minutes for a single-page tool, depending on the number of iterations required.
How Do You Structure a Project Folder for Zero-Build Deployment?
This flat structure avoids 404 errors because GitHub Pages serves files exactly as they appear in the repository, with no build step or server-side processing. The term "vibe coding" was coined by Andrej Karpathy in February 2025 to describe a development paradigm where a user...
What Should a Technical Specification Include for an AI Coder?
Avoid ambiguous words like "intuitive" or "fast" — use concrete terms like "the button must be 48px tall" or "the page must load in under 2 seconds on a 4G connection. " The AI coder (Claude, GPT-4o, Gemini 2.5 Pro) will interpret vague language differently each time.
How Do You Test and Debug AI-Generated Code Locally?
server module provides the simplest solution: run python3 -m http. server 8000 from the project root directory, then open http://localhost:8000 in a browser.
What Are the Key Trade-Offs: Static Site Generator vs. Raw Files?
Jekyll builds take 10–30 seconds for small sites. Hugo builds take under 2 seconds for most sites due to its Go-based architecture.
Sources: helloacm, pooyagolchian, the-ai-corner, vibecoding, 0xminds