gpui-performance

gpui-performance is a skill for Claude Code from geoffjay/claude-plugins. It costs 39 tokens per session (3,325 once invoked), scanned A, original, MIT.

A performance guide for GPUI applications, which are desktop user interfaces built with the GPUI framework. It explains how rendering, layout, state changes, memory use, and profiling affect runtime speed.

In plain words
What is it for?
Use it to optimize render methods, avoid redraws when state has not changed, cache expensive calculations, reduce UI complexity, and investigate performance problems.
Why use it?
Unnecessary redraws, expensive rendering work, and deeply nested UI elements can make an application slow. The guide helps identify and reduce that work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rust-gpui-developer plugin — 4 skills shipped together

Good fit Use it to optimize render methods, avoid redraws when state has not changed, cache expensive calculations, reduce UI complexity, and investigate performance problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/geoffjay/claude-plugins/gpui-performance
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add geoffjay/claude-plugins --skill gpui-performance
Clone the repo
git clone --depth 1 https://github.com/geoffjay/claude-plugins

Made for: Claude Code.

Or install rust-gpui-developer, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gpui-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/geoffjay/claude-plugins/gpui-performance/github.svg)](https://agentmods.dev/skills/geoffjay/claude-plugins/gpui-performance)
Your own site
<a href="https://agentmods.dev/skills/geoffjay/claude-plugins/gpui-performance"><img src="https://agentmods.dev/badge/skills/geoffjay/claude-plugins/gpui-performance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gpui-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/geoffjay/claude-plugins/gpui-performance"><img src="https://agentmods.dev/badge/skills/geoffjay/claude-plugins/gpui-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,325 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.03325
Opus 5.5 $0.00016 $0.01330
Sonnet 5.5 $0.00008 $0.00665
Haiku 4.5 $0.00004 $0.00332

Measured 2mo ago against content hash d53db89b8f49, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gpui-performance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/rust-gpui-developer/skills/gpui-performance/SKILL.md · 604 lines

How it starts

The opening of the file, as written. The whole thing — 604 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GPUI Performance Optimization

Metadata

This skill provides comprehensive guidance on optimizing GPUI applications for rendering performance, memory efficiency, and overall runtime speed.

Instructions

Rendering Optimization

Understanding the Render Cycle
State Change → cx.notify() → Render → Layout → Paint → Display

Key Points:

  • Only call cx.notify() when state actually changes
  • Minimize work in render() method
  • Cache expensive computations
  • Reduce element count and nesting
Avoiding Unnecessary Renders
// BAD: Renders on every frame
impl MyComponent {
    fn start_animation(&mut self, cx: &mut ViewContext<Self>) {
        cx.spawn(|this, mut cx| async move {
            loop {
                cx.update(|_, cx| cx.notify()).ok();  // Forces rerender!
                Timer::after(Duration::from_millis(16)).await;
            }
        }).detach();
    }
}

// GOOD: Only render when state changes
impl MyComponent {
    fn update_value(&mut self, new_value: i32, cx: &mut ViewContext<Self>) {
        if self.value != new_value {
            self.value = new_value;
            cx.notify();  // Only notify on actual change
        }
    }
}
Optimize Subscription Updates
// BAD: Always rerenders on model change
let _subscription = cx.observe(&model, |_, _, cx| {
    cx.notify();  // Rerenders even if nothing relevant changed
});

// GOOD: Selective updates
let _subscription = cx.observe(&model, |this, model, cx| {
    let data = model.read(cx);

    // Only rerender if relevant field changed
    if data.relevant_field != this.cached_field {
        this.cached_field = data.relevant_field.clone();
        cx.notify();
    }
});
Memoization Pattern
use std::cell::RefCell;
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};

struct MemoizedComponent {
    model: Model<Data>,
    cached_result: RefCell<Option<(u64, String)>>,  // (hash, result)
}

impl MemoizedComponent {
    fn expensive_computation(&self, cx: &ViewContext<Self>) -> String {
        let data = self.model.read(cx);

        // Calculate hash of input
        let mut hasher = DefaultHasher::new();
        data.relevant_fields.hash(&mut hasher);
        let hash = hasher.finish();

        // Return cached if unchanged
        if let Some((cached_hash, cached_result)) = &*self.cached_result.borrow() {
            if *cached_hash == hash {
                return cached_result.clone();
            }
        }

        // Compute and cache
        let result = perform_expensive_computation(&data);
        *self.cached_result.borrow_mut() = Some((hash, result.clone()));
        result
    }
}

Read the full file on GitHub · 604 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 604 lines · 39 tokens per session scan A d53db89b8f49

Subscribe to this mod's changes

gpui-performance is a skill published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 1y ago), licensed MIT. It adds 39 tokens to every session and 3,325 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

gpui-performance compared with skills from other repositories

gpui-performance next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gpui-performancegeoffjay/claude-pluginsSkill81y agoMITA39Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16kyesterdayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k3d agoMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill319yesterdayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2kyesterdayApache-2.0A15Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill1.9k23d agoMITA36Claude Code
triaging-web-analytics-supportPostHog/posthogSkill41kyesterdaynoneA151Claude Code, Codex