← 返回
数据分析 中文

Json Render Table

Render compact generic data tables to PNG images with json-render-cli. Use when users ask to visualize arbitrary structured rows/columns (non-ticket-specific...
使用 -render-cli 将紧凑的通用数据表渲染为 PNG 图像。当用户请求可视化任意结构的行/列数据(非工单特定数据)时使用。
sorphwer
数据分析 clawhub v0.2.0 1 版本 99914.8 Key: 无需
★ 0
Stars
📥 1,173
下载
💾 13
安装
1
版本
#latest

概述

JSON Render Table

Overview

Render generic structured data into compact table images using json-render-cli components (Column, Row, Container, Text, Badge).

Use this skill for non-ticket table use cases.

Workflow

  1. Ensure json-render is available. If missing, run npm i -g json-render-cli; if Chromium is missing, run npx playwright install chromium.
  2. Define target columns and row schema for the current dataset.
  3. Generate message JSON in memory from the table template.
  4. Pass config via process substitution (-c <(...)) to avoid temporary config files.
  5. Set screenshot.fullPage=true when row count or line wrapping is variable.
  6. Tune viewport width/height to the current content footprint before final render, and avoid oversized fixed --size.
  7. Render PNG and return output path (or Base64 only when explicitly requested).
  8. Theme mode is configured with theme.mode; use system by default, or force light / dark when needed.

Agent Coordination

  • Prefer rendering in the current (main) agent when the image must be delivered in the same turn.
  • Delegate rendering to a sub-agent only when output-path handoff is explicit and deterministic.
  • Keep rendered PNG files intact in sub-agent execution; do not delete or move them there.
  • Perform garbage collection only in the main agent, and only after delivery succeeds.

Model Routing

  • If the current assistant model is high-cost (for example, Opus-class), route simple deterministic rendering to a lower-cost fast model (for example, gemini3flash) only when Agent Coordination rules can be enforced; otherwise render in the current main agent.

Use Case Selection

  • Generic table: use references/compact-table-template.md.
  • Ticket-focused table: use json-render-ticket-table.
  • Information cards (KPI/compare/summary): use json-render-info-cards.
  • Announcement/hero cards: use json-render-announcement-cards.
  • Flow/timeline summaries: use json-render-flow-summary.

Build And Render

Use references/compact-table-template.md.

Treat the included template as an executable starter and customize columns and widths per dataset.

Default style:

  • No title area
  • Compact header + body
  • Edge-to-edge screenshot
  • Stable column widths
  • Bottom rows remain visible (screenshot.fullPage=true)

Layout Rules

  • Define columns with Row + Container and explicit widths.
  • Keep spacing compact and deterministic.
  • Use Badge only for categorical status-like fields.
  • Resize the widest column first when content overflows.
  • Keep viewport width close to the sum of column widths and avoid large horizontal slack.
  • Start from a compact viewport height and expand only when clipping appears.

Output Rules

  • Prefer -o /tmp/.png for image delivery.
  • Use -o stdout only when caller explicitly asks for Base64.
  • Avoid temporary JSON files unless explicitly requested.
  • If a sub-agent renders the PNG, return path only and skip cleanup in that sub-agent.
  • Run final PNG cleanup only in the main agent after image delivery.

Troubleshooting

  • If Chromium is missing, run: npx playwright install chromium.
  • If rendering is too wide, reduce wide columns or font size.
  • If left/right whitespace is too large, decrease viewport width or topic column width and rerender.
  • If top/bottom whitespace is too large, decrease viewport height and rerender.
  • If bottom rows are clipped, enable screenshot.fullPage=true.

版本历史

共 1 个版本

  • v0.2.0 当前
    2026-03-29 08:32 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 57,037
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,282
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,902