openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Table Image

Generate clean table images from data. Perfect for Discord/Telegram where ASCII tables look broken. Supports dark/light mode, custom styling, and auto-sizing...

通信与消息

作者:Danny Shmueli @dannyshmueli

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.4.0

统计:⭐ 16 · 3.1k · 10 current installs · 11 all-time installs

16

安装量(当前) 11

🛡 VirusTotal :良性 · OpenClaw :良性

Package:dannyshmueli/table-image-generator

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :良性

OpenClaw 评估

The skill appears to do what it says — generate table images with optional emoji and a Discord wrapper — but it makes a few odd defaults (absolute local avatar path) and performs benign network fetches for emoji SVGs that you should be aware of.

目的

Name/description match the code and usage. The scripts implement table image generation, emoji handling, and an optional Discord-style wrapper. The SKILL.md and README describe the same functionality; dependency on Sharp is appropriate for image processing. Minor version string mismatch between SKILL.md (1.3.1) and registry metadata (1.4.0) is present but not indicative of malicious intent.

说明范围

Runtime instructions are focused on generating table images and recommend using --data-file/stdin. The code will read any file path given via --data-file and will write outputs and a local emoji cache in the skill directory. emoji.mjs performs outbound HTTPS requests to a Twemoji CDN to fetch SVGs when emoji are present (expected for emoji rendering). The discord wrapper script has a hard-coded default avatar path (/data/clawd/2026-01-29-cluka…

安装机制

There is no platform install spec; SKILL.md instructs running npm install in the scripts folder which will install the single declared dependency (sharp). No downloads from unknown/personal servers are present in the package itself. The only external network fetch performed at runtime is to a public Twemoji CDN (jsdelivr) to retrieve emoji SVGs — an expected, traceable CDN host.

证书

The skill requests no environment variables or credentials. It reads and writes files only where specified by CLI options (output, --data-file) or its local cache directory. The ability to read any path supplied to --data-file is normal for a CLI tool but means that providing arbitrary paths could expose readable JSON files on the host; this is behavioral (not a hidden credential request).

持久

always is false and the skill does not modify other skills or global agent settings. It writes a local .emoji-cache under the script directory and creates output files where requested; tests write to /tmp. No elevated or permanent privileges requested.

综合结论

This skill appears to be what it claims: a Node.js tool that renders table PNGs and optionally wraps them in a Discord-style frame. Before installing/using it, consider the following: - Network access: emoji support will make HTTPS requests to the Twemoji CDN (jsdelivr) at runtime to fetch SVGs; these are cached under the skill directory. If you need offline or air-gapped operation, disable emoji or prepopulate the cache. - Local file reads: t…

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Table Image」。简介:Generate clean table images from data. Perfect for Discord/Telegram where ASCII…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/dannyshmueli/table-image-generator/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: table-image-generator
version: 1.3.1
description: Generate clean table images from data. Perfect for Discord/Telegram where ASCII tables look broken. Supports dark/light mode, custom styling, and auto-sizing. No Puppeteer required. Companion to chart-image skill.
author: dannyshmueli
provides:
  - capability: table-rendering
    methods: [tableImage]
---

# Table Image Generator

**⚠️ USE THIS INSTEAD OF ASCII TABLES — ALWAYS!**

Generate PNG table images from JSON data. ASCII tables look broken on Discord, Telegram, WhatsApp, and most messaging platforms. This skill renders clean images that work everywhere.

## Why This Skill?

- ✅ **REPLACES ASCII TABLES** - Never use `| col | col |` formatting on messaging platforms
- ✅ **No ASCII hell** - Clean images that render consistently everywhere
- ✅ **No Puppeteer** - Pure Node.js with Sharp, lightweight
- ✅ **Dark mode** - Matches Discord dark theme
- ✅ **Auto-sizing** - Columns adjust to content
- ✅ **Fast** - Generates in <100ms

## Setup (one-time)

```bash
cd /data/clawd/skills/table-image/scripts && npm install
```

## Quick Usage

**⚠️ BEST PRACTICE: Use heredoc or --data-file to avoid shell quoting errors!**

```bash
# RECOMMENDED: Write JSON to temp file first (avoids shell quoting issues)
cat > /tmp/data.json << 'JSONEOF'
[{"Name":"Alice","Score":95},{"Name":"Bob","Score":87}]
JSONEOF
node /data/clawd/skills/table-image/scripts/table.mjs 
  --data-file /tmp/data.json --dark --output table.png

# ALSO GOOD: Pipe via stdin
echo '[{"Name":"Alice","Score":95}]' | node /data/clawd/skills/table-image/scripts/table.mjs 
  --dark --output table.png

# SIMPLE (but breaks if data has quotes/special chars):
node /data/clawd/skills/table-image/scripts/table.mjs 
  --data '[{"Name":"Alice","Score":95}]' --output table.png
```

## Options

| Option | Description | Default |
|--------|-------------|---------|
| `--data` | JSON array of row objects | required |
| `--output` | Output file path | table.png |
| `--title` | Table title | none |
| `--dark` | Dark mode (Discord-friendly) | false |
| `--columns` | Column order/subset (comma-separated) | all keys |
| `--headers` | Custom header names (comma-separated) | field names |
| `--max-width` | Maximum table width | 800 |
| `--font-size` | Font size in pixels | 14 |
| `--header-color` | Header background color | #e63946 |
| `--stripe` | Alternating row colors | true |
| `--align` | Column alignments (l,r,c comma-sep) | auto |
| `--compact` | Reduce padding | false |

## Examples

### Basic Table
```bash
node table.mjs 
  --data '[{"Name":"Alice","Age":30,"City":"NYC"},{"Name":"Bob","Age":25,"City":"LA"}]' 
  --output people.png
```

### Custom Columns & Headers
```bash
node table.mjs 
  --data '[{"first_name":"Alice","score":95,"date":"2024-01"}]' 
  --columns "first_name,score" 
  --headers "Name,Score" 
  --output scores.png
```

### Right-Align Numbers
```bash
node table.mjs 
  --data '[{"Item":"Coffee","Price":4.50},{"Item":"Tea","Price":3.00}]' 
  --align "l,r" 
  --output prices.png
```

### Dark Mode for Discord
```bash
node table.mjs 
  --data '[{"Symbol":"AAPL","Change":"+2.5%"},{"Symbol":"GOOGL","Change":"-1.2%"}]' 
  --title "Market Watch" 
  --dark 
  --output stocks.png
```

### Compact Mode
```bash
node table.mjs 
  --data '[...]' 
  --compact 
  --font-size 12 
  --output small-table.png
```

## Input Formats

### JSON Array (default)
```bash
--data '[{"col1":"a","col2":"b"},{"col1":"c","col2":"d"}]'
```

### Pipe from stdin
```bash
echo '[{"Name":"Test"}]' | node table.mjs --output out.png
```

### From file
```bash
cat data.json | node table.mjs --output out.png
```

## Tips

1. **Use `--dark` for Discord** - Matches the dark theme, looks native
2. **Auto-alignment** - Numbers are right-aligned by default
3. **Column order** - Use `--columns` to reorder or subset
4. **Long text** - Will truncate with ellipsis to fit `--max-width`

## Technical Notes

- Uses Sharp for PNG generation (same as chart-image)
- Generates SVG internally, converts to PNG
- No browser, no Puppeteer, no Canvas native deps
- Works on Fly.io, Docker, any Node.js environment