# Prompts that work

> Prompts to paste into your coding agent, one per job — the skill each one triggers and what to check afterwards.

You are reading one page of the ZeroDirs documentation. ZeroDirs is an Astro + Cloudflare Workers starter for directory sites: every page is rendered to static HTML at build time, the site ships no client JavaScript outside `/search/`, and one file — `site.config.ts` — carries roughly 80% of the customisation.

Two things to hold on to before you act on anything below:

- `site.config.ts` is validated by a zod schema with ten cross-field rules. After any edit to it, run `pnpm check:config`; every problem is reported as `site.config.ts › <path>: <message>` and the whole file is checked at once.
- The repository ships its own `AGENTS.md` with eighteen hard rules, and a machine-checked test suite behind them. If you are working inside a ZeroDirs project, read that file first — it overrides anything general you infer from this page.

Source: https://zerodirs.com/docs/agents/prompts/

---

Paste one prompt per job into an agent that can read `.agents/skills/`, swapping the demo
names, paths and domain for yours. For a page's own job, paste `/docs/prompt/<page>.md`.

## The prompts

### Plan a directory

```text title="Prompt"
Plan a directory of self-hosted analytics tools. Propose the listing noun and the route base, then a categories block and a tags block for site.config.ts, and write seed/.out/candidates.tsv with real product names and home-page URLs only. Take every URL from a source you can cite, never build one from a name, and tell me how many rows you could not verify. Do not write any descriptions.
```

