The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure.

MITAuto-check passed

Install Perf

skills CLI
$ npx skills add OutThisLife/brooklyn-skills --skill perf -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OutThisLife/brooklyn-skills perf --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OutThisLife/brooklyn-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/perf .claude/skills/perf && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
perf
GitHub stars
199
Token cost
~3.7k tokens
SKILL.md length
1,987 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure.

  • Works in 5 steps: Reproduce the slow path and capture a… → Profile to find the real hot path: CPU… → Read the profile, not your intuition —… → …
  • Optimization work
  • SKILL.md covers Loop, Live Electron / hgui, Web loading contracts and Product-grid browsing, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Perf is an agent skill from OutThisLife/brooklyn-skills. The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure. Use for /perf, "this is slow", or optimization work.

Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Skills that drive best-in-class engineering. The licence is MIT.

When your agent uses it

  • Optimization work

Example prompts

  • “this is slow”
  • “/perf”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Reproduce the slow path and capture a baseline number — time, memory, FPS,
  2. Profile to find the real hot path: CPU profile / flamegraph / memory snapshot
  3. Read the profile, not your intuition — fix the actual hot path.
  4. Re-measure. Record before/after in the PR title/description.
  5. Ship in topical commits (pr-update), clean, keep CI green.

What it can do on your machine

Read from SKILL.md and the folder at commit 8a97904. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Perf loads about 3.7k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 1,987 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OutThisLife/brooklyn-skills at commit 8a97904, republished under its MIT licence (© OutThisLife). 1,987 words, ~3,652 tokens.

