gpui-patterns

Community

Master GPUI patterns for robust, scalable apps.

Authorgeoffjay
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Building maintainable and performant GPUI applications requires adherence to established design patterns for component composition, state management, and event handling. Without these, code can become disorganized, difficult to scale, and prone to bugs.

Core Features & Use Cases

  • Component Composition: Guidance on basic component structure, Container/Presenter patterns, and compound components for modular and reusable UI elements.
  • State Management: Strategies like Model-View, context-based state, and various subscription patterns for reactive and predictable data flow.
  • Action System: Define, register, and dispatch actions, along with keybinding integration for a structured approach to user interactions.
  • Use Case: A Rust developer is starting a new GPUI project and needs to establish a solid architectural foundation. This Skill provides best practices and code examples for structuring components and managing application state effectively from the outset, ensuring long-term maintainability.

Quick Start

// Basic GPUI component structure struct MyView { state: Model<MyState>, _subscription: Subscription, }

impl Render for MyView { fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement { let state = self.state.read(cx); div().child(format!("Value: {}", state.value)) } }

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: gpui-patterns
Download link: https://github.com/geoffjay/claude-plugins/archive/main.zip#gpui-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.