andrassama/dsh-omp-advisor/worker-threads-delegation
Claude Code and agent skill by andrassama/dsh-omp-advisor
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Equips the advisor to review CPU-bound work offloaded to Node worker threads for message-passing overhead, lifecycle bugs, and pool misuse.
Install
npx vskill@latest install andrassama/dsh-omp-advisor/worker-threads-delegationSKILL.md
The same SKILL.md was published earlier as andrassama/dsh-omp-advisor/worker-threads-delegation.
Worker Threads Delegation
node:worker_threads moves CPU-bound work off the event loop — at the price of message passing, separate memory, and explicit lifecycle management. Reviewers check that the work is actually CPU-bound, payloads cross the boundary cheaply, and workers are pooled and terminated cleanly.
Watch for
- Worker spawned per task with no pooling (startup cost dominates).
- Large objects structured-cloned per message where transferable buffers would do.
- Workers never terminated on shutdown, blocking clean process exit.
- SharedArrayBuffer used without understanding Atomics requirements.
- CPU work sent to workers that is smaller than the messaging overhead.
- No error handling for worker
errorevents orexitCode != 0. - Worker files resolved by relative paths that break under bundlers.
- Tasks queued without backpressure when all workers are busy.
Best practices
- Pool workers (one per core is a sane default) and reuse across tasks.
- Use
transferListfor ArrayBuffers; avoid cloning large payloads. - Profile first: only delegate work that measurably stalls the event loop.
- Handle worker
errorand non-zeroexit; requeue or fail the task. - Terminate pools on shutdown with a drain timeout, then
worker.terminate(). - Keep the worker API task-shaped (one request → one response), not chatty.
- Resolve worker scripts with absolute paths (
new URL('./w.js', import.meta.url)). - Bound the task queue and reject/queue-overflow deliberately under load.
Quick checklist
- [ ] Delegated work is verified CPU-bound and worth the IPC cost.
- [ ] Workers pooled and reused, not spawned per task.
- [ ] Large payloads use transferables, not structured clone.
- [ ] Worker error and non-zero exit handled per task.
- [ ] Pool drains and terminates cleanly on shutdown.
- [ ] Worker script paths bundler-safe (absolute resolution).
- [ ] Task queue has bounded backpressure.
- [ ] Shared memory (if any) guarded by Atomics.
Security
- Security scanPassed, 95 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/worker-threads-delegation/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
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/andrassama/dsh-omp-advisor/worker-threads-delegation)