# Prompts Belong in Git

> A prompt that worked once and a prompt you can defend in review are different artifacts. This site collects the second kind, and here is how it is built.

**Type:** Blog post  
**Author:** PasteCode  
**Published:** 2026-06-08  
**Updated:** 2026-06-08  
**Tags:** Cursor, Claude Code, Codex, AGENTS.md, Review  
**URL:** https://pastecode.xyz/blog/prompts-belong-in-git

---

A year ago I asked an agent to review a pull request. It came back with a tidy list of twelve findings. Roughly half of them were real. The rest were opinions about formatting that nobody on the team had asked for, plus a warning about a null check that the type system already handled.

The prompt said "review this code." The output was technically a review. It just was not our review.

That incident is why this site exists. Not because agents write bad code, but because we keep sending them prompts with no decisions in them, and then act surprised when they invent decisions on our behalf.

## The prompt is the artifact

We already version our agent instructions. `AGENTS.md`, `.cursor/rules/`, `CLAUDE.md` are all just text files in the repo, reviewed like anything else. Nobody argues about whether they belong in version control.

Task prompts have not caught up. They still live in a chat box, get rewritten from memory every session, and disappear when the tab closes. Which is odd, because a task prompt is the same kind of object: a compressed description of the work, with the constraints that make it work here, in this repo.

This library is where I keep the ones that earned their place. Every entry is a prompt or a rule set that ran against a real project, failed in a specific way, and was edited until it stopped failing. The [rules section](/rules) is that material in its durable form; the [playbooks](/playbooks) wrap it around a whole change.

## The pricing page test

Take [the pricing page playbook](/playbooks/add-a-pricing-page), which is a good example because everyone has generated a pricing page.

Ask a capable agent for one and you will usually get a monthly/annual toggle with the discount hardcoded as `× 0.8`, three tiers with prices written straight into JSX, and a Subscribe button that either does nothing or links to `/checkout` — a route that does not exist yet. It compiles. It even looks right.

The prompt closes those gaps before the first token. One part of it:

```txt
Create `src/config/pricing.ts` exporting a `PLANS` array. Each plan has:
{ id, name, monthlyPriceUsd, stripePriceIdMonthly, stripePriceIdAnnually,
  features: string[], highlighted: boolean }
Read Stripe price IDs from env vars:
  NEXT_PUBLIC_STRIPE_PRICE_PRO_MONTHLY
  NEXT_PUBLIC_STRIPE_PRICE_PRO_ANNUALLY
```

Three things happened there. Prices moved out of JSX into one file that the feature matrix can also read. Stripe price IDs became environment variables, which is the difference between a demo and something you can bill with. And annual pricing became a second Price object instead of a multiplication, because a 20% discount quietly stops being 20% the moment someone edits a monthly price.

None of that is clever. All of it is the kind of thing you would say in review, which is exactly why it belongs in the prompt instead of in a comment six weeks later.

## What the prompt cannot fix

A good prompt does not make an agent trustworthy. It makes the agent's mistakes cheap to find.

So there are two smaller collections. [Failures](/failures) documents the patterns that keep showing up: invented npm packages, `useEffect` used as a data-fetching default, Prisma relations that reference a model that does not exist. [Checklists](/checklists) turn those into something you actually run before merging, like [the SQL review list](/checklists/review-ai-generated-sql).

The split matters. A prompt shapes what gets written. A checklist catches what got written anyway. You want both, and you want them short enough to read.

## How this site is put together

I built it as a static site because the content is text and the raw form is the point. Astro with MDX content collections, one schema for all six types, no database and no login. A URL is `/[type]/[slug]`. Adding an entry means dropping a file into a folder and committing it.

Three details are worth stealing.

Every page ships a `.md` and a `.json` twin. The `.md` version exists so you can `curl` it and paste it into a session without scraping HTML. The `.json` version exists so a script can build its own index. There is also an [`/llms.txt`](/llms.txt) that lists the entire library by section, which is the cheapest SEO work I have done all year: one file that answers "what is on this site" for anything that reads plain text.

Every page gets a real URL and real metadata. Generated OG images at build time, JSON-LD on resource pages, canonical URLs, no trailing-slash redirects, and a sitemap with `hreflang` alternates. This is not decoration. When the thing you publish is reference material, being findable matters more than being pretty.

Last, the frontmatter is validated, not trusted. `title`, `description`, `updated` and the rest go through a zod schema. A missing date fails the build instead of shipping an empty `<time>` element. Cheap now, annoying to retrofit.

## What this is not

It is not a course, and there is no newsletter to sign up for. It is not a replacement for the rules your project already has — if your `AGENTS.md` says something different from an entry here, yours wins, because yours knows about your production database.

It is also not complete. Six collections, sixty entries, and a few obvious gaps I keep hitting. The [context packs](/context) are the thinnest part.

## Start with one prompt

The loop that produced everything here takes about twenty minutes.

Take a prompt you have typed more than twice. Paste it into a file in your repo. Run it. When the output misses, do not rewrite the prompt in chat — open the file, add the constraint that was missing, and commit that. Next week the file is specific to your project in ways no general-purpose prompt can be, and the agent stops guessing about the things you already decided.

That file is the artifact. The diff is the review.