文本生图

SKILL效率
效率 未标注权限 许可证不明确
安装这个技能

将文字描述转化为有设计感的 HTML 可视化图表并自动截图输出 PNG,支持 15 种图表类型(流程、时序、泳道、对比、时间线、架构、数据看板、甘特图、组织、漏斗、思维导图、矩阵、看板、清单、金句)和 9 种视觉风格。当用户想把任何结构化信息变成图表或可视化图片时使用,触发看语义意图而非关键词:"画个图/做个图/出张图/可视化一下"或直接点名图表类型(流程图、时序图、泳道图、对比表、数据看板、思维导图等)均适用。注意:本技能只产出结构化图表/信息图,不处理照片、插画、艺术创作等创意位图。

一句话选型结论

按资料字段整理

文本生图是效率类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类效率 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_3643e790/text2png
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

效率
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_3643e790仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-11-06上游最后核验时间 · 数据更新 2026-11-06
正文体量14.4 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
整理待办与日程

把零散任务收进清单,排出优先级。

批量处理重复任务

把固定动作做成模板,重复执行。

把流程写成清单

把口头流程整理成可复用的步骤。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在效率场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
文本生图当前 未标注权限 未标注 未标注 未标注 有
Nano PDF 文档 联网访问 ClawHub 市场 424.9 万 OpenClaw 有
自动更新程序 浏览器控制 ClawHub 市场 296.4 万 OpenClaw 有
Gemini 助手 联网访问 ClawHub 市场 254.7 万 OpenClaw 有
word DOCX 文档 联网访问 ClawHub 市场 239.6 万 OpenClaw 有
Excel XLSX 前端 联网访问 ClawHub 市场 227.0 万 OpenClaw 有

SKILL.md 全文

14.4 KB
模型实际读到的说明书原文,来自技能仓库

text2png — 文字描述 → HTML 图表 → PNG 截图

将任意文字描述转化为有设计感的 HTML 可视化图表,自动截图输出 PNG。

Usage

/text2png 帮我画一个 CI/CD 流程图
/text2png 对比 Redis 和 Memcached
/text2png  # 然后粘贴内容

Options

生成选项(由你决定怎么写 HTML,不是传给脚本的参数):

Option Values
--style warm (default), dark, minimal, editorial, neon, paper, glass, corporate, retro
--chart auto (default), sequence, swimlane, flowchart, comparison, timeline, architecture, dashboard, gantt, org-chart, funnel, mind-map, matrix, kanban, checklist, quote-card
--output 输出目录路径(默认当前目录)

Style x Chart 可自由组合。风格只改配色/字体/质感,不改布局。

脚本参数(scripts/screenshot.ts 真正接受的参数,传其它参数会直接报错):

