fec-web-workers SKILL.md skillA
fec-web-workers from bovinphang/frontend-craft is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add bovinphang/frontend-craft/fec-web-workers@git:20260611.9d7f5e4Pins git:20260611.9d7f5e4 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- bovinphang/frontend-craft
- Path
localized/zh-CN/skills/fec-web-workers/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260611.9d7f5e4, committed Jun 11, 2026
- Size
- 2,036 bytes
- Repository stars
- 22
- License
- MIT
用于将昂贵的浏览器工作移出主线程,涉及 Web Workers、SharedWorker、worker 池、Comlink、transferable objects、Vite/Webpack worker 集成或 UI 响应性修复。不要用于轻量同步工作或 DOM 操作;中文触发词包括 Web Worker、后台线程、主线程阻塞。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Web Workers ## 用途 把昂贵计算移出主线程,保持输入、滚动和动画响应。 ## 流程 1. 先确认瓶颈:任务超过约 10ms、用户输入延迟明显、FPS 下滑或大文件解析/图像处理/加密计算才考虑 Worker。 2. 选择通信模型:简单任务用 `postMessage`,函数式 RPC 用 Comlink,大量并行小任务用 Worker pool,跨 Tab 同步用 SharedWorker。 3. 设计消息协议:请求/响应类型、错误类型、取消或超时策略都要明确。 4. 传大对象时优先 Transferable Objects;不要让结构化克隆吞掉 Worker 带来的收益。 5. 在组件或页面卸载时 `terminate()`,并通过 Profiler、Performance 面板或 FPS 指标验证主线程改善。 ## 详细参考 - 需要原生 Worker 文件、构建工具导入、React 生命周期封装和清理示例时,加载 [references/basic-worker.md](references/basic-worker.md)。 - 需要 Transferable Objects、Comlink、Worker pool、SharedWorker、CSP 和 SharedArrayBuffer 注意事项时,加载 [references/advanced-workers.md](references/advanced-workers.md)。 ## 约束 - Worker 内不能访问 DOM、`window`、`document`、`alert()` 或同步 `localStorage`。 - 高频通信可能比主线程计算更慢;先测量再拆分。 - Worker 文件必须同源加载,并受 `worker-src` CSP 限制。 - 大型二进制数据优先 transfer,transfer 后原引用会失效。 - 每个 Worker 有独立 JS 堆,必须主动管理生命周期和内存。 ## 预期输出 计算密集型操作在后台线程执行,主线程输入和滚动恢复流畅,错误与取消路径明确,Worker 在卸载时被终止且无内存泄漏。
Read the whole file at its exact version.
How to install
mdr add bovinphang/frontend-craft/fec-web-workers@sha256:73946e82d72dc807The line at the top of this page pins the label git:20260611.9d7f5e4, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_625kzyulpztdtu4t)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Jun 11, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (2036 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
bovinphang/frontend-craft · 22 stars · license MIT · pushed 2026-09-26 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_625kzyulpztdtu4t GET https://markdownregistry.com/api/v1/resolve?ref=bovinphang/frontend-craft/fec-web-workers GET https://markdownregistry.com/api/v1/blob/73946e82d72dc807bf8125df5ad3ef2de2dadc660653f64b0523dd70a8c17c8e
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from bovinphang/frontend-craft
Every file in bovinphang/frontend-craft