Borrowing it
Nothing to install: this file belongs to damiansire/web-worker-patterns. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/damiansire/web-worker-patterns/main/.claude/commands/review-pr.mdgit 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00037 | $0.01189 |
| Opus 5.5 | $0.00015 | $0.00476 |
| Sonnet 5.5 | $0.00007 | $0.00238 |
| Haiku 4.5 | $0.00004 | $0.00119 |
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 1mo 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á en public/i18n/es.json (único idioma registrado hoy, ver availableLangs en app.config.ts) y es neutral (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.
- 1mo ago Changed c1e9f14e2db4
- 2mo 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 (173 stars, last pushed 11d ago), licensed MIT. It adds 37 tokens to every session and 1,189 once invoked, about $0.0001 per session on Opus 5.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
review-code
Read ALL memory bank code rules + best practices, check the files that changed, and APPLY fixes so they adhere. The active counterpart to /scan (which is read-only). Use after an AI session, before commit, to make changed files compliant.
pn-audit-security
OWASP-guided security review — auth posture, input validation, secrets, CORS, JWT, rate limiting. Surgical command for backend security. Use standalone or as part of pn-backend-audit.
refactor
Unified code, docs, and test optimization -- shape analysis, waste detection, dead code, doc redundancy.
session-catchup
Start-of-session rehydration. Reads NEXTSESSION.md + UPDATES.md tail + last 3 ADs, runs drift check on prior verification commands, proposes next move. See session-loop skill.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.