Parallel Routes Generator

Implement parallel routes-based modals in Next.js layouts.

Updated Oct 31, 2025
One-click install
npx skills add https://github.com/RomualdP/hoki --skill parallel-routes-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Parallel Routes Generator
Source: https://github.com/RomualdP/hoki/tree/main/.claude/skills/parallel-routes
Command: npx skills add https://github.com/RomualdP/hoki --skill parallel-routes-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires next, react.

What problem does it solve?

This Skill leverages Next.js Parallel Routes to implement modals and dialogs without causing disruptive layout shifts, providing a superior user experience compared to traditional modal implementations.

Core Features & Use Cases

  • Non-Destructive Modals: Opens modals as a separate route segment, preserving the underlying page's state and layout.
  • Intercepted Routes: Uses the (..) convention to intercept a route and render it within a modal slot, while still allowing direct navigation to the full page.
  • Layout Integration: Guides on configuring the root layout to accept and render the modal slot.
  • Use Case: Implement an "Upgrade Plan" modal that appears over the current dashboard. Users can interact with the modal, close it to return to the dashboard, or share the modal's URL, which will load the full upgrade page.

Quick Start

To create a modal using Parallel Routes, define an @modal slot in your layout, create a default.tsx file returning null inside @modal, and then create an intercepted route like @modal/(..)my-modal/page.tsx for your modal content.

Frequently Asked Questions about Parallel Routes Generator

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

FAQPage Schema
How do I prevent layout shifts when opening modals in Next.js?

Layout shifts occur when modals are rendered in the document flow. Next.js Parallel Routes solve this by rendering modals in a separate slot (@modal) that doesn't affect the underlying page layout, preserving state and preventing visual disruption.

What's the difference between parallel routes and intercepted routes for modals?

Parallel routes create independent slots in your layout that render simultaneously. Intercepted routes use the (..) syntax to intercept a navigation and render content in a modal slot instead of navigating away, while still allowing direct access to the full page via URL.

How do I set up a modal slot in a Next.js layout?

Define an @modal folder in your app directory, create a default.tsx file returning null inside it, then create an intercepted route like @modal/(..)page-name/page.tsx. Update your root layout to accept and render the modal prop alongside your page content.

Can I share a modal URL that loads the full page instead?

Yes. With intercepted routes, sharing the modal's URL loads the full page directly because the interception only applies within the app context. Direct navigation bypasses the interception and renders the complete page layout.

Do I need React knowledge to implement parallel routes modals?

Parallel Routes modals require familiarity with Next.js app directory conventions and React components. You need to understand layout composition, slots, and how to manage modal state and close behavior within a React component.