Install any skill in seconds. Free to start, no credit card required.
Get Started Free →vercel/v8-jit
V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals.
Passed 20 of 23 test cases with the skill, and 16 of 23 without it.
and 2 more in the full report
4 fixed16 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
Our stream buffering module in `src/stream-ops.ts` processes chunks during page rendering. Right now, it initializes arrays with `new Array(size)`, uses `arguments` to handle variable parameters, recreates dynamic RegExp patterns on every function call, and occasionally deletes keys from chunk metadata objects. Could you rewrite this streaming utility module in TypeScript to ensure peak execution performance in V8, and include a bulleted review checklist explaining why each change improves runtime efficiency?
| Checked | Without skill | With skill |
|---|---|---|
| The response avoids using the new Array constructor with a size argument to initialize arrays. | Missed | Passed |
| The response replaces the arguments object with rest parameters. | Passed | Passed |
| The response avoids deleting object properties to prevent hidden class transitions to dictionary mode. | Passed | Passed |
The instructions your model reads when the skill loads.
Use this skill when writing or optimizing performance-critical code paths in Next.js server internals — especially per-request hot paths like rendering, streaming, routing, and caching.
V8 compiles JavaScript through multiple tiers:
Code starts in Ignition and is promoted to higher tiers based on execution frequency and collected type feedback. Turbofan produces the fastest machine code but bails out (deopts) when assumptions are violated at runtime.
The key principle: help V8 make correct speculative assumptions by keeping types, shapes, and control flow predictable.
Every JavaScript object has an internal "hidden class" (V8 calls it a Map, the spec calls it a Shape). Objects that share the same property names, added in the same order, share the same hidden class. This enables fast property access via inline caches.
// GOOD — consistent shape, single hidden class transition chain
class RequestContext {
url: string
method: string
headers: Record<string, string>
startTime: number
cached: boolean
test cases passed, vs 16 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.