POLISCI 158 · Section 1

Week 2 · Section 1 · Workshop guide

Your first agent, your first repo, your first website

Today you'll set up a coding agent (Claude Code or Codex) and GitHub. You'll use them together to publish a personal website at your own public address. You will use this same setup in section for the rest of the quarter.

I'm using

The steps below switch to match your tool. Not sure? See which one.

Fills in your repo name and site address below. Stored only in this browser.

0 of 9 steps done

Three ideas before you start

1 · A chat model gives you text. A coding agent does work in a folder.

In a regular chat (claude.ai, ChatGPT), you ask a question, get an answer, and copy what you need. A coding agent works inside a folder on your computer. It can read your files, create and edit them, and run commands. It shows you what it changed, and it asks before doing anything risky. You describe the goal, and you stay the reviewer.

Try it: for each task, which tool would you reach for?

Explain what GitHub Pages is, in plain language.
Turn my notes into a website in this folder.
Summarize this week's reading and quiz me on it.
The link in my site's footer is broken. Find and fix it.
Rename all 12 photos in this folder and update the page to match.

2 · Two agents, one workflow. Pick one.

Claude CodeCodex
Made byAnthropicOpenAI
Where you open itClaude desktop app → Code tabChatGPT desktop app → switch the mode menu to Codex
Plan neededPaid: Pro, Max, Team or EnterpriseIncluded with ChatGPT plans, including Free (with lower usage limits)
Work on your filesLocal → Select folderOpen a folder → environment Local

Pick the one you already pay for. If you pay for neither, use Codex on the free plan. The rest of the workflow is the same either way: describe, review, revise, commit.

3 · Why Git and GitHub?

Without version control you end up with files like index_final_v2_REAL.html. And when an agent rewrites your page and breaks it, there's no way back. Git solves both problems.

Git is a tool on your laptop. It records the versions of a folder: what changed, when, and why.
GitHub is a website. It stores an online copy of that folder with its full history, and it can publish the folder as a website (GitHub Pages).

Commit and push, concretely

There are two actions to remember. A commit takes a labelled snapshot of your folder and saves it on your laptop. A push uploads your new snapshots to GitHub, and only then does your live site update. It's like saving a draft with a note, then sending it. Try it:

Your laptop
GitHub + your live site

How the pieces fit

Click each stage to see what happens there.

Working with an agent: six principles

A coding agent is fast, capable and confident, and it only knows what you tell it. When something is missing, it fills the gap with a plausible guess. These principles keep you in charge. They apply to every tool and every task, not just this website.

  1. Give it context. Say what this folder is, who the result is for, and where it will run. "This folder is my GitHub Pages repo for a college course."
  2. Say what "done" looks like. Be concrete, and ask for one change at a time. Describe what you see, not what you guess. "On my phone the menu overlaps the title. Fix only the menu."
  3. Set limits. Say what it must not do, add, or invent. "Use only the text I give you. Plain HTML and CSS, no frameworks."
  4. Plan before it acts. For anything bigger than a small fix, ask for a plan first, or let it ask you questions. "Before editing, show me your plan, and ask me up to 3 questions about anything unclear."
  5. You review everything. Check the actual result yourself, in the browser, sentence by sentence. "Done!" from the agent is a claim, not proof. "List every file you changed and what you changed in each."
  6. Save often, undo freely. Commit whenever something works. If a change goes badly, go back to the last commit instead of arguing with the agent. "Undo your last change."

Your first request

Write it yourself. A few sentences that follow the principles are enough. Here's what one can look like:

Example first request
This folder is my GitHub Pages repo for a college course. Build a simple one-page personal website: an index.html with a linked style.css, plain HTML and CSS only. Include About, Interests and Project interests sections, using only the text I give below. Don't add facts, links or achievements I didn't write. Keep it readable on a phone. Add a footer saying "Built with [tool]. Text written by [my name]." Before editing anything, show me your plan and wait for my OK.

[paste your content here]

