monarch-screen-setup

Organize Defold screens and popups using Monarch with collectionproxy and collectionfactory.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/zarkua/Defolancer --skill monarch-screen-setup-zarkua
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: monarch-screen-setup
Source: https://github.com/zarkua/Defolancer/tree/main/.agents/skills/monarch-screen-setup
Command: npx skills add https://github.com/zarkua/Defolancer --skill monarch-screen-setup-zarkua

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Orchestrating screens and popups in Defold projects can be error-prone without a standardized approach. This skill provides a clear blueprint for using the Monarch library to manage screens via collectionproxy and popups via collectionfactory, ensuring consistent navigation, lifecycle handling, and scalable UI architecture.

Core Features & Use Cases

  • Establishes a single active screen at a time using collectionproxy with proper init flow.
  • Enables popups stacking via collectionfactory, including popup-on-popup scenarios, with safe closure using monarch.back().
  • Provides guardrails to verify Monarch usage before applying the setup, preventing misconfiguration and runtime errors.
  • Use Case: Create a main menu screen and a settings popup that can appear on top of it with proper transitions and registration.

Quick Start

Verify your project uses Monarch, then implement screens and popups with collectionproxy and collectionfactory as described.

Frequently Asked Questions about monarch-screen-setup

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

FAQPage Schema
How do I manage Defold screens and popups using Monarch?ā–¼

To manage Defold screens and popups using Monarch, you establish a single active screen using collectionproxy and stack popups via collectionfactory. This standardizes UI navigation and ensures safe closure using monarch.back() before runtime.

What is the best way to handle popup-on-popup scenarios in Defold?ā–¼

The best way to handle popup-on-popup scenarios in Defold is using Monarch with collectionfactory. This enables popup stacking and provides safe closure using monarch.back(), ensuring scalable UI architecture without runtime errors.

Do I need to declare Monarch in game.project to set up screen routing?ā–¼

Yes, you must declare Monarch in game.project or have it present locally to set up screen routing. Verifying Monarch usage before applying the setup prevents misconfiguration and runtime errors during UI navigation.

How does collectionproxy work with Monarch for UI navigation?ā–¼

Collectionproxy works with Monarch by establishing a single active screen at a time with a proper init flow. This mechanism standardizes UI navigation in Defold projects, ensuring only one screen is active during runtime.

Why does my Monarch screen setup cause runtime errors in Defold?ā–¼

Monarch screen setup causes runtime errors in Defold if screens and popups are not registered before runtime. Applying guardrails to verify Monarch usage and proper collectionproxy or collectionfactory configuration prevents these misconfiguration issues.

Can I use collectionfactory for popups over a collectionproxy screen in Defold?ā–¼

Yes, you can use collectionfactory for popups over a collectionproxy screen in Defold. Monarch orchestrates this by keeping the main screen active via collectionproxy while stacking collectionfactory popups on top with safe transitions.