Loading...
Loading...
GPUI UI framework best practices for building desktop applications. Use when writing GPUI code, creating UI components, handling state/events, async tasks, animations, lists, forms, testing, or working with Zed-style Rust GUI code.
npx skill4agent add aprilnea/gpui-skills gpui| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Core Concepts | CRITICAL | |
| 2 | Rendering | CRITICAL | |
| 3 | State Management | HIGH | |
| 4 | Event Handling | HIGH | |
| 5 | Async & Concurrency | MEDIUM-HIGH | |
| 6 | Styling | MEDIUM | |
| 7 | Components | MEDIUM | |
| 8 | Anti-patterns | CRITICAL | |
core-ownership-modelcore-entity-operationscore-weak-entitycore-context-typesrender-render-vs-renderoncerender-element-compositionrender-conditionalrender-shared-stringrender-builder-patternstate-notifystate-observestate-subscribestate-globalstate-keyed-stateevent-actionsevent-listenerevent-focusevent-propagationasync-task-lifecycleasync-debounceasync-background-spawnasync-weak-entityasync-error-handlingstyle-flexboxstyle-theme-colorsstyle-spacingstyle-elevationcomp-statelesscomp-traitscomp-focus-ringcomp-dialogcomp-variantanti-silent-erroranti-drop-taskanti-drop-subscriptionanti-circular-referenceanti-missing-notifyanti-unwrap┌─────────────────────────────────────────────────────────┐
│ Application (App) │
│ (Single owner of all Entities) │
└─────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
┌───────────┐ ┌───────────┐ ┌──────────┐
│ Entity<A> │ │ Entity<B> │ │ Global<C>│
└───────────┘ └───────────┘ └──────────┘
│ │ │
│ read/update │ read/update │ via App
│ via Context<A> │ via Context<B> │
│
┌─────────────────────────────────────────────────┐
│ UI Rendering (Render trait) │
│ Each frame: fn render(&mut self, ...) │
│ Returns: impl IntoElement (Element tree) │
└─────────────────────────────────────────────────┘
│
├─ observe() → changes trigger render
├─ subscribe() → events trigger reactions
├─ notify() → signal changes
└─ emit() → send typed eventsrules/core-ownership-model.md
rules/render-render-vs-renderonce.md
rules/anti-silent-error.md