thedaviddias/front-end-checklist/scheduler-yield
Claude Code and agent skill by thedaviddias/front-end-checklist
- community
Checking that the SKILL.md file is still in the repository.
Use when reviewing JavaScript that performs synchronous loops over large datasets, recursive tree traversals, or bulk DOM updates that may exceed 50 ms on mid-range devices.
Install
npx vskill@latest install thedaviddias/front-end-checklist/scheduler-yieldSKILL.md
The same SKILL.md was published earlier as thedaviddias/front-end-checklist/scheduler-yield.
Use scheduler.yield() to keep the main thread responsive during long tasks
Any JavaScript task longer than 50 ms blocks the browser's main thread, preventing it from processing clicks, keyboard events, and rendering frames. Yielding between chunks of work keeps Interaction to Next Paint (INP) low and makes the page feel responsive even during heavy computation.
Quick Reference
- Tasks longer than 50 ms block input and hurt Interaction to Next Paint (INP)
- scheduler.yield() pauses execution, lets the browser handle queued input, then resumes
- Use a MessageChannel-based polyfill where scheduler.yield() is unavailable
- Apply to data processing loops, tree traversals, and bulk DOM mutations
Check
Identify synchronous loops, recursive traversals, or bulk operations in this code that could run for more than 50 ms and block user input.
Fix
Refactor long synchronous tasks to yield to the browser between chunks using scheduler.yield() with a MessageChannel fallback.
Explain
Explain why tasks longer than 50 ms hurt INP, how scheduler.yield() works, and when to use it versus Web Workers.
Code Review
Review event handlers, data transformation functions, and initialization routines for synchronous loops over large collections that could block input. Flag any loop where the total work could exceed 50 ms.
For full implementation details, code examples, and framework-specific guidance, see references/rule.md.
Rule page: https://frontendchecklist.io/rules/javascript/scheduler-yield
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/scheduler-yield/SKILL.md
Popularity
- Repository stars
- 73,050
- Repository forks
- 6,652
- 7-day trend score
- 56
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 28 Nov 2026, 3 days ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thedaviddias/front-end-checklist/scheduler-yield)