Skip to content
TriedPrompts

More in Build apps & tools.

Generate a colophon page for a GitHub Pages site with Claude Code

Claude Code wrote a script that builds a colophon page of every tool and its commit history, and wired it into the GitHub Pages deploy.

Result: WorkedTool: Claude CodeLevel: AdvancedSetup: Needs GitHubEvidence: Strong evidence

Copy the prompt

Strong evidence: The colophon page is live online, and its build script and the chat transcripts are public links. Rated , after reopening the source. Rates the evidence, not the result. Failed and partial cases are rated the same way. How we rate evidence

Outcome

Simon Willison built a colophon page for tools.simonwillison.net with Claude Code in just over 17 minutes, for 61 cents in API costs. A few prompts produced a Python script that collects each tool's commit messages and links, then a second script that builds a mobile-friendly HTML page; when the first version grouped the commits wrongly, Claude Code fixed the bug once told, and Willison asked for two ordering tweaks. A fresh session wrote the GitHub Actions workflow to build and publish the page without committing it, for about 17 cents. It went live, but two deploys were running at once until Willison read the documentation and switched the Pages setting to GitHub Actions by hand.

WorkedPosted Last checked

Level: Advanced. You need: A tool that takes actions for you or writes code, connected accounts, or some setup on your computer.

How to use this

  1. Tap Copy prompt.
  2. Open the tool the case used (or a similar one) and paste the prompt; results may differ from the original.
  3. Paste it into the message box.
  4. Send it, then read the answer before acting on it.
New to this? What's a prompt?

A prompt is the message you send to the AI tool. Copy the one on this page, put your own details where it asks, and read the answer before you act on it.

Prompt

Original prompt

The prompt as the person shared it in the source.

What the prompt labels mean

These are the person's own words, as shared in the source.

Write me a new script called build_colophon.py which looks through that gathered JSON file and builds and saves an HTML page. The page should be mobile friendly and should list every page—with a link to that page—and for each one display the commit messages neatly (convert newlines to br and linkify URLs but no other formatting)—plus the commit message dates and links to the commits themselves which are in https://github.com/simonw/tools

Try this in:

Sends the Original prompt shown above. ChatGPT and Grok open with it filled in, and ChatGPT may send it straight away. Gemini and Claude open empty, so we copy the prompt for you to paste. Every button also copies it.

The source used Claude Code, which can take actions on your computer or in a browser. These are general chat tools, so results may differ, and a normal chat may only give you a plan.

Opens in a new tab. We don't see what you send.

These links are only a shortcut. We're not affiliated with OpenAI, Google, Anthropic or xAI, and your results may not match the source.

Optional stronger version

Our rewrite with extra checks. The poster didn't test it.

Goal: Write build_colophon.py that turns the gathered commit JSON into a mobile-friendly HTML colophon page.

Inputs (fill in or confirm):
- Path to the gathered JSON file and its structure (page → commits)
- Output path for the HTML page
- Site base URL for page links

Rules:
- List every page with a link to it; under each, show its commit messages in date order.
- Convert newlines to <br> and linkify URLs, with no other formatting; escape all other HTML.
- Use plain HTML and inline CSS only; readable at 375px wide.
- Keep the script dependency-free (standard library only).
- Make the page readable on a phone with no horizontal scrolling.

Checkpoint: Don't commit or push; leave the script and output for my review.

If you get stuck: If the JSON shape differs from what you expect, print a sample and stop instead of guessing. If a login, CAPTCHA or two-step code appears, stop and ask me to handle it; never guess or store passwords.

Verify before you finish: Run it, open the output, and check one page with a multi-line message and one with a URL render correctly.

Output: The script, the generated HTML and a short note on how to rerun it.

Done when: the page lists every page with correctly escaped, linkified commit messages.

AI tool

Claude Code

Source

Posted
by Simon Willison
Last checked
Method:
How we verify

https://simonwillison.net/2025/Mar/11/using-llms-for-code/

Tell us how it went A reader message. It is not published on this page, and it is not a test of the prompt.

More in Build apps & tools

More in CodingRandom case in Coding