global-modal-scaffold

Register, open, and orchestrate global modal extensions via a type-safe registry.

2|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/Adonis0123/adonis-skills --skill global-modal-scaffold
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: global-modal-scaffold
Source: https://github.com/Adonis0123/adonis-skills/tree/main/skills/global-modal-scaffold
Command: npx skills add https://github.com/Adonis0123/adonis-skills --skill global-modal-scaffold

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Global modal systems are often ad-hoc and hard to scale across apps. This skill provides a plug-in based architecture that enables registering, opening, and orchestrating global modals through a centralized extension registry, with lifecycle hooks and lazy loading.

Core Features & Use Cases

  • Architecture with Store, Extension, Orchestrator, and Modal layers to manage multiple modals
  • Two workflows: infrastructure scaffolding and extension-based modal addition
  • Supports basic, enriched, and with-callbacks extension patterns; supports onOpen/onClose lifecycles
  • Type-safe extension registry with automatic key derivation and a framework-agnostic template system

Quick Start

Initialize infrastructure using templates, then add modal extensions and mount the GlobalModals orchestrator in your app layout.

Frequently Asked Questions about global-modal-scaffold

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

FAQPage Schema
How do I manage global modals across multiple apps without ad-hoc code?

Global modal management uses a plug-in architecture with a centralized extension registry to register, open, and orchestrate modals. This enforces type safety and lazy loading, replacing ad-hoc implementations with scalable infrastructure.

What is the best way to structure a global modal orchestrator with Zustand?

A global modal orchestrator built with Zustand separates Store, Extension, Orchestrator, and Modal layers. This structure manages multiple modals through lifecycle hooks, enabling type-safe registration and lazy-loaded dialog rendering.

How do I add modal extensions with onOpen and onClose lifecycle callbacks?

Modal extensions support basic, enriched, and with-callbacks patterns that include onOpen and onClose lifecycle hooks. You add these extensions to the registry, allowing the orchestrator to trigger callbacks during modal visibility changes.

Can I use this global modal scaffold with any frontend framework?

Yes, the global modal scaffold provides framework-agnostic templates. You initialize the infrastructure and mount the GlobalModals orchestrator in your app layout, regardless of the specific UI framework you are using.

How does lazy loading work for registered modal extensions?

Lazy loading defers modal rendering until triggered by the orchestrator. The type-safe extension registry automatically derives keys for each modal, ensuring only the required dialog components load on demand.

Why does my scalable modal system need an extension registry?

An extension registry provides a centralized, type-safe system for registering modal dialogs. It solves scaling issues by orchestrating multiple plug-in extensions automatically, preventing key collisions and unmanaged lifecycle states.