Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/damiansire/web-worker-patterns/review-prgit clone --depth 1 https://github.com/damiansire/web-worker-patternsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/damiansire/web-worker-patterns/review-pr)<a href="https://agentmods.dev/commands/damiansire/web-worker-patterns/review-pr"><img src="https://agentmods.dev/badge/commands/damiansire/web-worker-patterns/review-pr.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00037 | $0.01178 |
| Opus 5 | $0.00018 | $0.00589 |
| Sonnet 5 | $0.00007 | $0.00236 |
| Haiku 4.5 | $0.00004 | $0.00118 |
Grade A, and why
review-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Revisar PR: $1
Revisá el pull request indicado buscando solo problemas funcionales: correctitud,
performance, concurrencia y mantenibilidad. Ignorá los nits de estilo que no impactan el
comportamiento (de eso ya se ocupan Prettier y lint:boundaries).
El número de PR viene como argumento. Si está vacío, buscá un PR abierto en la rama actual.
1. Traer el contexto del PR
gh pr view <número> --json title,body,headRefName,baseRefName,files,additions,deletionsgh pr diff <número>para el diff completo.- Leé cada archivo tocado del diff — no lo hojees.
2. Áreas de foco
Evaluá el diff contra estas categorías. Reportá solo lo que tenga impacto funcional real. La fila de Web Workers es propia de este repo y es la que más importa acá.
| Categoría | Qué buscar |
|---|---|
| Web Workers | Race conditions; protocolo de postMessage mal tipado o desincronizado (mensajes sin discriminante, respuestas sin correlación); ownership de Transferable (un ArrayBuffer transferido queda detached del lado emisor); SharedArrayBuffer/Atomics sin los headers COOP/COEP o sin fallback; workers/MessagePort que no se terminan (terminate()/close()) → leaks. |
| Regla de oro / capas | core/ importando algo de themes/ (va en un solo sentido). La lógica de workers debe vivir en core/domain/workers/, nunca en un theme. |
| Estado y ciclo de vida | El estado debe sobrevivir al cambio de theme (un worker corriendo sigue). Estado mutable a nivel módulo; limpieza faltante en ngOnDestroy. |
| Bugs de lógica | Off-by-one, condiciones invertidas, código inalcanzable, fallas silenciosas. |
| Type safety | Casts inseguros, huecos en la discriminación de uniones de mensajes, fugas de any, genéricos incorrectos. |
| Performance | Ráfagas de postMessage que disparan N reconciliaciones (drená por frame / coalescing por scope); copias innecesarias donde corresponde transferir; O(n²) evitable. |
| Contratos de API | Cambios de comportamiento silenciosos en el contrato de mensajes shared; manejo de errores incorrecto en los bordes worker↔main. |
| Cobertura de tests | ¿Los tests ejercitan de verdad los paths que cambiaron? La lógica pura del worker (*.worker.logic.ts) debe testearse sin Worker real (jsdom no los soporta). |
| i18n | Si se sumó contenido, ¿están las tres claves (es/en/pt) y son neutrales (sin chrome de theme)? |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 72 lines · 37 tokens per session scan A f304112f969c
review-pr is a command published in the GitHub repository damiansire/web-worker-patterns (175 stars, last pushed 18d ago), licensed MIT. It adds 37 tokens to every session and 1,178 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
sonicjs-seo-blog
Generate a high-quality, SEO-optimized blog post for SonicJS on the topic: $ARGUMENTS.
upgrade-webkit
Upgrade Bun's WebKit fork to the latest upstream version of WebKit.
dedupe
Find duplicate GitHub issues.
hatch3r-benchmark
Run and analyze performance benchmarks. Compare results against baselines, identify regressions, and produce performance reports.
workflow
Build a feature as a workflow, not an agentic loop — design stages/signals/budgets with the user, front-load contract + invariants, author with polygen, declare effects, prove the anti-loop rules with check-effects, and stand it up under polyrun.
implement-fix
Minimal pipeline for test-fixing tasks.