It's short, but every principle is there: context (line 1), done (the sections), limits (no invented facts, no frameworks), plan first (the last line). You'll do the reviewing and saving.

Optional: prompt builder Stuck? Fill in a form and get a starter request.

Everything stays in this browser. Nothing is sent anywhere.

This helps classmates with similar interests find you as a group partner for the final project.

Saved in this browser's local storage so you don't lose it.

Starter request · for Claude Code

Highlighted text = still to fill in. Before you send it, compare it with the principles above: can you spot each one? Edit it so it sounds like you.

The steps

Do steps 0 and 1 before section if you can. Start the rest in section, where help is around, and keep going at home. There's no need to finish in section. Click a step to open it, and mark it done when you finish.

  1. 0Accounts and appsGitHub, GitHub Desktop, and your agent appbefore section
    1. Create a GitHub account at github.com/signup. Your username becomes part of your website address (username.github.io), so pick one you're happy to share. A short, professional name is best.
    2. Install GitHub Desktop from desktop.github.com, open it, and sign in with your GitHub account.
    3. Install the Claude desktop app from claude.com/download and sign in. Click the Code tab at the top. If it asks you to upgrade, your plan doesn't include Claude Code. Switch this guide to instead.
    4. Install the ChatGPT desktop app from chatgpt.com/download and sign in with your ChatGPT account. Find the mode menu and switch it from ChatGPT to Codex.

    You're ready when: GitHub Desktop shows your account (Settings → Accounts), and the Code tab opens without an upgrade prompt.Codex mode opens and offers to work in a folder.

  2. 1Create your repositoryA GitHub project with a special name, copied to your laptop

    A repository (repo) is a project folder that Git tracks. GitHub has one rule for personal sites: if the repo is named exactly YOUR-USERNAME.github.io, it is published at that address.

    On github.com

    1. Click + (top right) → New repository.
    2. Repository name: YOUR-USERNAME.github.io. It must match your username exactly.
    3. Visibility: Public. Turn Add README on.
    4. Click Create repository.

    In GitHub Desktop

    1. File → Clone repository… → choose YOUR-USERNAME.github.io from the list.
    2. Note the Local path. By default it's Documents/GitHub/YOUR-USERNAME.github.io. Click Clone.

    You're ready when: GitHub Desktop shows Current repository: YOUR-USERNAME.github.io, and Repository → Show in Finder (Mac) or Show in Explorer (Windows) opens a folder containing README.md.

  3. 2Open that folder in your agentand check that it can see your files
    1. In the Claude app, open the Code tab.
    2. Choose Local, click Select folder, and pick Documents/GitHub/YOUR-USERNAME.github.io.
    3. Next to the send button, set the permission mode to Manual for today. Claude will show you each change and wait for Accept or Reject. It's slower, but you'll see exactly what an agent does. You can switch to Accept edits once you're comfortable.
    1. In the ChatGPT app, switch the mode menu to Codex.
    2. Open a folder and pick Documents/GitHub/YOUR-USERNAME.github.io.
    3. Choose the Local environment, which works directly in that folder. Don't use Worktree or Cloud today.
    4. If Codex asks for permission to edit files or run a command, read the request before you approve it.

    Your first message is a warm-up. It changes nothing, and it proves the agent is looking at the right folder:

    Warm-up prompt
    What files are in this folder? In two sentences, explain what this project is and what GitHub Pages will do with it. Don't change anything yet.

    You're ready when: the agent mentions README.md and your repo name. If it describes some other folder, you opened the wrong one. Go back to step 2.

  4. 3Write your content yourselfHuman first: the words on the site are yours

    Before you ask the agent for anything, write your content in any notes app: a short About, a few Interests, and your Project interests. The agent handles the structure and styling. You supply the substance. This matches the course AI policy: written work must be in your own words.

    • 2–4 sentences are plenty for About. Write the way you'd introduce yourself at a club fair.
    • Project interests: what kinds of projects you'd like to work on in this course (topics, questions, or the kind of work you enjoy, like data, writing, or design). Classmates will use this to find group partners for the final project. You can also mention something you've worked on before.
    • Only include what you're comfortable having online. Leave out your phone number, home address, and student ID.
  5. 4Write your request and send itPlan first, then let it edit
    1. Write your first request yourself, following the six principles. The example there is a good starting point. Paste your content from step 3 below it and send. If you're stuck, the optional prompt builder can draft one for you.
    2. Your request asks the agent to propose a plan and wait. Read the plan. If something is off (e.g., "I'll add a contact form"), reply with the correction. When it looks right, reply "Looks good, go ahead."
    3. In Manual mode, each file change appears as a diff with Accept/Reject. Skim it, then accept.Approve file edits when asked. Codex lists the files it changed at the end of its reply.

    You're ready when: your folder contains index.html (and probably style.css).

  6. 5Look at it and review it criticallyYou are the reviewer, not the agent

    Open index.html in your browser. Double-click it in Finder or Explorer, or drag it onto a browser window. You can also ask Claude to "open a preview of index.html." Then check:

    • Accuracy. Read every sentence. Did the agent add anything you didn't write, like a made-up award, a university you didn't attend, or an extra link? Agents fill gaps with plausible fiction.
    • Phone width. Narrow the browser window until it's phone-sized. Is the text still readable? Does the navigation still work?
    • Links. Click every one.
    • Taste. Is there anything you'd be embarrassed to show a professor? That goes on your revision list.
  7. 6Commit and push your first versionSave a version, then send it to GitHub
    1. Switch to GitHub Desktop. The Changes tab lists the new files. Click one to see its diff (green = added lines).
    2. In the Summary box (bottom left), describe the change, e.g. Add first version of personal site.
    3. Click Commit to main. This creates a version on your laptop that you can always return to.
    4. Click Push origin (top bar). This sends your commits to GitHub.

    Commit ≠ push. A commit saves a version locally. Nothing reaches GitHub, or your live site, until you push.

    You're ready when: on github.com, your repo shows index.html and your commit message.

  8. 7Turn on GitHub Pages and visit your siteOne setting, then wait a few minutes
    1. On github.com, open your repo → Settings → Pages (left sidebar).
    2. Under Build and deployment, set Source to Deploy from a branch. Set Branch to main and folder to / (root), then click Save. Your username.github.io repo may already be set up this way.
    3. Wait. It can take up to 10 minutes. The Pages settings page shows the address once the site is live.
    4. Visit https://YOUR-USERNAME.github.io. Open it on your phone too.

    You're ready when: your page, not the README, loads at your address.

  9. 8Improve it (optional, recommended)Specific requests, reviewed, then committed

    Your site is live, which is all the assignment needs. To make it better, repeat the loop: describe → review → revise → commit → push. Make one change at a time, and commit each one, so you can always go back. Click a suggestion to copy it, or write your own:

    After each revision: refresh the page in your browser and check it. If you like the change, commit with a clear message (Show interests as tags, not update) and push. If you don't, reject the change, or ask the agent to undo it.

