perf-review
Skill1 starsChanged 7 months agoMITView on GitHub
Static performance review of Lightning Web Components — bundle size, render-blocking imports, @wire waterfall, large templates, missing virtualization, unnecessary re-renders. Reports per-component findings and an aggregate summary.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- jpicklyk/task-orchestratortheir own version, first seen Oct 17, 2026
- octanejs/octanetheir own version, first seen Oct 9, 2026
- DataDog/dd-trace-javatheir own version, first seen Oct 8, 2026
- Seriora-Research/seri-agenttheir own version, first seen Sep 5, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- octanejs/octane★ 1.5ksame name
- DataDog/dd-trace-java★ 739same name
- jpicklyk/task-orchestrator★ 214same name
- Seriora-Research/seri-agent★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- adrSkill
- agent-deploySkill
- agent-discoverSkill
- agent-eval-trendSkill
- agent-exchange-listSkill
- agent-specSkill
- agent-testSkill
- agent-vs-flow-vs-apexSkill
- before-vs-after-triggerSkill
- code-reviewSkill
- complexitySkill
- coverage-trendSkill
- dead-codeSkill
- dependency-graphSkill
- deploySkill
- destructive-changesSkill
- diff-deploySkill
- erdSkill
- field-impactSkill
- flaky-test-finderSkill
- flow-auditSkill
- flow-vs-apexSkill
- fls-auditSkill
- gateway-configSkill
- generate-docsSkill
- limit-usageSkill
- lwc-vs-reactSkill
- mcp-tool-vs-restSkill
- notifySkill
- onboardSkill
- org-diffSkill
- org-exploreSkill
- package-versionSkill
- pattern-packSkill
- permset-auditSkill
- pr-prepareSkill
- queueable-vs-batchSkill
- quick-deploySkill
- react-initSkill
- release-notesSkill
- scratch-orgSkill
- security-scanSkill
- sequence-diagramSkill
- sf-initSkill
- sharing-reviewSkill
- slack-agentSkill
- soql-analyzerSkill
- test-coverageSkill
- test-dataSkill
- test-planSkill
- trust-evalSkill
- trust-layer-auditSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 61
Search the HTML for template lwc:for|for:each blocks.
- Distinctive: line 121
Cross-link to patterns: Every finding mentions the relevant SF-N or PRJ-N
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are performing a performance review of LWCs. The review is static (file-content analysis); it doesn't run a browser. Findings are heuristic but actionable.
Read Project Config First
source "${CLAUDE_PLUGIN_ROOT}/hooks/lib/config.sh"
LWC_SRC="$(sf_config_get '.paths.lwcSource' "$ENV")"
PREFIX="$(sf_config_get '.naming.lwc.prefix' "$ENV")"
EXCLUDES_JSON="$(sf_config_get '.naming.lwc.excludePrefixes' "$ENV")"Input
$ARGUMENTS:
- (empty) — review every in-scope component
<lwc-name>— single component--ci/--format json|sarif/--out <path>
Per-component checks
1. Bundle size
js_size=$(stat -c %s "${LWC_SRC}/${name}/${name}.js" 2>/dev/null || stat -f %z ...)
html_size=...
css_size=...
total=$((js_size + html_size + css_size))| Threshold | Severity | Rule ID |
| Single JS > 30 KB | warning | PERF-LARGE-JS |
| Single HTML > 20 KB | warning | PERF-LARGE-HTML |
| Bundle (JS+HTML+CSS) > 75 KB | warning | PERF-LARGE-BUNDLE |
For oversized bundles, suggest SF-20 (Lazy-Loaded Sub-component) or SF-19 (Virtualized List).
2. @wire waterfall
Count @wire decorators in the JS file. If > 4 wires, flag:
PERF-MANY-WIRES(warning) — too many wires render-block the first paint- Suggested: combine into a single Apex aggregator, or move secondary wires behind
lwc:ifafter primary wires resolve
3. Render-blocking imports
Count top-level import statements at the file head. The LWC compiler tree-shakes, but very large bundles signal copy-paste imports or unused libraries:
PERF-MANY-IMPORTS(note) — > 30 imports
4. Static resource loading
PERF-RESOURCE-IN-CONNECTED(warning) —loadScript/loadStylecalled inconnectedCallbackinstead of after a user action; static resources are network-fetched and block first paint
5. Large lists without virtualization
Search the HTML for template lwc:for|for:each blocks. If the JS source bound to the iterable shows source-code patterns suggesting > 500 rows (e.g., a @wire to a non-paginated Apex method, or a pageSize not set):
PERF-LARGE-LIST-NO-VIRTUAL(warning) — recommend SF-1 paginated datatable or SF-19 virtualized list
6. Unnecessary re-renders
Heuristics for re-render risk:
PERF-WIRE-DEEP-OBJECT(note) —@wireresolves into a property used directly in the template (object identity changes invalidate the entire subtree). Prefer a getter that returns a stable shapePERF-TRACK-PRIMITIVE(warning) —@trackon a primitive (number/string/bool);@trackonly matters for object/array reactivityPERF-RENDER-CALLBACK-STATE(error) —renderedCallbackmutates@trackstate without aif (this._initialized) return;guard → infinite render loop risk
7. Heavy library detection
grep -E "loadScript.*((chart\\.?js|moment\\.?js|lodash|d3|three|monaco|ace|tinymce))" ...PERF-HEAVY-LIB-EAGER(warning) — recommend SF-20 lazy-loading
Output
Default Markdown:
# Performance Review: <project.name>
Components scanned: 18 (in-scope by `naming.lwc.prefix`)
Run at: 2026-04-28T14:00:00Z
## Findings
### Critical
- `PERF-RENDER-CALLBACK-STATE` — `acmeOrderForm.renderedCallback` mutates `selectedItem` without a guard
### High
- `PERF-LARGE-LIST-NO-VIRTUAL` — `acmeUserList` renders an unbounded list. Use SF-1 pagination or SF-19 virtualization
- `PERF-MANY-WIRES` — `acmeDashboard` has 7 @wire decorators; combine or sequence with lwc:if
### Medium
- `PERF-LARGE-BUNDLE` — `acmeReportBuilder` is 92 KB total (JS 60 + HTML 22 + CSS 10). Consider lazy-loading SF-20.
- `PERF-HEAVY-LIB-EAGER` — `acmeReportBuilder` loads chart.js in connectedCallback
- ...
## Bundle size summary
| Component | JS | HTML | CSS | Total |
|-----------|-----|------|-----|-------|
| acmeOrderForm | 18 KB | 6 KB | 2 KB | 26 KB |
| acmeReportBuilder | 60 KB | 22 KB | 10 KB | 92 KB ⚠️ |
| ...CI: SARIF per finding; bundle-size table emitted as a sidecar JSON if --format sarif.
Exit codes
- 0 — no error/warning findings
- 1 — any finding
- 2 — config error
Rules
- No browser, no benchmarks. This is static. The user runs Chrome DevTools / Lightning Inspector for runtime profiling
- Honor
naming.lwc.excludePrefixes. Layout-only or framework wrapper components shouldn't be flagged for size - Cross-link to patterns. Every finding mentions the relevant SF-N or PRJ-N
- Don't flag tests. Skip
__tests__/
Consumers
/argo:code-reviewrolls per-component findings into the LWC sections of the review report@architectreferences the bundle-size summary when planning new components
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.

