add-page-section
Skill0 starsChanged 3 days agoMITView on GitHub
Add a new public page or portfolio section to the TanStack Start site, with server-side data loading, SEO head tags, navigation link and the site's editorial styling. Use when asked to add a route, page or section such as "talks", "writing" or "testimonials".
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- database-changeSkill
- portfolio-security-checkSkill
- verify-changesSkill
- add-page-sectionSkill
- database-changeSkill
- portfolio-security-checkSkill
- verify-changesSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use src/routes/skills.tsx as the reference implementation: it is short and shows every part of the pattern.
- Very specific: line 13
Data: If the section shows new kinds of content, first follow the database-change skill to add the table, server fn and queryOptions.
- Very specific: line 18
Route file: Create src/routes/<name>.tsx.
- Very specific: line 57
Add the page to public/sitemap.xml with a <url><loc>https://torsti.dev/things</loc></url> entry.
- Very specific: line 59
Navigation: Add an entry to the nav array in src/components/site/SiteHeader.tsx, for example { to: "/things", label: "Things", n: "05" }.
- Very specific: line 64
If the page renders external links, filter them with isSafeUrl() from @/lib/utils and use target="_blank" rel="noreferrer".
- Distinctive: line 67
Styling: Follow the editorial style:
- Distinctive: line 73
Check the page at about 375px width and on desktop.
- Very specific: line 75
Admin (optional): If the content is editable, add src/routes/admin.<name>.tsx and a tab in the tabs array in src/routes/admin.tsx.
- Very specific: line 80
Tests: Add a case to src/test/app-routing.test.tsx checking that the new path matches a route (copy the / case).
- Very specific: line 83
Verify: Run the verify-changes skill.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a page or section
Use src/routes/skills.tsx as the reference implementation: it is short and shows
every part of the pattern.
Steps
- Data. If the section shows new kinds of content, first follow the
database-changeskill to add the table, server fn andqueryOptions. If the page is static, skip the loader's data query and keep onlyloadSiteIdentity(). Route file. Create
src/routes/<name>.tsx. Bare$marks a dynamic segment, androuteTree.gen.tsregenerates on its own:import { createFileRoute } from "@tanstack/react-router"; import { useSuspenseQuery } from "@tanstack/react-query"; import { loadSiteIdentity, pageTitle, siteName, thingsQuery } from "@/data"; import { Page, SectionHeader } from "@/components/site/primitives"; import { seo } from "@/lib/seo"; export const Route = createFileRoute("/things")({ // loader before head, so loaderData is typed in head() loader: async ({ context }) => { await context.queryClient.ensureQueryData(thingsQuery); return loadSiteIdentity(context.queryClient); }, // seo() adds description, canonical, Open Graph and Twitter tags. // Write a specific 120–160 character description that names the person. head: ({ loaderData }) => seo({ title: pageTitle("Things", loaderData), description: `Things by ${siteName(loaderData)}: one specific sentence about this page.`, path: "/things", siteName: siteName(loaderData), }), component: ThingsPage, }); function ThingsPage() { const { data } = useSuspenseQuery(thingsQuery); return ( <Page> <SectionHeader index="05" title="Things" intro="Short intro line." /> {/* content */} </Page> ); }Add the page to
public/sitemap.xmlwith a<url><loc>https://torsti.dev/things</loc></url>entry.Navigation. Add an entry to the nav array in
src/components/site/SiteHeader.tsx, for example{ to: "/things", label: "Things", n: "05" }. Keep itsnnumber the same as theindexin the page'sSectionHeader, and keep the numbers in order.If the page renders external links, filter them with
isSafeUrl()from@/lib/utilsand usetarget="_blank" rel="noreferrer".Styling. Follow the editorial style:
- 1px
border-borderdividers, no heavy cards, shadows or gradients font-mono text-xsfor indices, dates and tagstext-primaryonly for accentsrevealclass with a staggeredanimationDelayfor list items
Check the page at about 375px width and on desktop.
- 1px
- Admin (optional). If the content is editable, add
src/routes/admin.<name>.tsxand a tab in thetabsarray insrc/routes/admin.tsx. ReuseuseAdminCrud,TagInputandConfirmDeletefromsrc/components/admin/. - Tests. Add a case to
src/test/app-routing.test.tsxchecking that the new path matches a route (copy the/case). - Verify. Run the
verify-changesskill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