Then submit

When your site is live, submit one link on Canvas: https://YOUR-USERNAME.github.io. Check it in a private window first. Details are in the assignment. Want a picture of the finished product? Here's an example site built this way (the person is fictional).

You are the reviewer

Read before you approveWhen the agent asks to run a command you don't understand, ask it: "What does that command do, and why do you need it?" If you're not sure, say no. You can always ask for another approach.
Never paste secretsNo passwords, API keys, or personal ID numbers in prompts or in the site. GitHub will handle sign-in itself.
Public means publicAnything you push to a public repo can be seen, copied, and archived, including in the commit history. Deleting a file later doesn't erase it from earlier commits.
Stay in the folderThe agent should only work in your repo folder. If it wants to touch files elsewhere on your computer, stop and ask why.
DiscloseYour footer credits the tool you used. That's the course AI-use policy in miniature: credit AI the way you'd credit a collaborator.

Stuck?

First ask your agent. Describe exactly what you see: "GitHub Desktop says 'rejected — fetch first'. What does that mean, and what should I click?" Then check here, then ask a neighbor, then raise your hand.

The Code tab asks me to upgrade (Claude)
Claude Code needs a paid Claude plan (Pro or higher). Switch this guide to . It's included with ChatGPT plans, including Free with lower limits. Or pair with a neighbor today and sort out access later. Contact the teaching staff if cost is a barrier.
I hit a usage limit
Limits reset after a few hours. Meanwhile: keep your requests small and specific (they use less), switch to the other tool, or make small text edits yourself. index.html is just a text file, and you can open it in any editor.
I can't find my repo folder when selecting it in the agent
In GitHub Desktop: Repository → Show in Finder / Show in Explorer. The window title shows the path. By default it's Documents/GitHub/YOUR-USERNAME.github.io.
The agent says it can't see my files, or describes a different folder
Ask it: "What is your current working directory?" If it's not your repo, start a new session and select the right folder (step 2).
GitHub Desktop shows "No local changes" after the agent edited files
The agent was probably working in a different folder than the repo GitHub Desktop is tracking. Compare the two paths. Also check that the agent actually finished and saved (with Claude in Manual mode, did you click Accept?).
My address shows a 404 "There isn't a GitHub Pages site here"
Check four things: (1) the repo is named exactly username.github.io with your username; (2) it's Public; (3) Settings → Pages is set to Deploy from a branch · main · / (root); (4) you've waited up to 10 minutes after your first push.
My site shows the README instead of my page
GitHub Pages looks for a file named exactly index.html (all lowercase) at the top level of the repo. Check the file name and location on github.com. Also check that you pushed after committing.
I pushed, but the live site still shows the old version
Wait 1–2 minutes, then hard-refresh: Cmd+Shift+R (Mac) or Ctrl+F5 (Windows). Check the Actions tab in your repo to see if the deployment is still running.
The live page has no styling (plain black text), but it looked fine locally
Usually style.css wasn't committed, or the link in index.html uses a different capitalization (Style.css vs style.css). File names are case-sensitive on GitHub Pages but not on your Mac. Ask the agent: "Check that every file index.html links to exists with the exact same name."
Push fails: "rejected" or "fetch first"
GitHub has a change your laptop doesn't, usually because you edited something on github.com. In GitHub Desktop, click Fetch origin, then Pull origin, then Push origin.
The agent invented things about me
This is normal agent behavior, which is why you review. Ask: "Compare the page with the content I gave you and remove anything I didn't write." Then read it again yourself.
(Windows) My file is called index.html.txt
Windows hides file extensions by default. In File Explorer: View → Show → File name extensions, then rename the file to index.html. Better: have the agent create the files, and this won't happen.
I have privacy concerns about a public page
Share only what you're comfortable with. A photo and contact details aren't required. If you have concerns about hosting a public page at all, talk to your TA about an alternative.
I (or the agent) broke the site. How do I go back?
If you haven't committed yet: in GitHub Desktop, right-click the changed file → Discard changes. If you already committed: open the History tab, right-click the bad commit → Revert changes in commit. This is why you commit often.

No match. Ask your agent, a neighbor, or your TA.

Words you'll hear

Repository (repo)
A project folder whose history Git tracks. Yours lives both on your laptop and on GitHub.
Clone
Copy a repo from GitHub to your laptop, keeping them connected.
Commit
A saved version with a message describing what changed. Like a save point in a game.
Push
Send your new commits from your laptop up to GitHub.
Pull / Fetch
Bring changes from GitHub down to your laptop.
Branch main
The main line of your project's history. Today you only use this one.
Diff
A view of exactly which lines were added (green) or removed (red).
GitHub Pages
GitHub's free hosting: it turns the files in a repo into a public website.
Permission mode
How much the agent may do without asking you first. Start cautious.
HTML / CSS
HTML is the content and structure of a page; CSS is how it looks. Both are plain text files.