Your build starts here
Replace bracketed details with your own goal, context, and checks. Keep the first build small enough to inspect.
Investigate the expensive browser work in [interaction] with [representative input size]. Measure the current responsiveness and identify which computation causes the delay.
If a worker is appropriate, define the message contract, transferable or copied data, cancellation, errors, and cleanup. Keep direct DOM work in the interface context and reconcile worker results with the latest user request.
Verify normal completion, rapid repeated input, an outdated result, and a failed operation. Compare the same input and interaction before and after the change. Report measurements, transfer overhead where relevant, and any remaining bottleneck rather than assuming worker use alone improves performance.Make this prompt yours
Replace bracketed fields with your goal, current behavior, and relevant evidence. Keep requirements that affect the task. Check the result against the acceptance criteria you supplied.
The docs behind it
These references explain the underlying concepts and APIs. The prompt templates and project plans are original examples to adapt to your own setup.
Documentation links checked .
Editorial review · October 28, 2026
Supported: Original, unexecuted worker template. Message-based communication and lack of direct DOM access are documented; cancellation/performance still need measurement.