agentleFS
ViviBeriViviBeri/webcraft-pro/skills/rendering-performance/SKILL.md

rendering-performance

Skill11 starsChanged 9 days agoMITView on GitHub

Improve browser rendering when blocking resources, excessive DOM work, layout thrashing or hydration overhead delay visible and interactive content.

1 other project uses a version of this.

Adopted by

Most recently taken up by

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
  1. Distinctive:

    Use this skill when browser rendering, style calculation, layout, paint or hydration creates visible delays or jank.

    line 8
  2. Distinctive:

    Remove unnecessary render-blocking work and keep critical CSS focused without duplicating large style systems.

    line 14
  3. Distinctive:

    Prefer transform and opacity for animations when appropriate.

    line 20
  4. Distinctive:

    Do not assume SSR automatically improves every performance metric.

    line 25
  5. Distinctive:

    Avoid hiding meaningful content until client JavaScript executes.

    line 26
  6. Distinctive:

    Do not force GPU layers or add will-change without profiling.

    line 27
  7. Distinctive:

    Keep CSS selectors and DOM structure maintainable.

    line 28
  8. Distinctive:

    Avoid synchronous script execution in the critical path unless necessary.

    line 29

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rendering Performance

Use this skill when browser rendering, style calculation, layout, paint or hydration creates visible delays or jank.

Workflow

  1. Profile representative navigation and interaction flows in Chrome DevTools Performance.
  2. Identify the critical rendering path: HTML response, CSS discovery, blocking scripts, font and image dependencies.
  3. Remove unnecessary render-blocking work and keep critical CSS focused without duplicating large style systems.
  4. Reduce DOM complexity where profiling shows style, layout or memory costs.
  5. Prevent layout thrashing by batching DOM reads before writes and avoiding forced synchronous layout.
  6. Reserve dimensions for images, embeds, banners and asynchronous content to prevent shifts.
  7. Choose SSR, static rendering, streaming or client rendering based on content, personalization and interaction requirements.
  8. Reduce hydration scope and client-side work when server-rendered content does not need immediate interactivity.
  9. Prefer transform and opacity for animations when appropriate; profile compositing and memory rather than applying will-change globally.
  10. Re-test visual stability, input responsiveness and rendering cost on realistic devices.

Engineering rules

  • Do not assume SSR automatically improves every performance metric.
  • Avoid hiding meaningful content until client JavaScript executes.
  • Do not force GPU layers or add will-change without profiling.
  • Keep CSS selectors and DOM structure maintainable; optimize demonstrated bottlenecks.
  • Avoid synchronous script execution in the critical path unless necessary.
  • Preserve progressive enhancement and functionality when scripts fail.
  • Re-check accessibility and reduced-motion behavior after rendering changes.

Deliverables

Provide trace evidence, rendering bottlenecks, architectural trade-offs, selected fixes and repeatable before/after measurements.

Common AI failure mode

Failure: An agent alternates DOM layout reads and style writes inside a loop or animation callback, forcing repeated synchronous layout calculations.

Why it matters: The browser repeatedly recalculates layout on the main thread, delaying frames and input handling. The page can stutter even when the amount of DOM work appears small.

Symptoms:

  • Performance traces show repeated forced reflow or layout between script operations.
  • The same geometry is read again after a style write in the same update cycle.
  • Jank increases with the number of elements processed or during scroll and resize.

Prevention: Batch all required layout reads before writes, cache measurements for the current frame, and use observers or scheduled updates where appropriate. Avoid geometry reads after style mutations in the same loop. Re-profile the identical interaction and confirm fewer forced layouts without introducing stale measurements or visual regressions.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.