SuperAPI AI Directory

xrk-renderer

Coding & development

View repository

Updated 11-05 17:20

About this skill

Authoritative documentation and entry points

  • Docs:docs/renderer.md
  • Base class:src/infrastructure/renderer/Renderer.js
  • Renderer directory:src/renderers/*

Key points to master

  • The Renderer base class is only responsible for: template read/write/caching/watching (dealTpl); the actual screenshot logic is handled by concrete implementations such as Puppeteer/Playwright.
  • Configuration sources: global agt.browser.renderer(puppeteer/playwright); each renderer's data/server_bots/{port}/renderers/{type}/config.yaml, merged from src/renderers/{type}/config_default.yaml by default.
  • Typical usage: in a plugin, obtain the instance via RendererLoader.getRenderer('puppeteer') , call dealTpl to render HTML, then call renderImage to output an image.

Authoritative entry points

  • Project overview:PROJECT_OVERVIEW.md
  • Code entry points:src/ and core/ corresponding subdirectories
  • Related docs:docs/ corresponding topic docs under

Applicable scenarios

  • Need to locate the implementation paths and configuration entry points of this subsystem.
  • Need to quickly provide change locations and compatibility considerations.

Non-applicable scenarios

  • Not used to replace the implementation descriptions of other subsystems.
  • Do not fabricate paths or fields when evidence is lacking.

Execution steps

  1. First confirm that the requirement falls within the responsibility boundary of this skill.
  2. Then provide the code paths, configuration paths, and key fields.
  3. Finally add risk points, verification steps, and regression scope.

Common pitfalls

  • Providing only concepts without specific file paths.
  • Not noting that code prevails when documentation and code conflict.
  • Ignoring consistency among configuration, Schema, and consuming code.