Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Frontend Routing

  • 401 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

frontend-routing is an agent skill that sets up client-side or hybrid routing, nested layouts, guards, and deep links for developers scaffolding or extending React, Vue, or similar SPAs.

About

frontend-routing is an agent skill in aj-geddes/useful-ai-prompts for establishing navigation structure in single-page applications. The skill covers client-side or hybrid routing, nested layouts, route guards, and deep link handling when scaffolding or extending React, Vue, or comparable frontend stacks. Developers reach for frontend-routing when a new SPA needs consistent URL structure, protected routes, or layout composition before feature pages multiply. The focus is routing architecture and guard patterns rather than backend API design. Use it during frontend build work when navigation behavior must be planned alongside page components.

  • Route configuration and nested layouts
  • Protected routes and auth guards
  • Lazy loading and code-splitting by route
  • Deep linking and URL parameter handling
  • 404, redirects, and navigation edge cases

Frontend Routing by the numbers

  • 401 all-time installs (skills.sh)
  • Ranked #664 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill frontend-routing

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs401
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you set up nested routes and guards in SPAs?

Set up client-side or hybrid routing, nested layouts, guards, and deep links when scaffolding or extending a React, Vue, or similar SPA.

Who is it for?

Frontend developers scaffolding or extending React, Vue, or similar SPAs that need structured routing and protected routes.

Skip if: Developers building server-rendered-only sites without client-side routing or backend API idempotency concerns.

When should I use this skill?

A SPA needs client-side or hybrid routing, nested layouts, route guards, or deep-link support during scaffold or extension work.

What you get

Configured client-side routes, nested layouts, guard rules, and working deep-link navigation.

  • SPA route configuration
  • Nested layout structure
  • Route guard rules

Files

SKILL.mdMarkdownGitHub ↗

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'));

// Protected route wrapper
const ProtectedRoute: React.FC<{ children: React.ReactNode }> = ({ children }) => {
  const { isAuthenticated } = useAuth();

  if (!isAuthenticated) {
    return <Navigate to="/login" replace />;
  }

  return <>{children}</>;
};

export const App: React.FC = () => {
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
React Router v6React Router v6
Vue Router 4Vue Router 4
Angular RoutingAngular Routing
Query Parameter HandlingQuery Parameter Handling
Route Transition EffectsRoute Transition Effects

Best Practices

✅ DO

  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying

❌ DON'T

  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

Related skills

FAQ

Which frontend frameworks does frontend-routing target?

frontend-routing targets React, Vue, or similar SPA frameworks when setting up client-side or hybrid routing. The skill covers nested layouts, guards, and deep links during scaffold or extension work.

What routing concerns does frontend-routing address?

frontend-routing addresses client-side or hybrid routing configuration, nested layout composition, route guards for protected pages, and deep-link behavior so URLs remain shareable in single-page applications.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.