Add listing field
.agents/skills/add-listing-field/SKILL.md — 119 lines of instruction that ship inside the starter. This page is generated from it, so it says what the skill does without republishing it.
When an agent picks this up
Section titled “When an agent picks this up”The skill description, verbatim — this is the text an agent matches your request against:
Add a custom per-listing field to a ZeroDirs directory site via listing.customFields in site.config.ts, put the value in a listing’s extra frontmatter, and surface it on the detail page. Covers the scalars-only rendering trap that silently drops arrays and objects. Use when asked to add a field like “pricing from”, “founded”, “platforms” or “docs URL” to listings.
What it walks through
Section titled “What it walks through”- The trap: values must be scalars
- Steps
- Declare the field
- Put the value in frontmatter
- The detail page needs no edit
showOnCardis a card-level flag- Importing the field
- Verify
- If you need a real database column
Commands it runs
Section titled “Commands it runs”pnpm listings:importpnpm check # cross rule 9: key shape, duplicates, built-in shadowingpnpm buildpnpm db:generateFiles it touches
Section titled “Files it touches”src/content/schema.ts · site.config.ts · src/components/listing/Detail.astro · src/lib/listing.ts · src/components/listing/Card.astro · src/config/schema.ts · scripts/import.ts · src/db/schema.ts · src/loaders/normalize.ts
Using it
Section titled “Using it”Skills load themselves — you describe the outcome, not the skill. “Add a Compliance category with an icon and seed it” is enough for an agent that can see .agents/skills/; Claude Code reads .claude/skills/, which pnpm skills:sync mirrors from .agents/ on every install. See Working with an agent.