AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

De5 Lowlevel Js

skill-rakibulism-agent-skills-os-de5-lowlevel-js · by rakibulism

Track 5 rail — low-level JavaScript performance. Typed arrays (Float32Array) for bulk numeric data, zero-allocation render loops and GC pressure, Web Workers with transferable ArrayBuffers and OffscreenCanvas, the canonical requestAnimationFrame ticker with dt clamping and teardown, and JIT-friendly micro-patterns. Use whenever writing performance-critical JavaScript for visual work — particle st…

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-rakibulism-agent-skills-os-de5-lowlevel-js

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-rakibulism-agent-skills-os-de5-lowlevel-js)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of De5 Lowlevel Js? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Low-Level JavaScript Performance

Bare-metal efficiency for the code that runs 60–120 times per second.

Typed Arrays for Bulk Numeric Data

Particles/physics state in Float32Array, not object arrays:

// Interleaved, stride 4: [x, y, vx, vy] × N
const P = new Float32Array(N * 4);
for (let i = 0; i < N * 4; i += 4) {
  P[i]   += P[i+2] * dt;   // x += vx·dt
  P[i+1] += P[i+3] * dt;
}

Contiguous memory → cache-friendly → 2–10× faster iteration, zero GC pressure, and directly uploadable to WebGL buffer attributes. Structure-of-arrays (one array per attribute) when attributes update at different rates.

Zero Allocation in Loops

No object/array/closure creation inside RAF: every allocation feeds the GC, and GC pauses = dropped frames (the signature: a hitch every few seconds, sawtooth memory graph).

  • Preallocate scratch objects (const _v = {x:0, y:0}) and reuse.
  • No .map/.filter/.slice in loops (allocate); indexed for over cached length.
  • No template strings/logging per frame; avoid spreading and destructuring fresh objects in hot paths.
  • Verify: DevTools Memory → Allocation instrumentation while animating — a clean loop shows a flat line.

Web Workers — main thread renders, workers compute

Heavy math (N-body physics, image processing, pathfinding) off the main thread:

worker.postMessage(buffer, [buffer]);            // TRANSFER (zero-copy), not clone
  • SharedArrayBuffer for continuous shared state (requires COOP/COEP headers).
  • OffscreenCanvas: canvas.transferControlToOffscreen() → the entire render loop lives in the worker; the main thread stays free for input/DOM.
  • Design rule: main thread budget goes to input + DOM writes; anything else that exceeds ~2ms/frame is a Worker candidate.

The Canonical Ticker

One RAF loop per app; subsystems subscribe — never one RAF per component.

let rafId, last = performance.now();
function frame(now) {
  const dt = Math.min((now - last) / 1000, 1 / 30);   // clamp: tab-switch safety
  last = now;
  update(dt);        // physics/state — no DOM reads (de5-critical-rendering-path)
  render();          // DOM/canvas writes
  rafId = requestAnimationFrame(frame);
}
rafId = requestAnimationFrame(frame);
// TEARDOWN — non-negotiable:
// cancelAnimationFrame(rafId); removeEventListener(...); dispose buffers/contexts.

Orphaned RAF loops are the top memory-leak and battery-drain source in creative sites. Pause on document.visibilitychange and when offscreen (IntersectionObserver).

JIT Micro-Patterns

Keep hot functions monomorphic (same argument shapes every call). x | 0 beats Math.floor in hot loops; manual sqrt(x*x + y*y) beats Math.hypot; compare squared distances. Micro-optimizations apply only inside proven-hot loops — profile first (de7-profiling).

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.