forge-auto-widget-layout

Automate UI layout in ForgeUiContext apps with a stack-based cursor model.

36|6|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Nebulavenus/forge-gpu --skill forge-auto-widget-layout-nebulavenus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: forge-auto-widget-layout
Source: https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-auto-widget-layout
Command: npx skills add https://github.com/Nebulavenus/forge-gpu --skill forge-auto-widget-layout-nebulavenus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add automatic widget layout to ForgeUiContext applications, replacing manual rect calculations with a stack-based cursor model that supports vertical and horizontal directions, padding, spacing, and nesting.

Core Features & Use Cases

  • Automatic layout push/pop of layout regions via forge_ui_ctx_layout_push and forge_ui_ctx_layout_pop
  • Cursor-driven placement using forge_ui_ctx_layout_next and ready-made layout variants for vertical and horizontal flows
  • Support for nested layouts, precise padding and spacing control, and safe error handling for mismatched pushes
  • Clear usage for vertical panels, horizontal button rows, and mixed widget rows within immediate-mode UIs

Quick Start

Integrate the forge-auto-widget-layout into your ForgeUiContext app and replace manual rect calculations with the layout API calls.

Frequently Asked Questions about forge-auto-widget-layout

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

FAQPage Schema
How do I automate widget layout for ForgeUiContext applications without manual rect calculations?▼

Automate widget layout for ForgeUiContext applications by replacing manual rect calculations with a stack-based cursor model that manages vertical and horizontal placement automatically. This model handles padding, spacing, and nested layouts through push and pop API calls.

What is a stack-based cursor model for immediate-mode UI layout?▼

A stack-based cursor model for immediate-mode UI layout tracks the current drawing position and direction using a stack. You push new layout regions to change direction or nesting level, place widgets sequentially with a cursor, and pop to return to the previous layout context.

Can I nest vertical panels and horizontal button rows within the same ForgeUiContext layout?▼

Yes, you can nest vertical panels and horizontal button rows within the same ForgeUiContext layout. The stack-based model supports nested layouts by pushing a new layout region for a different direction, placing widgets, then popping back to the parent layout context.

How do I control padding and spacing in an immediate-mode UI layout engine?▼

Control padding and spacing in an immediate-mode UI layout engine by specifying adjustable padding and spacing parameters when pushing a new layout region. These values define the outer margin of the region and the gaps between sequentially placed widgets.

Does the ForgeUiContext layout API handle mismatched push and pop errors?▼

Yes, the ForgeUiContext layout API implements safe error handling semantics for mismatched pushes and pops. It enforces a maximum layout depth and returns errors when layout regions are popped without a matching push, preventing stack corruption.

What is the best way to structure mixed widget rows in immediate-mode UIs?▼

The best way to structure mixed widget rows in immediate-mode UIs is using a layout engine with a stack-based cursor model. Push a horizontal layout region, place widgets sequentially using the cursor, and pop the region to return to the parent vertical flow.