add-page
Skill15 starsChanged 5 months agoMITView on GitHub
Create new pages with correct routing and MainLayout usage. Use proactively when creating new pages.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- getvibekits/vibe-coding-rulestheir own version, first seen Oct 25, 2026
- TiagoGranelli/slopprooftheir own version, first seen Oct 13, 2026
- astashov/liftosaurtheir own version, first seen Oct 8, 2026
- AnitChaudhry/10x-development-teamtheir own version, first seen Mar 22, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- astashov/liftosaur★ 775same name
- TiagoGranelli/slopproof★ 2same name
- AnitChaudhry/10x-development-team★ 0same name
- getvibekits/vibe-coding-rules★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- public/llms-full.txtllms.txt
- public/llms.txtllms.txt
- add-componentSkill
- add-diagram-componentSkill
- add-languageSkill
- ai-diff-reviewerSkill
- dailybotSkill
- deepworkplanSkill
- doc-editSkill
- fix-lintSkill
- git-commit-pushSkill
- pr-review-liteSkill
- quick-fixSkill
- refactor-safeSkill
- responsive-lighthouse-auditSkill
- security-checkSkill
- translate-syncSkill
- type-fixSkill
- update-stylesSkill
- write-testsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 5 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Create new pages in the Astro application with correct file-based routing, MainLayout usage, and SEO properties.
- Distinctive: line 24
Does NOT create components (use add-component skill)
- Distinctive: line 25
Does NOT create API endpoints (separate concern)
- Distinctive: line 26
Does NOT modify existing pages
- Very specific: line 66
MANDATORY: Every page must use the Page wrapper pattern.
- Very specific: line 131
If the page introduces new UI text, add entries to every locale file under src/lib/translations/ (en.ts, es.ts, pt.ts, zh.ts, …) and run …
- Very specific: line 137
Add 'foo' to KNOWN_BASE_PATHS — this single entry covers /foo, /es/foo, /pt/foo, /zh/foo, etc.
- Very specific: line 152
Add any new translation keys to src/lib/translations/types.ts AND every locale file under src/lib/translations/ (en.ts, es.ts, pt.ts, …
- Very specific: line 157
Create Markdown source files for the new page's .md endpoint (Markdown for Agents):
- Very specific: line 159
Create src/content/pages/en/{name}.md with frontmatter (title, description, lastUpdated) and full page content as clean Markdown
- Very specific: line 160
Create src/content/pages/<lang>/{name}.md for every active non-default language (es, pt, zh, ja, de, fr, ko, ru, it, tr, id, vi, hi, pl, …
- Very specific: line 166
Default-language pages use root-relative links (/about).
- Very specific: line 223
MUST create a shared page component and wrappers for all active languages (see src/lib/i18n.ts).
- Very specific: line 224
If new UI strings are needed, add them to translations.ts for all active languages.
- Distinctive: line 228
Stop and escalate: if:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Add Page
Objective
Create new pages in the Astro application with correct file-based routing, MainLayout usage, and SEO properties. Creates pages in ALL active language routes to maintain multilingual parity. Uses shared page components (src/components/pages/) with thin per-language wrappers.
Non-Goals
- Does NOT create components (use add-component skill)
- Does NOT create API endpoints (separate concern)
- Does NOT modify existing pages
Tier Classification
Tier: 1 - Light/Cheap
Reasoning: Creating a page follows a clear template, has defined patterns, and is low risk.
Inputs
Required Parameters
$NAME: Page name/route (e.g.,projects,about/team)$TITLE: Page title (for SEO)$DESCRIPTION: Page description (for SEO)
Optional Parameters
$LANG: Language code (default:'en')$DYNAMIC: If true, creates dynamic route withgetStaticPaths
Routing Patterns
| File | Route |
pages/about.astro | /about (default-language, served at root) |
pages/projects/index.astro | /projects |
pages/team/[member].astro | /team/{member} (dynamic) |
pages/[lang]/about.astro | /es/about, /pt/about, /zh/about, … (one file covers ALL non-default languages) |
Steps
Step 1: Determine Route Structure
- Simple page →
pages/{name}.astro(default-lang) +pages/[lang]/{name}.astro(all non-default) - Section index →
pages/{name}/index.astro+pages/[lang]/{name}/index.astro - Dynamic (per-language) →
pages/{name}/[param].astro+pages/[lang]/{name}/[param].astro
Step 2: Create Shared Page Component (MANDATORY)
MANDATORY: Every page must use the Page wrapper pattern. Create the shared component at src/components/pages/{Name}Page.astro — this component handles MainLayout, translations, and all content internally.
Static Page Component Template:
---
// src/components/pages/{Name}Page.astro
import MainLayout from '@/layouts/MainLayout.astro';
import { getTranslations } from '@/lib/translations';
import { getUrlPrefix } from '@/lib/i18n';
import type { Language } from '@/lib/i18n';
interface Props {
lang: Language;
}
const { lang } = Astro.props;
const t = getTranslations(lang);
const prefix = getUrlPrefix(lang);
---
<MainLayout lang={lang} title={t.{name}Page.title} description={t.{name}Page.description}>
<main class="main-container py-24">
<h1 class="text-4xl font-bold mb-8 text-gray-900 dark:text-white">
{t.{name}Page.title}
</h1>
<div class="prose dark:prose-invert max-w-none">
<!-- Page content using t.* for text and prefix for URLs -->
</div>
</main>
</MainLayout>Step 3: Create the Two Page Wrappers (MANDATORY)
Adding a page is exactly two wrappers regardless of how many languages ship: one default-language wrapper + one dynamic [lang] wrapper that covers every other active language.
Default-language wrapper (src/pages/{name}.astro — 3 lines):
---
import {Name}Page from '@/components/pages/{Name}Page.astro';
---
<{Name}Page lang="en" />Dynamic [lang] wrapper (src/pages/[lang]/{name}.astro — covers all non-default languages):
---
import {Name}Page from '@/components/pages/{Name}Page.astro';
import { getActiveNonDefaultLanguages, type Language } from '@/lib/i18n';
export function getStaticPaths() {
return getActiveNonDefaultLanguages().map((lang) => ({ params: { lang } }));
}
const { lang } = Astro.params as { lang: Language };
---
<{Name}Page lang={lang} />Key rules:
- Wrappers never import
MainLayout— the*Page.astrocomponent handles it internally - The default-language wrapper passes
lang="en"as a string literal; the dynamic wrapper deriveslangfromAstro.params - One
*Page.astrocomponent + one root wrapper + one[lang]wrapper covers every active language. New languages need ZERO edits insrc/pages/— they auto-light-up viagetActiveNonDefaultLanguages() - If the page introduces new UI text, add entries to every locale file under
src/lib/translations/(en.ts, es.ts, pt.ts, zh.ts, …) and runpnpm run i18n:check
Step 3b: Register the Route in the Middleware Allowlist (MANDATORY for top-level routes)
src/middleware.ts uses a derived allowlist. A new single-segment route returns a (rewrite) 404 until you register it. Only ONE edit is needed:
- Add
'foo'toKNOWN_BASE_PATHS— this single entry covers/foo,/es/foo,/pt/foo,/zh/foo, etc. (every active language) at once.
Multi-segment paths (/foo/bar) and paths containing . bypass the rule, so only single-segment
top-level routes need this. Symptom if forgotten: dev log shows [404] (rewrite) /foo. See
CLAUDE.md "Middleware Allowlist".
Step 3c: Stay in the Editorial Design System
New pages must fit "The Broadsheet" editorial system:
.main-containerpage width; serif.font-displayheadings; paper/ink tokens (bg-paper text-ink,--color-paper,--color-ink,--color-muted,--color-line) and the oxblood--color-secondaryaccent — no indigo, multi-color, glow, orprose-slate.- Reuse
src/components/editorial/primitives by name:Kicker,Rule,Lead,Figure,Reference. - For data/process diagrams, use the
add-diagram-componentskill — do not hand-roll SVG. - Add any new translation keys to
src/lib/translations/types.tsAND every locale file undersrc/lib/translations/(en.ts,es.ts,pt.ts,zh.ts, …). Runpnpm run i18n:check. - See the
update-stylesskill for the full token / primitive catalog (paper, ink, muted, line, secondary; serif / sans / mono families; editorial primitives).
Step 4: Create Agent-Friendly Markdown (MANDATORY)
Create Markdown source files for the new page's .md endpoint (Markdown for Agents):
- Create
src/content/pages/en/{name}.mdwith frontmatter (title,description,lastUpdated) and full page content as clean Markdown - Create
src/content/pages/<lang>/{name}.mdfor every active non-default language (es,pt,zh,ja,de,fr,ko,ru,it,tr,id,vi,hi,pl,uk,th) with translated frontmatter and content (correct diacritics/scripts/punctuation for the language)
Content requirements:
- Include ALL semantic sections from the
*Page.astrocomponent (same information, not a summary) - Include internal links to other site pages (for agent navigation/discovery)
- Strip presentation chrome (nav, footer, scripts) but keep all text, headings, lists, and links
- Default-language pages use root-relative links (
/about); non-default pages prefix with their language code (/es/about,/pt/about,/zh/about, …)
These files are automatically served as /{name}.md and /<lang>/{name}.md endpoints — no endpoint code changes needed. Agents can also request them via Accept: text/markdown header. Run pnpm run md:check to verify endpoint parity across every active language.
Step 5: Validate
pnpm run astro:check
pnpm run biome:check
pnpm run buildOutput Format
Success Output
## ✅ Pages Created (Multilingual)
### Pages
- English: `src/pages/{path}.astro` -> URL: `/{route}`
- Spanish: `src/pages/es/{path}.astro` -> URL: `/es/{route}`
- Type: {Static|Dynamic}
### SEO
- Title: {title} / {title_es}
- Description: {description} / {description_es}
### Layout
- Uses MainLayout ✅
- main-container ✅
### Validation
- Astro check: ✅
- Build: ✅
### Commit Message
feat: add {name} page (en + es)Guardrails
Required Elements
- Shared
*Page.astrocomponent handlesMainLayoutinternally - Page wrappers are 3-line files (import + render with
langliteral) - Has
main-containerwrapper - Has semantic heading (
<h1>) - Dark mode support
Scope Limits
- Maximum files: 4 (1 shared component + N language wrappers)
- Maximum LOC: 200
Multilingual Enforcement
- MUST create a shared page component and wrappers for all active languages (see
src/lib/i18n.ts). - If new UI strings are needed, add them to
translations.tsfor all active languages.
Stop Conditions
Stop and escalate if:
- Needs new layout component
- Complex data fetching required
- Multiple dynamic segments
- Translation quality is uncertain for page content
Definition of Done
- Shared page component created in
src/components/pages/ - Thin wrapper created for each active language (see
src/lib/i18n.ts) - All wrappers use correct
langvalue - Shared component uses
MainLayoutwithlangprop andgetUrlPrefix(lang)for URLs - SEO props provided for all active languages
- New UI strings added to
translations.tsfor all active languages (if applicable) pnpm run astro:checkpassespnpm run buildpasses
Examples
Example 1: Static Page
Input:
$NAME: projects
$TITLE: My Projects
$DESCRIPTION: A showcase of my development projectsCreates:
src/pages/projects.astro->/projectssrc/pages/es/projects.astro->/es/projects
Example 2: Page with Translations
Input:
$NAME: about
$TITLE: About Me
$DESCRIPTION: Information about meCreates:
src/pages/about.astro(English,lang='en')src/pages/es/about.astro(Spanish,lang='es')
Example 3: Dynamic Page
Input:
$NAME: projects/[slug]
$TITLE: (dynamic)
$DESCRIPTION: (dynamic)
$DYNAMIC: trueCreates: src/pages/projects/[slug].astro
Route: /projects/{slug}
Related
- add-component - Create components
- translate-sync - Synchronize translations
- docs/ARCHITECTURE.md - Routing details
- src/pages/README.md - Page patterns
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.

