node-lynx
하는 일
이 스킬은 어시스턴트에게 페이지 렌더링, 스크린샷, 스모크 테스트를 위한 로컬 Lynx 실행 환경을 제공합니다. Lynx 앱을 만들거나 확인하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓기기를 열지 않고 Lynx 번들의 스크린샷을 찍고 싶을 때.
- ✓Mac의 창에서 Lynx 앱을 미리 보고 싶을 때.
- ✓Node.js에서 렌더링된 Lynx 페이지를 검사하는 자동화가 필요할 때.
스킬 링크
https://github.com/lynx-family/lynx/blob/develop/oliver/node-lynx/skills/node-lynx/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Lynx 갤러리 샘플 앱을 휴대폰 크기로 스크린샷 찍어서 파일로 저장해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
어시스턴트는 너비, 높이, 출력 경로를 넣어 node-lynx 명령줄 도구를 실행합니다. 로컬 번들을 렌더링할 수도 있고, 더 깊은 점검을 위해 JavaScript 인터페이스를 쓸 수도 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
사용하려면 Mac이 필요한가요?
스크린샷은 화면 없이 실행되므로 필요하지 않습니다. 미리보기 창은 macOS에서만 사용할 수 있습니다.
로컬 앱을 렌더링할 수 있나요?
네. 웹의 번들 링크뿐 아니라 로컬 템플릿 파일도 불러올 수 있습니다.
기본 샘플은 무엇을 보여 주나요?
기본적으로 Lynx 예제 사이트의 Lynx 갤러리 샘플 번들을 불러옵니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 15k
- 순위
- #10922
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.