An Entity<T> is a handle to state of type T, providing safe access and updates.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiongpui-entityExecute the skills CLI command in your project's root directory to begin installation:
Fetches gpui-entity from longbridge/gpui-component and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate gpui-entity. Access via /gpui-entity in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
10.9K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
10.9K
stars
An Entity<T> is a handle to state of type T, providing safe access and updates.
Key Methods:
entity.read(cx) → &T - Read-only accessentity.read_with(cx, |state, cx| ...) → R - Read with closureentity.update(cx, |state, cx| ...) → R - Mutable updateentity.downgrade() → WeakEntity<T> - Create weak referenceentity.entity_id() → EntityId - Unique identifierEntity Types:
Entity<T>: Strong reference (increases ref count)WeakEntity<T>: Weak reference (doesn't prevent cleanup, returns Result)// Create entity
let counter = cx.new(|cx| Counter { count: 0 });
// Read state
let count = counter.read(cx).count;
// Update state
counter.update(cx, |state, cx| {
state.count += 1;
cx.notify(); // Trigger re-render
});
// Weak reference (for closures/callbacks)
let weak = counter.downgrade();
let _ = weak.update(cx, |state, cx| {
state.count += 1;
cx.notify();
});
struct MyComponent {
shared_state: Entity<SharedData>,
}
impl MyComponent {
fn new(cx: &mut App) -> Entity<Self> {
let shared = cx.new(|_| SharedData::default());
cx.new(|cx| Self {
shared_state: shared,
})
}
fn update_shared(&mut self, cx: &mut Context<Self>) {
self.shared_state.update(cx, |state, cx| {
state.value = 42;
cx.notify();
});
}
}
impl MyComponent {
fn fetch_data(&mut self, cx: &mut Context<Self>) {
let weak_self = cx.entity().downgrade();
cx.spawn(async move |cx| {
let data = fetch_from_api().await;
// Update entity safely
let _ = weak_self.update(cx, |state, cx| {
state.data = Some(data);
cx.notify();
});
}).detach();
}
}
// ✅ Good: Weak reference prevents retain cycles
let weak = cx.entity().downgrade();
callback(move || {
let _ = weak.update(cx, |state, cx| cx.notify());
});
// ❌ Bad: Strong reference may cause memory leak
let strong = cx.entity();
callback(move || {
strong.update(cx, |state, cx| cx.notify());
});
// ✅ Good: Use inner cx from closure
entity.update(cx, |state, inner_cx| {
inner_cx.notify(); // Correct
});
// ❌ Bad: Use outer cx (multiple borrow error)
entity.update(cx, |state, inner_cx| {
cx.notify(); // Wrong!
});
// ✅ Good: Sequential updates
entity1.update(cx, |state, cx| { /* ... */ });
entity2.update(cx, |state, cx| { /* ... */ });
// ❌ Bad: Nested updates (may panic)
entity1.update(cx, |_, cx| {
entity2.update(cx, |_, cx| { /* ... */ });
});
Patterns: See Prerequisites Time Estimate 15-45 minutes depending on use case complexity Steps Common Pitfalls ✓ Do ✗ Don't 💡 Pro Tips ✓ Use when Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement. ✗ Avoid when Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion. anthropics/claude-code mblode/agent-skills github/awesome-copilot leonxlnx/taste-skill sickn33/antigravity-awesome-skills erichowens/some_claude_skills We added gpui-entity from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront. Keeps context tight: gpui-entity is the kind of skill you can hand to a new teammate without a long onboarding doc. gpui-entity is among the better-maintained entries we tried; worth keeping pinned for repeat workflows. gpui-entity has been reliable in day-to-day use. Documentation quality is above average for community skills. Registry listing for gpui-entity matched our evaluation — installs cleanly and behaves as described in the markdown. Registry listing for gpui-entity matched our evaluation — installs cleanly and behaves as described in the markdown. Solid pick for teams standardizing on skills: gpui-entity is focused, and the summary matches what you get after install. gpui-entity has been reliable in day-to-day use. Documentation quality is above average for community skills. Solid pick for teams standardizing on skills: gpui-entity is focused, and the summary matches what you get after install. gpui-entity reduced setup friction for our internal harness; good balance of opinion and flexibility. showing 1-10 of 27Implementation Guide
Best Practices
When to Use This
Learning Path
Related Skills
frontend-design
633Frontendsame categoryui-animation
230Frontendsame categorypremium-frontend-ui
228Frontendsame categoryhigh-end-visual-design
183Frontendsame categoryantigravity-design-expert
181Frontendsame categoryinterior-design-expert
133Frontendsame categoryReviews
4.5★★★★★27 reviewsJJames Gill★★★★★Dec 16, 2024NNikhil Ramirez★★★★★Nov 7, 2024SSofia Ndlovu★★★★★Oct 26, 2024OOshnikdeep★★★★★Sep 21, 2024AAmelia Martin★★★★★Sep 21, 2024PPiyush G★★★★★Sep 13, 2024IIra Srinivasan★★★★★Sep 9, 2024IIra White★★★★★Aug 28, 2024GGanesh Mohane★★★★★Aug 12, 2024KKaira Gill★★★★★Aug 12, 20241 / 3Discussion
Comments — not star reviews