javascript-performance
Skill11 starsChanged 9 days agoMITView on GitHub
Reduce JavaScript cost when bundles, hydration, main-thread work or third-party scripts delay loading and interaction.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- document-head-seoSkill
- font-performanceSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
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 8
Use this skill when JavaScript increases transfer size, delays rendering, blocks input or creates avoidable runtime work.
- Distinctive: line 15
Verify tree shaking against actual production output.
- Distinctive: line 18
Avoid repeated synchronous layout reads and writes.
- Distinctive: line 27
Prefer removing unnecessary work over micro-optimizing syntax.
- Distinctive: line 29
Avoid loading every route's code in the initial entry chunk.
- Distinctive: line 30
Do not split into excessive tiny chunks that create request overhead or waterfall dependencies.
- Distinctive: line 32
Use production builds for bundle analysis and realistic runtime profiling.
- Distinctive: line 33
Document any trade-off between initial load, interaction latency and cache reuse.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
JavaScript Performance
Use this skill when JavaScript increases transfer size, delays rendering, blocks input or creates avoidable runtime work.
Workflow
- Establish bundle and runtime baselines for representative routes.
- Inspect dependency and bundle composition. Identify duplicated packages, large dependencies, unused exports and expensive entry points.
- Split code along meaningful route and interaction boundaries. Defer non-critical features until needed.
- Verify tree shaking against actual production output; do not assume source-level imports guarantee removal.
- Reduce main-thread work:
- Break up long tasks and schedule non-urgent work.
- Avoid repeated synchronous layout reads and writes.
- Debounce or throttle high-frequency handlers where semantics permit.
- Move suitable CPU-heavy work to Web Workers when transfer and coordination costs are justified.
- Review hydration and client rendering. Avoid shipping interactive JavaScript for static content without a clear need.
- Audit third-party scripts for business value, loading strategy, consent requirements and measurable cost.
- Re-measure transfer size, parse/compile/evaluation time, long tasks and interaction responsiveness.
Engineering rules
- Prefer removing unnecessary work over micro-optimizing syntax.
- Lazy-load optional code, but keep critical navigation and primary actions reliable.
- Avoid loading every route's code in the initial entry chunk.
- Do not split into excessive tiny chunks that create request overhead or waterfall dependencies.
- Preserve error handling, analytics requirements, security controls and accessibility behavior.
- Use production builds for bundle analysis and realistic runtime profiling.
- Document any trade-off between initial load, interaction latency and cache reuse.
Deliverables
Provide bundle evidence, dependency findings, route-level loading plan, runtime bottlenecks, measurable budgets and before/after verification.
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.