Download SKILL.mdSave it as .claude/skills/perf/SKILL.md (or your agent's skills folder).
name
perf
description
The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure. Use for /perf, "this is slow", or optimization work.

Perf

The general performance loop. Profiling (CPU profile, flamegraph, memory snapshot, trace) is the usual tool, but the loop is the same regardless of which one fits.

Loop

  1. Reproduce the slow path and capture a baseline number — time, memory, FPS, request latency, whatever matters here.
  2. Profile to find the real hot path: CPU profile / flamegraph / memory snapshot / trace as fits. Reuse the repo's existing profiler; don't build a parallel harness.
  3. Read the profile, not your intuition — fix the actual hot path.
  4. Re-measure. Record before/after in the PR title/description.
  5. Ship in topical commits (pr-update), clean, keep CI green.

Live Electron / hgui

  • Attach to the existing renderer with the repository's CDP helper and exact dev-server URL; preserve tabs, drafts and running agents. Keep source edits in the worktree and save reversible live injections outside the app's Tailwind source scan.
  • Separate uninstrumented frame timing from CPU, selector-statistics and React attribution passes. Do not run your own tests/builds concurrently with comparison captures. Record mounted/visible panes and busy-session counts with each sample; persist raw samples before reporting tables.
  • Treat geometry/read functions atop a CPU profile as possible flush victims. Trace UpdateLayoutTree and style invalidations before optimizing their callers. Isolate interacting selector families together: removing one broad :has() rule can show no gain while other rules still invalidate the same subtree. Preserve behavior with positively anchored owner selectors, sibling rules, or existing observed state; do not ban :has() generally.
  • Recheck target ID, code revision, runtime state and injection globals after interruption/restart. A fresh process or independently updated checkout is a new baseline, never an after result for the old renderer. Report aged and fresh results separately; native/embedder heap growth or a GC pause alone does not prove a leak.
  • Put lazy render callbacks below existing presence boundaries. items(kit) eagerly creates a closed menu's elements even when its portal mounts nothing; a small child component lets presence defer construction without replacing open/close mechanics. Test both dropdown and context paths plus latest-item selection.
  • Verify Vite Fast Refresh's actual component family IDs before injection: local registrations and export registrations are distinct, and registering an already-known type under a second ID is ignored. Use the shipped validateRefreshBoundaryAndEnqueueUpdate export where performReactRefresh is private, and verify rendered markers afterward.
  • Detect live render failures from boundary state or error elements, not whole-body text: this conversation's code/tool output can itself contain the error phrase. Restore instrumentation in finally, and describe live injections as reload-volatile.

Web loading contracts

  • Verify the delivered page's boot entry before attributing a disappearing CMS slot to async registration. In Vue, createSSRApp preserves existing SSR nodes while an async component loads; createApp clears the mount container, and hydrateOnVisible cannot preserve it on that client-rendered path. Exercise the real component with a held loader and assert node identity/presence; a zero rectangle in layout-shift attribution alone does not prove a DOM remount. Recheck the response from the exact browser run, including its viewport/UA and experiment cohort: a curl request and a fresh browser can receive different SSR/CSR paths for the same URL. Record real node geometry as well as identity; a node pushed outside the viewport can have a zero attribution rectangle without collapsing or unmounting.

  • For cached-SSR public directories, carry only a neutral display projection through serialized store state and keep those rows mounted during a small background revalidation. Removing every client fetch can leave changed locations stale inside cached HTML. Compare original-node retention, final text/links, interactions and settled screenshots; report payload savings separately from whole-page scores, including the new SSR-state bytes.

  • For personalized CMS request warming, separate public dependency identifiers from authoritative content and keep the actual visitor request on its existing service path. Prove hydrated-state availability before the remaining async route/component wait; inspect production module preloads before promising a gain. Use a manually released loader for ordering proof, never synthetic sleeps as a latency benchmark. Keep commit/validation/errors/exposure in the normal consumer, dedupe per store/context, skip existing cache hits, and verify invalidation of both settled and in-flight results. A short TTL or cookie fingerprint alone does not prove auth freshness; report manually simulated invalidation separately from wired application lifecycle coverage.

  • Preserve consent-container and ordered vendor-loader contracts when refreshing a performance branch. Restoring eager GTM or upstream DY ordering changes the startup profile; label old Lighthouse numbers as historical instead of carrying them forward as proof of the new revision.

  • For autofocus behind a visibility/reveal gate, wait for both initialization and reveal, consume the focus request once, and cancel it on reset. Verify the actual active element in a browser with the real hiding CSS; a mocked focus-call assertion cannot catch a silent focus no-op on a hidden iframe. Label simulated vendor-event tests separately from live SDK/environment verification.

Product-grid browsing

  • Count requested and mounted images after a fixed scroll journey, not just visible cards. Native lazy loading can still fetch hidden carousel slides. Preserve slide geometry; mount covers initially and warm adjacent photos on pointer, touch, focus and selection, retaining the original carousel mechanics.
  • Separate network batches from rendered increments when each request pays substantial startup cost: fetch several screens at once, reveal the existing small card count per intersection, and prefetch one batch ahead. Keep the batch size in query keys so older short cached pages cannot falsely signal end-of-list. Test rapid reveals, crossing a batch boundary without duplicate requests, correct end-of-list behavior, and reset/isolation across sort/search/filter keys; never mount the entire buffer or recursively crawl the whole feed.
  • When persisting only an infinite query's first page, preserve that page's own fetch age. Appending later pages advances the query timestamp but must not extend stale prices or stock. Bound storage, retain background revalidation, and test fresh reloads with delayed real network responses plus expired-snapshot rejection.
  • Report cold catalog loads separately from warm server and restored browser caches. A warm rerun is not evidence that a cold upstream walk became faster; compare identical revisions, viewport/device scale, product counts and scroll steps, saving raw timings and profiles.

Serverless catalog caches

  • Verify cache behavior after restarting the process and again on the deployed platform; a warm local Map can hide repeated multi-second catalog walks on new serverless instances. Compare exact product IDs/order/prices across the cache change, not only response timing.

  • In Next, move a Pages API handler to a real App Route when it needs persistent Data Cache SWR and after() lifetime support. Wrap overloaded Apollo integrations in a request-only adapter for Route Handler typing, and externalize graphql alongside @apollo/server so schema class identities stay shared.

  • Measure upstream page sizes before caching. Large Shopify pages can exceed the Data Cache's 2 MB entry budget; cache compressed validated pages and decompress losslessly, rather than dropping fields or storing one oversized full-catalog entry. If keeping decoded in-memory catalogs, carry the oldest upstream page's original fetch timestamp through persistent storage; cache reads must not restart that TTL. Bound the decoded-cache entry count.

  • Treat throttling, invalid payloads and required-page failures as errors, never end-of-catalog. Consume concurrent speculative pages in order, stop only at a successful short page, and safely settle remaining requests within the response lifetime; failed refreshes must not replace valid stale data with empty arrays.

  • Benchmark a trivial empty query when deployed latency remains high despite data caching: function startup alone may dominate. For public read-only GraphQL, use GET with a bounded-URL POST fallback and the required Apollo preflight header; cache only successful, non-authenticated JSON responses at the CDN for a short window. Verify real x-vercel-cache: HIT and keep cache-miss versus cache-hit timings separate. Update browser test request parsing and route interception for query-string GETs.

  • Inspect every entry in an IntersectionObserver delivery when a ready grid stalls at the sentinel. Rapid scrolling can coalesce a leave and re-entry for the same observed target; use its latest entry, not entries[0]. Record native batches and query readiness before blaming React closures or the network, then stress rapid successive reveals across data-batch boundaries.

Show full SKILL.md (678 more words)Show less

Browser idle and retention

  • Assert the browser's actual innerWidth, innerHeight, DPR and theme for every named case; requested launch options are not proof. Use explicit units in sampling helpers and reject accidental millisecond/second mismatches. Exclude failed/misconfigured runs instead of folding them into a coverage total.
  • Separate stationary idle counters, frame-cadence probes, CPU/paint traces and heap snapshots. RAF cadence is not proof of presented GPU frames. CDP GPU-process CPU time is not hardware GPU utilization.
  • Assert scroll trajectory as well as cadence: replay wheel input across nested scroll-region boundaries in both directions, record per-frame scrollY, wrong-direction deltas and total requested travel. A page can report 60 FPS while native scrolling fights an in-flight Lenis animation. Use axis-specific prevention for horizontal carousels inside vertical pages, retain truly independent native vertical regions, and verify horizontal wheel/drag/keyboard behavior separately.
  • Compare post-GC retention after code/data caches warm, with equal mounted content and genuine same-document route cycles. Inspect retaining paths when detached nodes remain. Heap snapshots and DevTools network response buffers can inflate native RSS; distinguish bounded caches/tooling overhead from growing app retention.
  • When a persistent React owner returns null off-route, bind DOM-owning motion effects to that presence boundary. Clear Element-keyed interruption maps when the panel disappears, but preserve them for reversals on the same mounted panel. A real Chrome fixture using the exact source, native WAAPI and WeakRefs can verify release independently of unavailable full-route infrastructure; label it isolated component verification.
  • Preserve exact gradient stops/tokens when moving an animated background onto a transformed layer. Compare fixed-clock edge pixels at endpoints and midpoint before accepting performance gains; a faster changed design is not parity. Derive transform percentages from the actual background positioning geometry.
  • Keep autoplay media paused off-screen, while hidden and under reduced motion; observe live preference changes and disconnect ownership on unmount. Use the latest entry in coalesced visibility batches. If a headless tab never becomes hidden, report native-background coverage as unverified rather than treating a tab switch as proof.
  • Preserve each animation's initial play state in A/B/A probes. Calling play() on an initially paused closed-panel effect manufactures work and invalidates the native control; restore only the owners that were running. Save the exact harness/module versions with each capture.
  • Isolate RAF drivers and CSS/compositor animations both individually and together. An otherwise cheap RAF can keep main-thread style sampling active while an independent compositor animation still consumes GPU-process CPU. Verify the actual mounted canvas/owner at named waypoints rather than attributing a footer shader to a nearby sigil or trusting a stale component comment.
  • Obtain design approval before introducing an inactivity cutoff for approved ambient decoration; pausing visible motion is a product trade-off, not a free rendering optimization. Preserve the approved grace period, suspend on document leave/blur, ignore transitions between document children, and verify native pointer re-entry plus keyboard recovery. Label measurements from a superseded timing policy instead of relabeling them as final.
  • Verify demand-driven animation against the real engine, not only a mocked scheduler: wheel, anchors, programmatic and native scrolling, locks, hidden/resume time continuity, settle, and teardown. Decorative idle suspension should freeze its last pose and resume active-time clocks; compare idle screenshots and callback/draw counts so a blank canvas cannot pass as an optimization.

SSR responsive-image request selection

  • Compare the actual component's renderToString output, serialized state and createSSRApp hydration with an SSR device bucket opposite Chrome's viewport. Hold vendor readiness and data responses independently; record initial requests, mount-only requests, branch transitions, image geometry and hydration warnings. Native picture sources plus CSS sizing avoid UA-driven source swaps; preserve the existing media-aware SSR preload contract rather than adding a conflicting fallback-image preload. Check pre-hydration complete && !naturalWidth as well as later error events, then prove interactive handoff still proceeds. For billable image APIs, intercept every browser request before navigation, reject unexpected keys, and fulfill only explicitly nonsecret URLs with labeled synthetic images. This proves request selection and geometry, not cartography or page-level LCP gains.

Don't

  • Optimize by guess before profiling.
  • Fiddle with the measurement system instead of improving perf.
  • Run a full suite or profile that overwhelms the machine — scope the run.
  • Report gains you didn't measure.

© OutThisLife, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/perf of OutThisLife/brooklyn-skills.

Open the folder on GitHubat commit 8a97904

Compare with similar skills

Perf next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Perf compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Perf this skillOutThisLife/brooklyn-skills199—~3.7kAutomated safety check: PassMIT
PlotJuggler 4 Perf ProfilingPlotJuggler/PlotJuggler6.2k—~1.6kAutomated safety check: NotesMPL-2.0
Perf Profilercomposio-community/awesome-claude-plugins1.9k—~182Automated safety check: PassNone
Profileccusage/ccusage19k—~430Automated safety check: PassCustom licence
Perf Profilerlaolaoshiren/claude-code-skills-zh878—~385Automated safety check: PassMIT
Game Performance ProfilerDonchitos/Claude-Code-Game-Studios26k—~2.5kAutomated safety check: NotesMIT

Similar skills

  • PlotJuggler 4 Perf Profiling

    PlotJuggler/PlotJuggler

    Guides CPU profiling of PlotJuggler 4 on Linux with perf: count first, record cheaply with LBR, then read per-thread, flat, flamegraph or time-window views.

    6.2k GitHub stars~1.6k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Perf Profiler

    composio-community/awesome-claude-plugins

    A skill your agent uses when profiling CPU/memory hot paths, generating flame graphs, or capturing JFR/perf evidence.

    1.9k GitHub stars~182 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Profile

    ccusage/ccusage

    Profiles ccusage performance. An agent skill from ccusage/ccusage.

    19k GitHub stars~430 tokensUpdated today
    Auto-check passed
  • Perf Profiler

    laolaoshiren/claude-code-skills-zh

    基于可复现基线和 profiler 证据分析性能问题。用于用户要求定位慢接口、慢任务、慢查询、内存或网络瓶颈,制定优化方案,或验证优化收益时;区分实测结论与静态推断,不虚构耗时和提升比例,生产环境操作需明确授权。

    878 GitHub stars~385 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Game Performance Profiler

    Donchitos/Claude-Code-Game-Studios

    Finds performance bottlenecks, measures them against frame, draw-call and memory budgets, and ranks the optimization recommendations.

    26k GitHub stars~2.5k tokensUpdated 8 days ago
    Game DevelopmentAuto-check: notes
  • Cpu Profile

    ClickHouse/ClickHouse

    Profile a ClickHouse query using the sampling query profiler and system.tracelog.

    50k GitHub stars~1.9k tokensUpdated today
    DatabasesAuto-check: notes

More from OutThisLife/brooklyn-skills

All 22 skills in this repo
  • Draft Tweet

    OutThisLife/brooklyn-skills

    Draft X/Twitter posts about shipped work. An agent skill from OutThisLife/brooklyn-skills.

    199 GitHub stars~456 tokensUpdated 2 days ago
    Auto-check passed
  • Free Disk Space

    OutThisLife/brooklyn-skills

    Safely reclaim disk space on macOS without touching personal or agent data.

    199 GitHub stars~433 tokensUpdated 2 days ago
    Auto-check passed
  • List Open Work

    OutThisLife/brooklyn-skills

    List my open MRs/PRs in the current repo/worktree, each with its tracker ticket.

    199 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • PR Ready

    OutThisLife/brooklyn-skills

    Clear everything blocking an existing PR/MR from merging — rebase onto the default branch, get CI green, and resolve review threads (Copilot and human).

    199 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • PR Triage

    OutThisLife/brooklyn-skills

    Maintainer triage on OTHER people's PRs/MRs — verdict of approve, supersede, or close, salvage with credit, close the cluster.

    199 GitHub stars~4.7k tokensUpdated 2 days ago
    Auto-check passed
  • PR Update

    OutThisLife/brooklyn-skills

    Open a PR/MR if missing, or refresh an existing one's title and description so they match the current diff.

    199 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check: notes

Questions about Perf

What does Perf do?

The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure. Perf is an agent skill from OutThisLife/brooklyn-skills. The general profile-driven perf loop for any language or runtime: baseline, profile, fix the real hot path, re-measure.

When should I use Perf?

Perf fits situations like: optimization work.

How do I install Perf in Claude Code?

Run `npx skills add OutThisLife/brooklyn-skills --skill perf -a claude-code`. Or copy the skill folder (skills/perf in OutThisLife/brooklyn-skills) into .claude/skills/perf in your project. Claude Code loads it when a task matches its description.

How do I install Perf in Codex?

Run `npx skills add OutThisLife/brooklyn-skills --skill perf -a codex`. Or copy the skill folder (skills/perf in OutThisLife/brooklyn-skills) into .agents/skills/perf in your project. Codex loads it when a task matches its description.

Can I use Perf in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OutThisLife/brooklyn-skills --skill perf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/perf, .gemini/skills/perf, .github/skills/perf and .opencode/skills/perf in your project.

What does Perf need to run?

SKILL.md names no scripts, command-line tools or credentials: Perf is instructions for the agent only.

Does Perf access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Perf safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Perf use?

Perf is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Perf use?

About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Perf?

Skills that share tags, products or a category with Perf: PlotJuggler 4 Perf Profiling (PlotJuggler/PlotJuggler, 6.2k stars), Perf Profiler (composio-community/awesome-claude-plugins, 1.9k stars), Profile (ccusage/ccusage, 19k stars) and Perf Profiler (laolaoshiren/claude-code-skills-zh, 878 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Perf?

OutThisLife (a GitHub user) maintains it in OutThisLife/brooklyn-skills, which has 199 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 5, 2026.

Source: OutThisLife/brooklyn-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.