gpui-entity

Installation
SKILL.md

Overview

An Entity<T> is a handle to state of type T, providing safe access and updates.

Key Methods:

  • entity.read(cx)&T - Read-only access
  • entity.read_with(cx, |state, cx| ...)R - Read with closure
  • entity.update(cx, |state, cx| ...)R - Mutable update
  • entity.downgrade()WeakEntity<T> - Create weak reference
  • entity.entity_id()EntityId - Unique identifier

Entity Types:

  • Entity<T>: Strong reference (increases ref count)
  • WeakEntity<T>: Weak reference (doesn't prevent cleanup, returns Result)

Quick Start

Creating and Using Entities

Related skills
Installs
240
GitHub Stars
11.4K
First Seen
Jan 21, 2026