← Back to Skills Marketplace
14
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install canvas-poster
Description
服务端海报生成引擎。基于 @napi-rs/canvas,声明式生成数据看板、战报、对比图等长图海报。 支持 KPI 卡片、柱状图、饼图、表格、建议卡片等 Section 类型。 当用户提到"生成海报"、"做看板"、"长图"、"数据可视化图"、"生成图表"时使用。 也供其他 Skill 作为依赖调用。
README (SKILL.md)
canvas-poster
服务端长图海报生成引擎,基于 @napi-rs/canvas。
快速开始
cd skills/canvas-poster && npm install
node examples/demo.js /tmp/my-poster.png
核心用法:Section DSL
const { buildPoster } = require('./lib/builder');
buildPoster({
width: 800,
header: {
bg: '#1e40af',
title: '📊 数据看板',
subtitle: '2026年3月',
},
sections: [
{
type: 'kpi-cards',
title: '📊 概览',
cards: [
{ label: '总费用', value: '¥92.2万', color: 'red' },
{ label: '人数', value: '745人' },
{ label: '人均', value: '¥1,238' },
{ label: '达成率', value: '87.2%', color: 'green' },
],
},
{
type: 'bar-chart',
title: '💼 费用结构',
bars: [
{ name: '住宿费', value: 380700, color: '#3b82f6' },
{ name: '交通费', value: 290000, color: '#22c55e' },
],
},
{
type: 'pie-chart',
title: '🗺️ 路线分布',
slices: [
{ name: '北京→武汉', value: 180000 },
{ name: '北京→上海', value: 120000 },
],
},
{
type: 'table',
title: '⚠️ 异常分析',
headers: ['部门', '异常金额', '占比'],
rows: [
['AI应用中心', '¥64,121', '7.0%'],
],
},
{
type: 'tips',
title: '💡 管理建议',
items: ['建议1', '建议2', '建议3'],
},
],
footer: '🦞 自动生成',
output: '/tmp/poster.png',
});
Section 类型
| 类型 | 说明 | 数据字段 |
|---|---|---|
kpi-cards |
KPI 卡片组(2×N 网格) | cards: [{label, value, color?, sub?}] |
bar-chart |
横向柱状图 | bars: [{name, value, color?, pct?}] |
pie-chart |
饼图/环图 + 图例 | slices: [{name, value, pct?}], donut?: boolean|number, center?: string |
line-chart |
折线图(多线+图例) | lines: [{name, data: number[], color?}], xLabels?: string[], showDots?: boolean, showLegend?: boolean |
area-chart |
面积图 | areas: [{name, data: number[], color?}], xLabels?: string[], opacity?: number, showDots?: boolean, showLegend?: boolean |
scatter-chart |
散点图 | points: [{x, y, color?}], dotRadius?: number |
table |
表格 | headers: string[], rows: string[][] |
tips |
建议卡片(绿色框) | items: string[] |
divider |
分隔线 | 无需数据 |
核心模块
lib/core.js— 通用绘制工具(圆角矩形、饼图、柱状图、格式化)lib/builder.js— Section DSL → Canvas 构建器
发图到飞书
IM 图片上传有 ECONNRESET 问题,推荐方案:
- 生成 PNG → 上传飞书云盘 → 开权限 → 发链接
- 或嵌入飞书文档直接预览
node examples/demo.js /tmp/poster.png
Usage Guidance
This skill looks appropriate for generating dashboard/poster PNGs. Before installing, be comfortable with npm downloading the canvas dependency, choose safe output paths, and only upload or share generated images to Feishu after confirming the intended recipients and permissions.
Capability Analysis
Type: OpenClaw Skill
Name: canvas-poster
Version: 1.0.0
The skill is a legitimate server-side poster and dashboard generation engine based on the @napi-rs/canvas library. The code in lib/builder.js and lib/core.js implements a declarative DSL for rendering charts, tables, and KPI cards into PNG images without any evidence of malicious intent, data exfiltration, or unauthorized network activity. File system operations are restricted to reading configuration data and writing the final image output as expected for this type of utility.
Capability Assessment
Purpose & Capability
The documentation and code consistently describe generating PNG posters and dashboards from a declarative section DSL; no credential use, hidden network exfiltration, or unrelated account access is evidenced.
Instruction Scope
The skill includes a Feishu sharing workflow, but only as documented guidance and not implemented automatic behavior; users should confirm sharing scope before uploading generated business data.
Install Mechanism
Although registry metadata says there is no install spec, SKILL.md and package files show an npm-based setup with a native canvas dependency. This is expected for the purpose but should be treated as normal package-install trust review.
Credentials
The skill writes generated PNG files to a configured output path, which is appropriate for an image generator but users should choose safe paths to avoid accidental overwrites.
Persistence & Privilege
No persistence, background workers, credential storage, privileged configuration changes, or autonomous long-running behavior are shown in the provided artifacts.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install canvas-poster - After installation, invoke the skill by name or use
/canvas-poster - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
🚀 Initial Release: Introduced the canvas-poster skill.
💼 Built for Professional Scenarios: Highly optimized for generating long-form data posters, making it the ideal tool for financial analysis, business analysis, and investment analysis reports.
🛠 Core Engine: Provides a robust server-side rendering engine powered by @napi-rs/canvas.
📊 Declarative UI: Supports declarative creation of complex dashboards, analytical reports, and comparison charts.
🧩 Rich Components: Includes multiple built-in section types such as KPI cards, bar charts, pie charts, data tables, and tip cards.
📐 Flexible Composition: Features a dedicated Section DSL to easily arrange and layout content for long-form infographics.
🔌 Highly Extensible: Designed to be used standalone or seamlessly integrated as a core dependency for other skills.
Metadata
Frequently Asked Questions
What is Canvas Poster?
服务端海报生成引擎。基于 @napi-rs/canvas,声明式生成数据看板、战报、对比图等长图海报。 支持 KPI 卡片、柱状图、饼图、表格、建议卡片等 Section 类型。 当用户提到"生成海报"、"做看板"、"长图"、"数据可视化图"、"生成图表"时使用。 也供其他 Skill 作为依赖调用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 14 downloads so far.
How do I install Canvas Poster?
Run "/install canvas-poster" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Canvas Poster free?
Yes, Canvas Poster is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Canvas Poster support?
Canvas Poster is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Canvas Poster?
It is built and maintained by zz (@zhaoweismydd-cloud); the current version is v1.0.0.
More Skills