xrk-renderer
Skill140 starsChanged 8 months agoMITView on GitHub
当你需要使用/扩展渲染器(HTML 模板渲染、截图输出)或让 AI 生成图片报表/可视化时使用。
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- .cursor/rules/vibe-learn-craft.mdcCursor rule
- .cursor/rules/xrk-core-code.mdcCursor rule
- .cursor/rules/xrk-dev-requirements.mdcCursor rule
- .cursor/rules/xrk-infrastructure.mdcCursor rule
- .cursor/rules/xrk-project.mdcCursor rule
- .cursor/rules/xrk-third-party-plugins.mdcCursor rule
- accessibility-complianceSkill
- design-system-patternsSkill
- fronted-designSkill
- immersive-short-videoSkill
- interaction-designSkill
- mobile-android-designSkill
- mobile-ios-designSkill
- react-native-designSkill
- responsive-designSkill
- ui-ux-pro-maxSkill
- visual-design-foundationsSkill
- web-component-designSkill
- xrk-agent-runtimeSkill
- xrk-ai-workflowSkill
- xrk-app-devSkill
- xrk-authSkill
- xrk-coding-styleSkill
- xrk-configSkill
- xrk-crawlSkill
- xrk-dockerSkill
- xrk-docsSkill
- xrk-github-researchSkill
- xrk-http-apiSkill
- xrk-infrastructureSkill
- xrk-llmSkill
- xrk-mcpSkill
- xrk-node-runtimeSkill
- xrk-pluginsSkill
- xrk-project-overviewSkill
- xrk-runtime-utilSkill
- xrk-subserverSkill
- xrk-system-coreSkill
- xrk-taskerSkill
- xrk-v3-apiSkill
- xrk-www-compatSkill
The file
Files
权威文档与入口
- 文档:
docs/renderer.md - 基类:
src/infrastructure/renderer/Renderer.js - 渲染器目录:
src/renderers/*
你要掌握的要点
- Renderer 基类只负责:模板读写/缓存/监听(
dealTpl),具体截图逻辑由 Puppeteer/Playwright 等具体实现负责。 - 浏览器截图共用
BrowserRendererBase:唯一slotId占槽(禁止用模板 name 入队)、排队超时、priority/userTriggered用户优先槽;健康检查/重启看activeSlotCount()。僵死实例靠ensureBrowserHealthy+safeCloseBrowser(close 超时则 disconnect/SIGKILL);截图 timeout/disconnected 走handleFatalScreenshotError→restart(true),勿等整进程重启。 - 配置来源:全局
agt.browser.renderer(默认 playwright;可选 puppeteer);各渲染器data/server_bots/{port}/renderers/{type}/config.yaml,缺省从src/renderers/{type}/config_default.yaml合并。 - Playwright Chromium 不在 bootstrap 自动安装;菜单「Playwright 浏览器」或
pnpm run setup:browsers。 - 典型使用:插件中
RendererLoader.getRenderer()(无参即当前配置后端),dealTpl渲染 HTML,再renderImage输出图片。
Node 26
- 渲染器在
src/renderers/*(基础设施层);Core 插件只调用 Loader API,不修改src/infrastructure/renderer/。 - 截图输出二进制若需编码:用
toBase64()/toHex()(skillxrk-node-runtime)。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

