repo-performance-guard
Skill18 starsChanged 6 months agoMITView on GitHub
Enforce performance-safe query and rendering patterns across this Nx monorepo. Use when working on Vite freezes, Supabase overfetching, pagination, caching, CPU hotspots, memory pressure, or large seeded datasets.
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-cost-manager-reducerSkill
- api-contract-reviewerSkill
- apps-language-rulesSkill
- cli-developerSkill
- contract-dto-consistency-reviewerSkill
- database-schema-reviewerSkill
- deep-code-reviewerSkill
- docs-managerSkill
- docs-publication-managerSkill
- feature-slice-designerSkill
- github-issue-solverSkill
- grasp-ooad-reviewSkill
- language-integratorSkill
- link-workspace-packagesSkill
- mcp-managerSkill
- migration-risk-reviewerSkill
- mobile-app-designerSkill
- mobile-app-integratorSkill
- mobile-app-product-ownerSkill
- mobile-app-reviewerSkill
- mobile-language-checkerSkill
- mobile-rulesetSkill
- mobil-ui-ux-rulesetSkill
- monitor-ciSkill
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- product-owner-deciderSkill
- react-native-performance-reviewerSkill
- react-vite-performance-reviewerSkill
- release-readiness-reviewerSkill
- repo-architecture-auditorSkill
- repository-pattern-reviewerSkill
- security-reviewerSkill
- smart-commitSkill
- supabase-api-rpc-reviewerSkill
- supabase-index-trigger-reviewerSkill
- supabase-rls-security-reviewerSkill
- supabase-schema-reviewerSkill
- tailwind-ui-ux-reviewerSkill
- ui-contract-guardSkill
- test-managerSkill
- unit-test-plannerSkill
- vite-performance-engineerSkill
- link-workspace-packagesSkill
- monitor-ciSkill
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Never allow unbounded list reads.
- Distinctive: line 18
Every list query must have a hard limit.
- Distinctive: line 19
Every feed must paginate or use cursor-based incremental loading.
- Distinctive: line 20
Never select more columns than the screen needs.
- Distinctive: line 21
Never fetch child relations eagerly by default on list pages.
- Distinctive: line 22
Never rely on frontend filtering to reduce large result sets after fetch.
- Distinctive: line 24
Prefer keyset/cursor pagination for large feeds.
- Distinctive: line 26
Treat “load all rows” as a defect.
- Distinctive: line 33
If a Supabase view or RPC returns oversized payloads, prefer shrinking it or replacing it with narrower REST-compatible access patterns.
- Distinctive: line 34
Do not fix frontend freezes by only hiding UI.
- Distinctive: line 52
Add or fix hard limit and pagination.
- Distinctive: line 54
If still slow, inspect joins, RPC/view payload size, and client rerender count.
- Distinctive: line 55
Do not finalize until the screen can survive large local seed volumes without trying to hold massive arrays in memory.
- Very specific: line 59
Read references/performance-checklist.md for review criteria.
- Very specific: line 60
Read references/supabase-query-rules.md when changing repository or Supabase access code.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Repo Performance Guard
Apply this skill when editing any app or library that reads large datasets from Supabase or renders lists in Vite apps.
Core goal
Prevent the frontend from freezing or crashing when local Supabase contains large seeded datasets.
Non-negotiable rules
- Never allow unbounded list reads.
- Every list query must have a hard limit.
- Every feed must paginate or use cursor-based incremental loading.
- Never select more columns than the screen needs.
- Never fetch child relations eagerly by default on list pages.
- Never rely on frontend filtering to reduce large result sets after fetch.
- Push filtering, sorting, and limiting into Supabase queries.
- Prefer keyset/cursor pagination for large feeds.
- Cache only stable and bounded datasets.
- Treat “load all rows” as a defect.
Repo-specific gotchas
- Large local seeds in
supabase/seeds/11_*through21_*can make naive queries destroy Vite responsiveness. apps/webis the highest-risk frontend for overfetching because threads, prompts, replies, tags, reactions, and multilingual data all compound payload size.libs/data/repositoriesandlibs/data/supabaseare likely the central places where unsafe query shapes should be fixed first.- If a Supabase view or RPC returns oversized payloads, prefer shrinking it or replacing it with narrower REST-compatible access patterns.
- Do not fix frontend freezes by only hiding UI. Reduce the query size and retained state size.
Required workflow
- Inspect the screen entrypoint and identify the exact query path
- Find the repository/data access function
- Verify select list, filters, order, and hard limit
- Verify pagination strategy
- Verify relation loading strategy
- Check for duplicate fetches and init waterfalls
- Check render loops, expensive mapping, and retained arrays in React state
- Run validation before finalizing
Validation loop
- Identify the largest list on the affected screen.
- Record current query shape and page size.
- Reduce payload to the minimum viable columns.
- Add or fix hard limit and pagination.
- Re-test initial render, navigation, and incremental loading.
- If still slow, inspect joins, RPC/view payload size, and client rerender count.
- Do not finalize until the screen can survive large local seed volumes without trying to hold massive arrays in memory.
Additional resources
- Read
references/performance-checklist.mdfor review criteria. - Read
references/supabase-query-rules.mdwhen changing repository or Supabase access code.
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.

