Create page with SEO and tests
new-pagecommandsetup L1★0
mitambuch/sn ↗What it does
Create new page with route, SEO head, and test file scaffold
Best for
Rapid page scaffold for marketing/landing page sites when composition rules (grid, spacing, title style) must be consistent across all pages.
Inputs
- · PascalCase page name (e.g., 'About', 'Pricing')
- · CLAUDE.md (if Composition Rules exist)
- · Existing pages for reuse detection
Outputs
- · Page component at src/pages/PageName.tsx
- · Route constant in src/constants/routes.ts
- · Lazy route entry in src/app/routes/
- · Test file at src/pages/__tests__/PageName.test.tsx
Requires
- · React
- · TanStack Router
- · Vitest/testing-library
- · TypeScript
Preconditions
- · React + TanStack Router project structure
- · CLAUDE.md present (or fallback to generic template)
- · src/components/layout/Container.tsx and SeoHead.tsx exist
Failure modes
- · Page name not PascalCase = route mismatch
- · Existing route not checked = collision with duplicate routes
- · Composition Rules exist but not followed = inconsistent spacing/layout
- · pnpm validate fails = missing SEO fields or import errors
Trust signals
- · Checks for existing pages before creating new ones (reuse-first approach)
- · Follows composition rules from CLAUDE.md if present
- · Includes test file and SEO metadata by default