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

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.

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 JavaScript increases transfer size, delays rendering, blocks input or creates avoidable runtime work.

    line 8
  2. Distinctive:

    Verify tree shaking against actual production output.

    line 15
  3. Distinctive:

    Avoid repeated synchronous layout reads and writes.

    line 18
  4. Distinctive:

    Prefer removing unnecessary work over micro-optimizing syntax.

    line 27
  5. Distinctive:

    Avoid loading every route's code in the initial entry chunk.

    line 29
  6. Distinctive:

    Do not split into excessive tiny chunks that create request overhead or waterfall dependencies.

    line 30
  7. Distinctive:

    Use production builds for bundle analysis and realistic runtime profiling.

    line 32
  8. Distinctive:

    Document any trade-off between initial load, interaction latency and cache reuse.

    line 33

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

JavaScript Performance

Use this skill when JavaScript increases transfer size, delays rendering, blocks input or creates avoidable runtime work.

Workflow

  1. Establish bundle and runtime baselines for representative routes.
  2. Inspect dependency and bundle composition. Identify duplicated packages, large dependencies, unused exports and expensive entry points.
  3. Split code along meaningful route and interaction boundaries. Defer non-critical features until needed.
  4. Verify tree shaking against actual production output; do not assume source-level imports guarantee removal.
  5. 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.
  6. Review hydration and client rendering. Avoid shipping interactive JavaScript for static content without a clear need.
  7. Audit third-party scripts for business value, loading strategy, consent requirements and measurable cost.
  8. 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.

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.