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

Rendering Layout Performance

  • 42 installs
  • 50 repo stars
  • Updated June 18, 2026
  • josiahsiegel/claude-plugin-marketplace

Helps with ai & agent building tasks.

About

rendering-layout-performance is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • rendering-layout-performance
  • AI & Agent Building
  • AI-coding skill

Rendering Layout Performance by the numbers

  • 42 all-time installs (skills.sh)
  • +4 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #8,060 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill rendering-layout-performance

Add your badge

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

Listed on Skillselion
Installs42
repo stars50
Last updatedJune 18, 2026
Repositoryjosiahsiegel/claude-plugin-marketplace

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

TUI Rendering, Layout, Performance, and Alternate Screen Lifecycle

Use this skill when a TUI draws incorrectly, flickers, wastes CPU, mishandles resize, corrupts scrollback, or needs a robust rendering architecture.

Rendering principles

1. Render from state. The view should be a pure projection of current state and terminal dimensions. 2. Batch writes. Build a frame, diff or queue updates, then flush once. Avoid many small writes. 3. Minimize terminal control churn. Repeated style resets, cursor moves, and full clears are expensive and visible over remote links. 4. Throttle high-frequency sources. Coalesce logs, metrics, mouse motion, resize storms, and progress updates. 5. Define frame ownership. A full-screen renderer owns the screen while active; background output goes elsewhere.

Layout rules

  • Compute layout from width and height every frame or on every resize event.
  • Establish minimum usable dimensions and render a clear small-screen message below that threshold.
  • Prefer constraints, flex, grid, splits, or framework layout primitives over magic coordinates.
  • Keep focus, selection, viewport offset, and cursor position in UI state.
  • Test narrow, wide, tall, tiny, and odd terminal sizes.

Alternate screen lifecycle

Use alternate screen for full-screen apps when users should return to the original scrollback after exit. Do not use it for simple output where command results should remain visible.

Cleanup must restore:

  • Alternate screen.
  • Raw/cbreak mode.
  • Mouse tracking.
  • Bracketed paste.
  • Focus and extended keyboard modes.
  • Cursor visibility and style.
  • Terminal title or palette changes if modified.

Performance checklist

  • UI loop does not block on network, disk, child processes, or API calls.
  • Long operations publish progress through messages/channels/tasks.
  • Render rate is capped to useful human perception, especially for dashboards.
  • Resize events are coalesced before expensive recalculation.
  • Tables and lists virtualize or page large datasets.
  • Logging does not write to stdout/stderr while the TUI owns the screen.
  • Remote terminals and SSH latency are part of testing if supported.

Failure modes

SymptomLikely causeFix
Flickerclearing entire screen or flushing repeatedlydiff/batch writes, avoid full clears
High CPU while idleunconditional redraw looprender on events or capped tick
Corrupted shell after crashmissing cleanup on panic/exceptioncentral terminal guard and finally/defer/drop cleanup
Layout overlapabsolute coordinates or stale dimensionsrecompute constraints after resize
Logs appear inside UIstdout/stderr logging while alternate screen activefile sink, in-app log panel, or buffered logs

Reference files

  • references/render-loop-patterns.md - Frame buffers, dirty regions, throttling, and event loops.
  • references/alternate-screen-lifecycle.md - Setup/teardown checklist and crash recovery.

Related skills

This week in AI coding

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

unsubscribe anytime.