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/migrate-example.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/migrate-example)<a href="https://agentmods.dev/commands/damiansire/web-worker-patterns/migrate-example"><img src="https://agentmods.dev/badge/commands/damiansire/web-worker-patterns/migrate-example/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/migrate-example"><img src="https://agentmods.dev/badge/commands/damiansire/web-worker-patterns/migrate-example.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.00029 | $0.01264 |
| Opus 5.5 | $0.00012 | $0.00506 |
| Sonnet 5.5 | $0.00006 | $0.00253 |
| Haiku 4.5 | $0.00003 | $0.00126 |
Grade A, and why
migrate-example 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 23d 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 — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrar ejemplo: $1
Codifica el pipeline por-ejemplo que ya repetimos en los ejemplos 04–13. Seguilo en orden;
no saltees el loop de design-review. La regla de oro manda: el dominio se escribe una
vez en core/, la presentación vive en themes/. core/ NUNCA importa de themes/.
0. Encuadre
- Si
$1está vacío, abrísrc/app/core/domain/examples/examples.registry.tsy tomá el primer ejemplo sin migrar (sin@caseen los layouts / sin entrada de contenido). - Mirá el worker legacy correspondiente y decidí el
DemoKind(o si hace falta uno nuevo). - Anotá el plan con
TodoWriteantes de tocar código.
1. Dominio (se escribe UNA vez, en core/)
- Worker neutral: portá el legacy a
core/domain/workers/<id>.worker.ts. Extraé la lógica pura a<id>.worker.logic.tspara poder testearla sin Worker real (jsdom no los soporta). El worker queda como cáscara fina sobre la lógica pura. - Service:
core/services/<algo>-demo.service.ts,@Injectable({ providedIn: 'root' }), estado en signals. Seam de tiempo inyectable (clock/stepDelayMs) para los specs. Requisito duro: el estado sobrevive al cambio de theme (un worker corriendo sigue). - DemoKind: si el ejemplo no encaja en una variante existente, sumá el literal a la
union en
core/domain/examples/example.model.ts. - Registry: entrada en
examples.registry.tsconworkerFactory/sharedWorkerFactoryy los snippets de código neutrales que muestra el code-block. - Test de dominio (antes de UI): spec del
.worker.logic.tsy/o del service con un fake-worker. Si tocaste dominio, hay test que lo cubre.npm testverde.
2. i18n (contenido neutral)
- Agregá
examples.$1.*apublic/i18n/es.json(único idioma registrado hoy;availableLangsensrc/app/app.config.ts). El contenido educativo es neutral; sólo el chrome de cada theme tiene strings propios.
3. Presentación (theme default)
- Sumá el
@case '<DemoKind>'en el example-layout desrc/app/themes/default/. - El theme
midnightreusa el example-layout dedefault(vertheme.registry.ts/midnight.theme.ts), así que no hace falta duplicar nada ahí. Si más adelante un theme nuevo tiene presentación propia, sumá el mismo@caseen su layout. - Visualización sin colores/fuentes literales, siempre tokens semánticos (
--surface,--ink,--accent,--thread-*): así el switch de theme (incluidomidnight) se ve correcto sin tocar el layout. El visualizer se resuelve por DI (THREAD_VISUALIZER). - Criterio clave: la visualización enseña el concepto SIN leer el código.
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.
- 23d ago Changed · -1 lines 30c3d13b59ba
- 1mo ago Changed · +8 lines · -1 tokens per session 3dd3e1fd14e1
- 2mo ago First seen · 69 lines · 30 tokens per session scan A e09a253d338a
migrate-example is a command published in the GitHub repository damiansire/web-worker-patterns (173 stars, last pushed 11d ago), licensed MIT. It adds 29 tokens to every session and 1,264 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
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.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.