node-lynx
यह क्या करती है
यह स्किल असिस्टेंट को पेज रेंडर करने, स्क्रीनशॉट लेने और स्मोक टेस्ट चलाने के लिए एक लोकल Lynx रनटाइम देती है। यह उन डेवलपर्स के लिए है जो Lynx ऐप बनाते या जाँचते हैं।
कब इस्तेमाल करें
- ✓जब आप बिना डिवाइस खोले Lynx बंडल का स्क्रीनशॉट चाहते हैं।
- ✓जब आप Mac पर विंडो में Lynx ऐप का प्रीव्यू देखना चाहते हैं।
- ✓जब आपको ऐसा ऑटोमेशन चाहिए जो Node.js से रेंडर किए Lynx पेज की जाँच करे।
Skill का लिंक
https://github.com/lynx-family/lynx/blob/develop/oliver/node-lynx/skills/node-lynx/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“फ़ोन के आकार में gallery सैंपल Lynx ऐप का स्क्रीनशॉट लीजिए और उसे एक फ़ाइल में सेव कीजिए।”
हर हफ़्ते 5 नई skills, 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 examples साइट से एक Lynx gallery सैंपल बंडल लोड करता है।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।