Arg 说明
--html <path> 输入 HTML(必填)
--out <path> 输出图片(必填)
--bg <color> 留白区背景色(默认 #ffffff,按 style 的 bg 传)
--width <px> 视口宽度(默认 860;横向流程图可用 960)
--padding <px> 四周留白(默认 32)
--dpr <1-4> 截图倍率(默认 4)
--format png\|webp 输出格式(默认 png)

Script Directory

Important: All scripts are located in the scripts/ subdirectory of this skill.

Agent Execution Instructions:
1. Determine this SKILL.md file's directory path as SKILL_DIR
2. Script path = ${SKILL_DIR}/scripts/<script-name>.ts
3. Replace all ${SKILL_DIR} in this document with the actual path

Script Reference:
| Script | Purpose |
|--------|---------|
| scripts/screenshot.ts | HTML → PNG 截图(puppeteer-core + 系统 Chrome,无需 Playwright) |


Workflow

Step 1: Collect Information

If the user hasn't provided the following, ask these two questions in one go(用当前环境可用的提问方式;没有专门的提问工具就直接在回复里问):

Question 1 — Style (skip if user already specified):

风格偏好?
1. warm — 暖色系,米白背景,彩色边框,适合报告/流程 (Recommended)
2. dark — 深色科技感,适合架构/技术方案
3. minimal — 极简黑白,适合向领导汇报
4. editorial — 杂志排版风,大号衬线字体,适合内容展示
5. neon — 赛博霓虹,适合技术分享/演讲配图
6. paper — 手绘纸质感,适合教学/说明
7. glass — 玻璃拟态,适合现代产品展示
8. corporate — 商务正式,深蓝主色,适合客户方案/汇报
9. retro — 复古像素,CRT 扫描线,适合技术社区/Side Project
(不确定的话我根据内容推荐)

Question 2 — Output path (skip if user already specified):

截图保存到哪?(直接回车默认当前目录)

If user content is clear enough and no style/path preference given, use inferred values and proceed directly.

Step 2: Analyze Content & Select Chart Type

  1. Identify chart type using references/chart-types.md auto-selection matrix
  2. Extract structured content from user description:
    - Nodes, steps, metrics, or entities
    - Core description for each (refine to 1-2 lines)
    - Highlight priorities
  3. Enrich content: When user only provides skeleton info, proactively add details to make the chart complete and professional
  4. Decide tagline/banner: Based on content richness — if content has a clear "intro → conclusion" structure, use both (with different content); if there's only one core message, use only one. Never repeat the same text in tagline and banner.

Reference: references/chart-types.md

Form vs Style: who decides what

Split the two decisions — they have different owners:

  • Form is inferred by you. The user describes content, not chart types; most people cannot name swimlane or sequence. Infer the form from their content, state your choice in one short line ("我按时序图 + dark 主题画,因为…"), and only ask back when two forms are genuinely plausible.
  • Style is the user's taste. When the request doesn't imply one, don't silently lock in the first style you thought of. Either propose 2-3 candidate combos, or show the catalogue (below) and let them pick.

Showing the catalogue (the bundled demo)

demo/index.html is the full 15 forms × 9 styles matrix (135 previews, filterable by form or style, click any image to zoom). Open it when the user asks what styles/forms exist, wants to pick a look, or when you're unsure about their taste:

open "${SKILL_DIR}/demo/index.html"        # macOS
xdg-open "${SKILL_DIR}/demo/index.html"    # Linux

Rules that keep this helpful instead of annoying:

  1. On demand, not by default. Don't launch a browser for every request — only when they ask, or when you're genuinely uncertain about the style.
  2. Always pair it with text. Say in one line what you opened, and list the 9 styles with a 3-5 word trait each (e.g. warm 暖色报告 / dark 深色科技 / editorial 杂志排版). Remote shells and headless environments have no browser — the flow must still work.
  3. Prefer 2-3 candidates over the full menu. The 135-grid answers "what exists", not "what should I use". Recommend first, expand only if they want to browse.
  4. Anchor the style. Once a style is chosen (by the user or by your recommendation), keep it for the rest of the session/document so a set of charts looks consistent — switch only when asked.
  5. Never block on it. If they don't care about style, pick the recommended one for that form (see the auto-selection matrix) and move on.

Each card also has a 「复制 prompt」 button (no server involved — it only copies text) that yields a ready-to-paste line such as 画成时序图(sequence),主题用 warm(暖色报告):<把内容写在这里>. When you open the demo, tell the user they can browse, hit that button on whatever they like, and paste it back with their content.

Step 3: Generate HTML

Based on confirmed style + chart type + structured content, generate complete HTML.

Design process:
1. Read references/design-philosophy.md for aesthetic principles
2. Read references/styles/<style>.md for style-specific CSS variables and components
3. Read references/charts/<chart-type>.md for layout rules and HTML structure
4. Generate HTML with all CSS inlined

First Principle — Compact, Symmetric, Full:
- Compact: Use minimum spacing that maintains readability. When 8px works, don't use 12px.
- Symmetric: All cards in a row equal width (flex:1). No unequal column splits unless content semantics demand it.
- Full: Every area carries content. If content is sparse, proactively enrich (add descriptions, stats, summary banners).
- Style does NOT change layout — styles only control colors, fonts, textures, effects.

Spacing targets (prefer the lower end):
- body padding: 20-24px (max 28px)
- Card gap: 8px (max 12px)
- Card internal padding: 12-14px (max 18px)
- Arrow/connector height: 20-24px (max 28px)
- Title → content: 10-12px (max 14px)

Width: Fixed at 860px (portrait) or 960px (landscape/horizontal charts).
Visual coherence: Uniform border-radius, font sizes follow hierarchy, colors restrained (≤ 3-4 primary colors).

Output filename: <content-keyword>-<timestamp>.html, saved to user-specified directory.

Reference: references/design-philosophy.md, references/styles/*.md, references/charts/*.md

Step 4: Screenshot

HTML 生成后,运行截图脚本(首次检查依赖是否已安装):

[ -d "${SKILL_DIR}/node_modules" ] || (cd "${SKILL_DIR}" && npm install)
bun "${SKILL_DIR}/scripts/screenshot.ts" \
  --html <html_path> \
  --out <output_dir>/<filename>.png \
  --bg "<bg_color>" \
  --width 860 \
  --padding 32 \
  --dpr 4 \
  --format png

工作原理(脚本内部两阶段):
1. 测量:用 puppeteer-core 连接系统 Chrome,在 4000px 高 viewport 中渲染 HTML,测量 .wrap 元素的实际尺寸
2. 截图:调整 viewport 到精确高度,用 clip 按内容 + padding 精确裁切,输出 4x 印刷级清晰度 PNG

依赖:
- puppeteer-core(npm install 自动安装,会带若干传递依赖)
- 系统已安装的 Google Chrome(Mac/Linux/Windows 开发者基本都有)
- HTML 里若用 Google Fonts 外链需要能访问外网;内网/离线时字体会静默回退,中文排版会变,建议关键场景改本地字体
- 无需 ImageMagick,无需 Playwright,无需额外下载浏览器

默认 padding:32px 四周均匀留白。

Background color by style:

Style bg_color Width
warm #faf6ee 860
dark #0d1117 860
minimal #ffffff 860
editorial #f8f5f0 860
neon #0a0015 860
paper #f5f0e6 860
glass #e8eaf0 860
corporate #f4f6f9 860
retro #1a1c2e 860

For horizontal flowcharts (≤ 7 steps, short descriptions), use --width 960.

Completion output:

Done!
   HTML: <path>.html
   PNG:  <path>.png

Auto Selection Matrix

Content Signals Chart Type Style
步骤、操作、流程、工作流 flowchart warm
对比、PK、vs、优劣 comparison minimal
时间、历史、里程碑、路线图 timeline editorial
系统、服务、架构、组件 architecture dark
数字、指标、统计、报表 dashboard glass
计划、排期、进度、甘特 gantt warm
团队、汇报、层级、组织 org-chart minimal
转化、漏斗、筛选、销售 funnel neon
思维导图、脑图、发散、分支 mind-map paper
矩阵、象限、SWOT、优先级 matrix minimal
看板、状态、待办、进行中 kanban glass
清单、checklist、打勾、核查 checklist warm
金句、引用、名言、摘录 quote-card editorial
时序、调用链、请求响应、接口交互、回调 sequence dark
泳道、跨角色、责任分工、交接、谁负责 swimlane corporate

When unable to determine chart type, default to flowchart.
When unable to determine style, default to warm.

Reference: references/chart-types.md


Style Overview

Style Tone Key Visual
warm 暖色报告 米白底,暖色边框,虚线箭头
dark 科技感 深色底,蓝绿发光,glow 效果
minimal 极简正式 纯白底,黑白无色彩
editorial 杂志排版 大号衬线字体,横线分割,category 标签
neon 赛博朋克 深紫/黑底,霓虹描边,发光字
paper 手绘纸质 米黄纸质感,铅笔线条风
glass 玻璃拟态 毛玻璃卡片,渐变底,光晕
corporate 商务正式 深蓝主色,极细边框,表头深色底
retro 复古像素 CRT 扫描线,像素字体,硬边角

All styles share the same layout principle: compact, symmetric, full. Style only controls visual appearance (colors, fonts, textures, effects).

Reference: references/styles/*.md


Chart Types Overview

Type Use Case Key Layout
flowchart 步骤、操作流程 横版(≤7步)/竖版,步骤卡+箭头
comparison 方案对比 双列并排,配色区分
timeline 里程碑、历史 竖轴,左右交错
architecture 系统组件 分层布局,节点+连线
dashboard 指标汇总 大数字卡横排+详情区
gantt 项目排期 横轴时间+横向条形
org-chart 团队结构 树形层级,上下连线
funnel 转化漏斗 梯形递减,百分比标注
mind-map 知识整理、发散 中心节点+放射分支,左右展开
matrix 优先级/SWOT 2×2 网格+轴标签+象限卡片
kanban 任务看板 多列横排,状态分组+任务卡
checklist 清单确认 勾选列表+进度条+分组
quote-card 金句分享 大号引文居中+来源标注
sequence 调用链、请求响应 参与者+生命线+消息箭头
swimlane 跨角色流程 泳道×阶段网格+任务卡

Reference: references/charts/*.md


Notes

  • User descriptions can be rough — you refine them; don't dump raw text into the chart
  • Proactively enrich content: Add details like node descriptions, scenario notes, summary banners to make charts look complete and professional
  • If content is dense, group/merge items to maintain readability
  • Each chart should have a distinct visual identity — no two charts should look the same
  • Font rule: Never use Inter, Roboto, Arial, or system default fonts. Each style has its own font stack.

Extension Support

Custom styles and configurations via EXTEND.md.

Check paths (priority order):
1. .text2png/EXTEND.md (project)
2. ~/.text2png/EXTEND.md (user)

If found, load before Step 1. Extension content overrides defaults.


References

Detailed templates and guidelines in references/ directory:
- design-philosophy.md — Aesthetic principles and design rules
- chart-types.md — Chart type selection framework
- styles/ — Detailed style definitions (CSS variables, components, effects)
- charts/ — Detailed chart type layouts (HTML structure, CSS patterns)

Preview & tooling:
- demo/index.html — 15 forms × 9 styles full-matrix preview (filterable, click to zoom); open on demand, not for every request
- tools/build-gallery.py — regenerate the demo / any matrix (all / light / embed / --only)

常见问题

5 问
答案由本站依据条目字段整理
文本生图怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_3643e790/text2png。安装方式为未标注。装完刷新技能列表或重开客户端。

文本生图支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

文本生图权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

文本生图收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

文本生图用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-11-06。