ncurses-render-safety

Enforce safe ncurses rendering patterns to prevent flicker and color bleed.

12|1|Updated Oct 31, 2025
One-click install
npx skills add https://github.com/robkam/ytreenova --skill ncurses-render-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ncurses-render-safety
Source: https://github.com/robkam/ytreenova/tree/main/.ai/skills/ncurses-render-safety
Command: npx skills add https://github.com/robkam/ytreenova --skill ncurses-render-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforce safe ncurses rendering practices to prevent flicker, color bleed, and redraw regressions in ytnova's UI rendering.

Core Features & Use Cases

  • Enforces a single background setup per refresh path to avoid repeated WbkgdSet calls.
  • Clears the window with werase() after a background change to prevent artifacts.
  • Uses wattron()/wattroff() for line-level styling only, avoiding global style leaks.
  • Prevents hidden side effects by maintaining clear redraw ownership across modules.

Quick Start

Run this instruction to apply the safe ncurses rendering patterns to the current UI render path.

Frequently Asked Questions about ncurses-render-safety

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

FAQPage Schema
How do I prevent ncurses screen flicker during frequent window redraws?

To prevent ncurses screen flicker during frequent redraws, set the window background once per refresh path and clear with werase() after background changes. This avoids repeated WbkgdSet calls and visual artifacts across refresh cycles.

Why does ncurses color bleed across different UI modules?

ncurses color bleed occurs from global style leaks when attributes are not scoped properly. Using wattron() and wattroff() for line-level styling only, while maintaining clear redraw ownership across modules, prevents these hidden cross-module side effects.

What is the best way to clear ncurses window artifacts after changing the background?

The best way to clear ncurses window artifacts after a background change is to call werase() immediately after the update. This ensures the window is properly cleared before rendering new content, preventing visual artifacts during refresh.

Does this ncurses rendering safety approach work for high-frequency UI refresh cycles?

Yes, this ncurses rendering safety approach is specifically designed for high-frequency UI refresh cycles. By enforcing a single background setup per refresh path and preventing cross-module side effects, it maintains consistent visuals without redraw regressions.

When should I use wattron and wattroff for ncurses styling?

You should use wattron and wattroff for ncurses styling when applying attributes to specific lines only. This scoped approach prevents global style leaks that cause color bleed and unintended visual artifacts across other UI components.