This handles client-side routing across React Router v6, Vue Router 4, and Angular Router with working examples for protected routes, lazy loading, and query parameters. You'll want this when building SPAs that need URL-based navigation, route guards for auth, or code splitting. The quick start gives you a protected route wrapper right away, and the reference guides break down framework-specific implementations. It covers the practical stuff like transition effects and query parameter handling, though the best practices section is pretty generic. Solid if you're setting up routing from scratch or migrating between major versions.

skills.sh installs
454
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill frontend-routing --agent claude-code

Installs into .claude/skills of the current project.

Files

Frontend Routing

Table of Contents

Overview

Implement client-side routing with navigation, lazy loading, protected routes, and state management for multi-page single-page applications.

When to Use

  • Multi-page navigation
  • URL-based state management
  • Protected/guarded routes
  • Lazy loading of components
  • Query parameter handling

Quick Start

Minimal working example:

// App.tsx
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import { Layout } from './components/Layout';
import { Home } from './pages/Home';
import { NotFound } from './pages/NotFound';
import { useAuth } from './hooks/useAuth';
import React from 'react';

// Lazy loaded components
const Dashboard = React.lazy(() => import('./pages/Dashboard'));
const UserProfile = React.lazy(() => import('./pages/UserProfile'));
const Settings = React.lazy(() => import('./pages/Settings'));

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Frontend Development, AI & Agent Building
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1jwynia avatarpwa-developmentjwynia/agent-skillsImplement Progressive Web App features for React and Svelte projects. This skill should be used when the user asks to 'make a PWA', 'add offline support', 'crea447skills.sh installs
2inertia-rails avatarshadcn-inertiainertia-rails/skillsshadcn/ui component integration for Inertia Rails React (NOT Next.js): forms, dialogs, tables, toasts, dark mode, command palette, and more. Use when building U436skills.sh installs
3deveshpunjabi avatarmodern-frontend-designdeveshpunjabi/modern-frontend-skillHow to design and build modern, premium-quality frontend interfaces that look like high-end SaaS products, modern AI tools, and award-winning design websites — 432skills.sh installs
4bobmatnyc avatarshadcn-uibobmatnyc/claude-mpm-skillsshadcn/ui component library for React with Tailwind CSS - copy-paste accessible components with full code ownership421skills.sh installs
5tristanmanchester avataranimating-react-native-expotristanmanchester/agent-skillsBuilds performant animations and gesture-driven interactions in React Native (Expo) apps using React Native Reanimated v4 and React Native Gesture Handler (Gest421skills.sh installs
6denoland avatardeno-frontenddenoland/skillsUse when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Den419skills.sh installs