skills/desktop-window-layout-architect/SKILL.md
Design desktop window systems that feel native on macOS and Windows: split views, inspectors, auxiliary windows, tiling, snap-safe sizes, default placement, and chrome density. Use when a Tauri/Electron/WinUI/SwiftUI app feels awkward, overlapping, over-chromed, or generic, or when you need a real geometry contract for multiple surfaces. NOT for mobile layouts, marketing pages, or CSS-only component styling without multi-window or multi-pane behavior.
npx skillsauth add curiositech/windags-skills desktop-window-layout-architectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Make desktop applications feel like they belong on a real operating system, not like web cards trapped in draggable divs.
✅ Use for:
❌ NOT for:
Use these to pull the relevant geometry and shell clues into context before deciding anything.
!`rg -n "openWindow|snapWindow|tileWindows|cascadeWindows|arrangeReviewWorkspace|WindowFrame|Titlebar|Taskbar|SplitView|TwoPane|NavigationView" "${ARGUMENTS:-.}" 2>/dev/null | head -n 120`
!`rg -n "innerHeight|innerWidth|defaultSize|minSize|restoreBounds|window-state|isMaximized|position|size" "${ARGUMENTS:-.}" 2>/dev/null | head -n 120`
Load only the files that match the current blocking question.
| File | Load when | Purpose |
|---|---|---|
| references/INDEX.md | First | Decide which deep-dive file to read instead of loading everything |
| references/platform-principles.md | When grounding decisions in OS conventions | Apple HIG, Windows Fluent, and Tauri state-restoration synthesis |
| references/surface-selection.md | When deciding split pane vs panel vs auxiliary window | Surface taxonomy and role-based routing |
| references/geometry-and-placement.md | When defining default sizes, mins, snap safety, or restore rules | Geometry contract and placement heuristics |
| references/chrome-density-and-commanding.md | When the UI feels crowded or command-heavy | Title bars, gutters, bottom bars, action placement |
| references/workspace-presets.md | When designing review, compare, authoring, or inspect modes | Role-aware workspace recipes |
| references/implementation-patterns.md | When translating guidance into code | Tauri/Electron/WinUI/SwiftUI implementation notes |
| scripts/preflight.sh | Before any repo-specific audit | Read-only inspection of likely shell/layout files |
| scripts/audit_window_layout.py | When you want a fast static audit | Emits findings plus JSON, Markdown, or HTML reports about geometry, tiling, snap safety, and restore behavior |
| templates/layout-audit-template.md | When returning a structured review | Reusable final answer skeleton |
| templates/window-registry-template.ts | When designing a new window registry or refactor | Role- and mode-aware config template |
| templates/workspace-preset-template.json | When defining breakpoints and workspace presets | Serializable layout contract |
| examples/windags-review-workspace.md | When auditing a graph + inspector + artifact app | Concrete before/after reasoning |
| examples/surface-selection-scenarios.md | When the right surface is unclear | Trigger examples that provoke different surface choices |
| agents/desktop-window-layout-architect-worker.md | When a clean-room critique or parallel audit helps | Narrow worker for isolated layout review |
Unless the user explicitly asks for something narrower, structure the answer like this:
Use templates/layout-audit-template.md when emitting this structure verbatim.
flowchart TD
A[Identify app type and current pain] --> B{Same task context?}
B -->|Yes| C[Prefer panes inside one primary window]
B -->|No| D{Transient or persistent?}
D -->|Transient| E[Modal sheet or popover]
D -->|Persistent task area| F[Auxiliary window]
C --> G{Supplemental live selection details?}
G -->|Yes| H[Trailing inspector or inspector panel]
G -->|No| I[Sidebar + content or two-pane layout]
H --> J[Define geometry contract]
I --> J
F --> J
E --> J
J --> K[Define placement and restore rules]
K --> L[Trim chrome and command duplication]
L --> M[Validate against wide, medium, narrow desktop widths]
M --> N[Ship role-aware presets instead of fixed percentages]
Decide whether the problem belongs to:
Rules:
Assign each surface a role:
navigationcanvasdetailinspectorartifactconsoleutilityThen rank them:
Never choose percentages before roles. Percentages are outputs of role priority, not the other way around.
Define, per surface:
Hard rules:
Define:
Rules:
normal, maximized, snapped-left, snapped-right, tiled, with restoreBounds.Check whether the app is losing field to shell chrome:
Prefer:
Avoid putting critical actions in bottom bars on macOS-style desktop apps.
Instead of one fixed arrangement, define at least three desktop-width regimes:
The goal is not generic “responsiveness.” The goal is preserving task comprehension as width changes.
Validate at minimum:
Check:
Novice: "If the screen feels crowded, split it into more floating windows." Expert: Related work should usually stay inside one primary window with panes. New windows are for distinct task areas, not for every supportive region. Timeline: Apple’s current HIG explicitly pushes supplementary information toward split views and inspectors before new windows; Windows pushes adaptive panes and navigation surfaces before ad hoc floaters.
Novice: "A 40px child title bar, thick borders, giant controls, and an always-on bottom action bar are fine." Expert: Desktop users will trade ornamental chrome for field. Keep title bars draggable, legible, and system-like, but aggressively protect the content area. Timeline: Windows 11 title bars remain concise and system-integrated; Apple guidance emphasizes content-first windows and warns against hiding critical actions in bottom bars.
Novice: "Split the screen 66/34 and 58/42, then clamp each pane to its minimum." Expert: That causes overlap. Start from minimum viable pane sizes and role priority. If the floor sum does not fit, switch to a different preset. Timeline: Mature desktop shells moved toward breakpoint- and mode-based arrangements because static percentages fail under resize and snap.
Novice: "New windows can open at x + 24, y + 24; that’s enough."
Expert: Window managers need restore bounds, snap modes, clamp-on-move, viewport recovery, and parent-relative placement. Cascade is an escape hatch, not the whole policy.
Timeline: Users now expect snap layouts, restore semantics, and remembered bounds out of the box on both Windows and modern desktop frameworks like Tauri.
Novice: "The inspector can minimize, live forever in the task list, and behave like a peer document." Expert: Inspectors are supplemental. They either live in a trailing pane or behave like panels with lighter lifecycle semantics. Timeline: Apple’s panel guidance is explicit: panels are not documents, generally should not minimize, and should appear/disappear with app relevance.
Load examples/windags-review-workspace.md.
Use it when the app has:
Load examples/surface-selection-scenarios.md.
Use it when the team is arguing about:
Do not use this skill when:
If the request is mostly about color, typography, or visual taste, pair this with a design skill after the surface model is fixed.
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.