Explains the JavaScript event loop, microtask vs macrotask ordering, and why blocking the loop freezes UI or servers. Use when debugging execution order surprises or unresponsive pages.
JavaScript runs your code on a single thread with an event loop: it runs one task to completion, then drains queued work, then repeats. Almost every "why did this run in that order" and "why did the UI freeze" bug is explained by how that loop schedules work.
.then, await continuations, queueMicrotask) and
macrotasks (setTimeout, I/O callbacks, events). Understanding this
ordering resolves most surprises.Promise.resolve().then(...) runs before a setTimeout(..., 0)
queued earlier. This is why promise chains resolve "immediately" and
why the ordering of mixed promise/timeout code is not source order..then or await that never yields to a
macrotask) blocks rendering and I/O as effectively as a sync loop,
because the microtask queue drains fully before anything else. Yield
to a macrotask (setTimeout) when doing long iterative async work.queueMicrotask to defer
within the current cycle; setTimeout(fn, 0) to yield to rendering and
I/O; requestAnimationFrame to run before the next paint (browser UI
work); requestIdleCallback for low-priority background work. Each
schedules into a different phase.console.log after an await
runs later than the sync code following the call, because everything
after await is a queued microtask (see js-async-patterns).process.nextTick, phase order); the microtask-vs-macrotask
core transfers, the fine print does not.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Not loaded · from ai-skills-commands
Claude Code won't load this skill
It ships in ai-skills-commands at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
npx claudepluginhub amey-thakur/ai-skills --plugin ai-skills-commands1,000 skills in this plugin
/ab-test-designDesign product experiments with real hypotheses, honest sample-size math, guardrails, and peeking discipline. Use when validating a change by experiment or reviewing a test before believing its result./accessibility-reviewAudit a UI for real accessibility, keyboard-first, with concrete failures and fixes rather than checkbox compliance. Use when reviewing or building any user interface./accessibility-specialist-roleOperate as an accessibility specialist who audits against WCAG, trains teams to stop shipping the same defects, and owns the compliance sign-off. Use when a product needs to be usable with a keyboard, a screen reader, or magnification and someone must certify it before launch.Other plugins' skills for the same job