[`plan-directory`](https://zerodirs.com/docs/agents/recipes/plan-directory/), then
`node seed/check-links.mjs seed/.out/candidates.tsv --json seed/.out/links.json`.

### Fill it with listings

```text title="Prompt"
Fill this directory from seed/.out/candidates.tsv. Run the link check first and drop the rows that fail, write each listing only from the page you fetched, record extra.sourceUrl and extra.sourceCheckedAt on every one, lint with seed/check-listings.mjs, check the shape with --profile buyer, then load it into the local database with pnpm content:use and build. Report every row you dropped and why.
```

[`generate-listings`](https://zerodirs.com/docs/agents/recipes/generate-listings/) runs
`pnpm content:use <slug> --yes`, which seeds the local database from the dataset. Check
`[zerodirs-d1] D1 (local): N approved listings` in the build log.

### Import a spreadsheet

```text title="Prompt"
Import ~/Downloads/tools.csv into this directory. Dry-run first and show me the per-row verdicts and every warning before you write anything. "Website" is the url and "Keywords" are the tags; "Founded Year" should land in extra.founded. If a row has a category that is not in site.config.ts, stop and show me the rows and values instead of guessing.
```

[`import-listings`](https://zerodirs.com/docs/agents/recipes/import-listings/) runs
`pnpm listings:import <file> --dry-run`, then again with `--local`; unaliased columns need
`--map`. Check `upserted N listing(s)` and `budget:`.

### Add a category

```text title="Prompt"
Add an "Observability" category: slug observability, a one-line description, a lucide icon that fits, order 10. Seed it with at least one real listing so the page is not empty and does not go out noindex, give that listing tags other listings already carry, and verify with pnpm check and a full build.
```

[`add-category`](https://zerodirs.com/docs/agents/recipes/add-category/) seeds the listing with
`pnpm listings:import <file> --local`. Check `orphans (fewer than 2 inbound): 0`.

### Add a custom field

```text title="Prompt"
Add a "Founded" custom field to listings: key founded, type text, shown on cards. The demo listings already carry extra.founded, so do not touch the detail page unless the placement has to change. Build, then prove the value reached dist/client/tools/adobe-firefly/index.html.
```

[`add-listing-field`](https://zerodirs.com/docs/agents/recipes/add-listing-field/) — one entry in `listing.customFields`.

### Change the theme

```text title="Prompt"
Give the site a green brand: primary oklch(0.52 0.13 150), a lighter primary in dark mode, corner radius 0.25rem. Use theme.tokens if that is enough. If the OG images need the colour too, add a "forest" preset instead and regenerate public/og-default.png. Tell me which path you took and why.
```

[`new-theme`](https://zerodirs.com/docs/agents/recipes/new-theme/) takes `theme.tokens` and `theme.darkTokens`, or a
preset with `ogColors` and `pnpm og:default`.

### Add a pSEO template

```text title="Prompt"
Add a pSEO template that generates one "Best {category} {nouns} ({year})" page per category: id best-category, slug best-{category}-{nouns}, at least 5 listings per page, enabled. Register the pattern, add the copy to site.config.ts with one FAQ entry, add the unit test, then build and quote the pseo: generated line and every [zerodirs:pseo] warning.
```

[`new-pseo-template`](https://zerodirs.com/docs/agents/recipes/new-pseo-template/). Read
`pseo: generated N (dropped by minItems M, truncated K)`.

### Go live

```text title="Prompt"
Take this site live on acme-tools.com. Check site.url and pnpm check:config first, show me the pnpm cf:setup --dry-run plan, run it when I say so, then walk me through what it leaves to me one step at a time. Never read .env or paste a secret: when a value is needed, name the pnpm cf:secrets key and tell me where the value comes from.
```

[`go-live`](https://zerodirs.com/docs/agents/recipes/go-live/). Its last line says whom to sign in as; sign in at
`/login/`, then check `/admin/`.

### Switch email to Resend

```text title="Prompt"
Switch transactional email from Cloudflare Email Sending to Resend. The sending domain is acme-tools.com and it is already verified in Resend. Set the provider and emailFrom, keep my own notifications on the cloudflare-verified path, tell me which secret to add with pnpm cf:secrets, and show me how to confirm that a receipt leaves the outbox.
```

[`configure-email`](https://zerodirs.com/docs/agents/recipes/configure-email/) sets `providers.emailFrom`
(`Name <addr@domain>`); run `pnpm cf:secrets RESEND_API_KEY` yourself. If the receipt
never arrives, `email_outbox` carries the error.

### Google sign-in

```text title="Prompt"
Turn on submitter accounts with "Continue with Google" for https://acme-tools.com. Switch features.accounts on, tell me exactly what to create in the Google Cloud console including the redirect URI, and which two keys to store with pnpm cf:secrets. Then tell me how to verify the emailed-link path and the Google path separately.
```

[`configure-accounts`](https://zerodirs.com/docs/agents/recipes/configure-accounts/): `features.accounts: true`,
redirect URI `https://acme-tools.com/auth/google/callback/` (trailing slash included),
`pnpm cf:secrets GOOGLE_CLIENT_ID GOOGLE_CLIENT_SECRET`, `pnpm db:migrate:remote` for the
migration in production.

### Change the detail page

![One listing page on the demo: the facts card the prompt moves, beside the description](../../../assets/screenshots/listing-detail.png)

```text title="Prompt"
On the listing detail page, move the custom fields out of the facts card into a row directly under the tagline and show the pricing type there too. Keep the page free of client JavaScript, build every URL through src/lib/paths.ts, then run pnpm check, pnpm test and pnpm build and quote the zero-js line.
```

No skill; `AGENTS.md` names `src/components/listing/Detail.astro`. Check
`zero-js: N content pages, 0 islands, 0 external scripts — ok`.

### Fix a failing build

```text title="Prompt"
pnpm build fails; the full output is below. Find the cause in the log, fix it with the smallest change that keeps the rules in AGENTS.md, and do not switch a check off to get past it. Rerun pnpm check, pnpm test and pnpm build, and quote the seo-report, budget and zero-js lines from the passing build.

<paste the output here>
```

No skill; the log names the cause:
`seo-report: N orphan listing(s) with fewer than 2 inbound links`, or `budget:` above 90% of
the plan limit.

## Worth knowing

- Have it run `pnpm check`, `pnpm test` and `pnpm build` before it reports — some rules only
  fail in a full build.
- Silently lost: an object or array custom field, markup outside `@source` in
  `src/styles/global.css`, dark mode when tokens are light-only.
- Loud: an unknown category aborts an import with nothing written, an unknown tag is dropped
  with a warning, a `client:load` on a content page stops the build.
- Never switch `seo.strictLinks` off; it only demotes the orphan failure to a warning.

## Related

- [Working with an agent](https://zerodirs.com/docs/agents/overview/) — How the starter is shaped for an agent.
- [Editor setup](https://zerodirs.com/docs/agents/editor-setup/) — What Claude Code, Codex and other editors read.
- [Recipes](https://zerodirs.com/docs/agents/recipes/) — The skills these prompts trigger.
- [Troubleshooting](https://zerodirs.com/docs/run/troubleshooting/) — Every message the build and the site can stop on, with its fix.
