node-lynx
Qué hace
Ofrece al asistente un entorno de ejecución local de Lynx para renderizar páginas, hacer capturas y ejecutar pruebas rápidas. Está pensada para desarrolladores que crean o revisan apps de Lynx.
Cuándo usarla
- ✓Cuando quieres una captura de un paquete de Lynx sin abrir un dispositivo.
- ✓Cuando quieres ver una vista previa de una app de Lynx en una ventana de un Mac.
- ✓Cuando necesitas automatización que inspeccione una página de Lynx renderizada desde Node.js.
Link de la skill
https://github.com/lynx-family/lynx/blob/develop/oliver/node-lynx/skills/node-lynx/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Haz una captura de la app de ejemplo de galería de Lynx con tamaño de teléfono y guárdala en un archivo.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El asistente ejecuta la herramienta de línea de comandos node-lynx con un ancho, un alto y una ruta de salida. También puede renderizar un paquete local o usar la interfaz de JavaScript para comprobaciones más profundas.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Node Lynx
Use node-lynx as a local Lynx runtime for screenshots, preview windows, smoke tests, DebugRouter OpenCard sessions, and automation that needs to inspect or interact with a rendered Lynx page from Node.js.
Default sample template URL:
https://lynxjs.org/lynx-examples/gallery/dist/GalleryComplete.lynx.bundle
CLI
Prefer the CLI for one-off screenshots, quick template validation, and simple preview sessions.
Show available options:
node-lynx --help
Capture a headless screenshot and exit:
node-lynx render \
"https://lynxjs.org/lynx-examples/gallery/dist/GalleryComplete.lynx.bundle" \
--width 268 \
--height 469 \
--dpr 2 \
--output ./gallery.png \
--timeout 30000 \
--screenshot-delay 500 \
--no-debug-router
Render a local bundle:
node-lynx render \
--template ./dist/main/template.js \
--width 390 \
--height 844 \
--output ./node-lynx-local.png \
--no-debug-router
Open a visible preview window on macOS:
node-lynx preview \
"https://lynxjs.org/lynx-examples/gallery/dist/GalleryComplete.lynx.bundle" \
--width 268 \
--height 469 \
--dpr 2 \
--title "Node Lynx Preview"
Start a DebugRouter-backed session without an initial template:
node-lynx render
CLI rules:
- Use
renderfor headless screenshots and automation. - Use
previewonly on macOS; it creates an AppKit window. - Use
--template <path>for local bundles and--url <url>for remote bundles. A positionalhttp://orhttps://input is treated as a remote bundle URL. - Use
--widthand--heightas CSS pixel viewport values. - Use
--dpror--device-pixel-ratioto control output scale; the PNG pixel size iswidth * dprbyheight * dpr. - Use
--timeout <ms>for bundle download, template load, CDP calls, and first frame submission timeouts. - Use
--screenshot-delay <ms>to wait after the first frame before capture. This defaults to100; use a larger delay for image-heavy or network-heavy pages. - Pass
--no-debug-routerfor CI or one-shot screenshot commands that should exit immediately after writing the PNG. - Omit
--no-debug-routerwhen you need DebugRouter/OpenCard. Without an initial template,renderwaits for DebugRouter OpenCard.previewalso waits for OpenCard without creating an initial window. - OpenCard only loads public http(s) URLs by default. Pass
--allow-any-open-card-source(API:allowAnySource: true) to load local files or a loopback/private dev server, only on a trusted network.
TypeScript API
Prefer the API when the task needs programmatic setup, repeated captures, global props, CDP calls, input simulation, or custom lifecycle handling.
Import from the node-lynx package declared by the target project. For public npm usage this is typically:
import { HeadlessLynxView } from '@lynx-js/node-lynx';
Render a remote template to PNG:
import { writeFile } from 'node:fs/promises';
import { HeadlessLynxView } from '@lynx-js/node-lynx';
const templateUrl =
'https://lynxjs.org/lynx-examples/gallery/dist/GalleryComplete.lynx.bundle';
const view = new HeadlessLynxView({
width: 268,
height: 469,
devicePixelRatio: 2,
timeoutMs: 30000,
});
try {
await view.loadTemplateFromUrl(templateUrl, {
initialData: { source: 'node-lynx' },
globalProps: { theme: 'light' },
});
const png = await view.screenshot({ settleMs: 500 });
await writeFile('./gallery.png', png);
} finally {
view.destroy();
}
Render a local bundle buffer. Always pass a file URL so relative resources have the right base URL:
import { readFile, writeFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import { pathToFileURL } from 'node:url';
import { HeadlessLynxView } from '@lynx-js/node-lynx';
const templatePath = resolve('./dist/main/template.js');
const view = new HeadlessLynxView({ width: 390, height: 844 });
try {
await view.loadTemplate(await readFile(templatePath), {
url: pathToFileURL(templatePath).href,
});
await writeFile('./node-lynx-local.png', await view.screenshot());
} finally {
view.destroy();
}
Inspect the DOM through CDP:
const responseText = await view.invokeCDPFromSDK(
JSON.stringify({
id: 1,
method: 'DOM.getDocument',
params: { depth: -1, pierce: true },
})
);
const response = JSON.parse(responseText);
Update runtime data after load:
view.updateData({ selected: true
Preguntas frecuentes
¿Necesito un Mac para usarla?
No para las capturas, que se hacen sin interfaz gráfica. La ventana de vista previa solo está disponible en macOS.
¿Puede renderizar una app local?
Sí. Puede cargar un archivo de plantilla local, además de un enlace a un paquete en la web.
¿Qué muestra el ejemplo por defecto?
Por defecto carga un paquete de ejemplo de galería de Lynx desde el sitio de ejemplos de Lynx.
Detalles
Descripción original del autor
Use this skill when a task needs to run Lynx bundles with the node-lynx CLI, capture screenshots, open a macOS preview window, use DebugRouter OpenCard, inspect rendered content through CDP, or integrate node-lynx through JavaScript or TypeScript APIs.
repo: lynx-family/lynx
Popularidad
- Estrellas en GitHub
- 15 mil
- Posición en el ranking
- #10922
- Licencia
- Apache-2.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
Skills parecidas
angular-developer
280 milAyuda a tu agente con código de Angular y la estructura del proyecto. Útil para empezar proyectos, crear partes de código o mejorar el rendimiento y la accesibilidad.
frontend-a11y
280 milAyuda a tu agente a hacer que las interfaces web sean accesibles para todos. Asegura que sitios y apps funcionen bien con lectores de pantalla y navegación por teclado.
frontend-patterns
280 milHace que tu agente aplique patrones modernos en desarrollo frontend. Optimiza el rendimiento, gestiona el estado y sigue buenas prácticas en React y Next.js.