add-page-route

Add pages and routes following repository navigation, data-loading, and auth patterns.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/agent-skills --skill add-page-route-vesviet
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-page-route
Source: https://github.com/vesviet/agent-skills/tree/main/core/skills/frontend/add-page-route
Command: npx skills add https://github.com/vesviet/agent-skills --skill add-page-route-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new page or route to a frontend codebase requires matching the repo's routing, layout, data-loading, and auth conventions, and skipping any of these leads to broken navigation, missing auth guards, or inconsistent page states. ## Core Features & Use Cases - Route Wiring Guidance: Walks through inspecting nearby routes, defining route responsibility, and wiring route registration, layouts, and navigation entries. - Framework-Specific Rules: Enforces TanStack Router v2 / React Router v7 practices such as Zod-validated search params, loader-based data fetching, and type-safe navigation. - State & Safety Checklist: Requires explicit loading, empty, error, and unauthorized states plus SEO/SSR verification for public-facing routes. - Use Case: When adding a new settings page to a React app, use this Skill to mirror an existing route's structure, add auth gating, hoist data loading into a loader, and cover the route with tests. ## Quick Start Use the add-page-route skill to add a new authenticated settings page with proper data loading, layout wiring, and tests.

Frequently Asked Questions about add-page-route

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new page or route to a React app?▼

Start by inspecting a similar existing route to learn its file placement, registration, layout nesting, and data-loading pattern. Then define the route's responsibility, wire the route definition and navigation links, implement page-level orchestration, and add tests covering render, guards, and failure states.

How to validate URL search params in TanStack Router or React Router?▼

Validate all URL search parameters with Zod schemas using .catch() fallbacks inside validateSearch. Raw URL parameters are user-controlled input and must never be used without validation.

Should I fetch page data in useEffect or a route loader?▼

Hoist route data loading into loader functions rather than triggering primary fetches in useEffect after mount. Effect-based fetching causes layout shift waterfalls and delays rendering.

What checks are needed before shipping a new public-facing route?▼

Verify SSR/SSG behavior and meta tags (title, description, OG), confirm auth gating is present for non-public routes, handle loading/empty/error/unauthorized states, and test direct URL access plus back/forward navigation.

Why is string-concatenated navigation like navigate('/users/' + id) discouraged?▼

Untyped URL string concatenation bypasses route type checking and breaks silently when routes change. Use type-safe navigation primitives such as <Link to="..." /> or navigate({ to: '...' }) instead.