perf-bar
Skill0 starsChanged 57 days agoMITView on GitHub
Use when assessing performance or algorithmic soundness — Big-O on hot paths, N+1 queries, Supabase egress, and benchmarking hard challenges; feeds the SPIKE sub-phase and per-task review.
In this repository14 other files it gives its agents.
- arch-barSkill
- commsSkill
- context-budgetSkill
- exploit-huntSkill
- gdprSkill
- gen-umlSkill
- postmortemSkill
- security-barSkill
- spec-intakeSkill
- stack-gotchasSkill
- stacksSkill
- standardsSkill
- task-flowSkill
- ux-barSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
When the task is flagged hard-tech: in the SPIKE, benchmark candidate approaches on representative input before committing the plan — …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
perf-bar
Overview
My performance/algorithmic bar. Usable standalone on a diff, fed into the SPIKE
sub-phase of eskills:task-flow (approach selection), and invoked by its per-task review.
It gets its own lens because bottlenecks are a recurring core challenge. (This is the 4th
lens — the hard cap; a new lens must displace one.)
Hot-path checklist
- Big-O where it matters. Profile or reason about complexity on hot paths; an O(n²) loop on a small list is fine, on a hot path it isn't. Don't micro-optimize cold code.
- N+1 queries. A query inside a loop over rows → batch it, join it, or prefetch.
- Payload size, not just row count. What crosses the wire per operation? Big blobs, over-fetching, sending a whole row when a version number would do.
Per-stack hot-spots
Same lens, applied to the stack in play — the footgun I hit most in each:
- React / Vite: wasted re-renders → memoize (
memo/useMemo/useCallback), stable list keys, split context; virtualize long lists. Profile with the React DevTools profiler, don't guess. Rule-level detail (derive in render, derived-boolean subscriptions,content-visibility,localStoragediscipline) inreferences/react.md; chunking, pre-bundling and what hashed chunks mean at deploy time inreferences/vite-build.md. - Django: ORM N+1 →
select_related(FK) /prefetch_related(M2M); fetch only needed columns (.only()/.values()); never run a query inside a template or loop. - Flask / FastAPI: blocking I/O on an async path — a sync DB/HTTP call inside
async defstalls the event loop → use an async client or offload to a threadpool; keep CPU-bound work off the loop. - Kotlin coroutines: blocking work on the wrong dispatcher →
Dispatchers.IOfor blocking calls, wrap withwithContext; norunBlockingon hot paths; don't re-collect coldFlows needlessly.
Supabase egress — my binding limit
The Free-tier wall is egress (bytes transmitted), not DB size. Egress ≈
blob_size × updates × connected_clients. Levers, in order:
- Cap unbounded growth. Any field that grows per action (history, trash, logs) needs a hard cap — uncapped blobs grow quadratically and blow the limit.
- Don't ship the whole row on every change. Broadcast only
{version}over Realtime; fetch the full payload only when the remote version is newer (version-gated fetch). - Write-through the local cache so a client doesn't refetch its own write.
Hard challenges
When the task is flagged hard-tech: in the SPIKE, benchmark candidate approaches on representative input before committing the plan — measure, don't guess. Keep the micro-benchmark; it's the evidence the approach was chosen on merit.
Output
Report findings as location → cost (Big-O / bytes / queries) → the lever. Separate a
measured regression from a theoretical one; prefer numbers.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

