← 返回 Skills 市场
lovensky1992-wk

Content Card

作者 lovensky1992-wk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
51
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install content-card
功能描述
将内容铸成 PNG 视觉卡片。三种模具:-l 长图阅读卡(默认)、-i 信息图、-m 多卡。 输入文本/URL/文件,输出高品质 PNG。 Use when: (1) 用户说"做成卡片"/"做成图"/"铸"/"cast", (2) 用户说"知识卡片"/"信息图"/"infograph", (3) 需要将文章/笔记...
使用说明 (SKILL.md)

content-card: 铸

将内容铸成可见的形态。内容进去,PNG 出来。模具决定形状。

参数

参数 模具 尺寸 说明
-l(默认) 长图 1080 x auto 单张阅读卡,内容自动撑高
-i 信息图 1080 x auto 数据/结构驱动的自适应视觉布局
-m 多卡 1080 x 1440 自动切分为多张卡片(小红书/朋友圈适用)
--style 风格 minimal-mono / morandi-warm / tech-dark / paper-craft / corporate-clean,默认:根据气质自动选

小红书安全区(-m 模式必读)

小红书移动端 UI 会遮挡图片以下区域,关键信息必须避开:

┌─────────────────────────────┐
│                 [❤️ 📌 💬]  │  ← 右上角 15%:点赞/收藏/评论按钮
│                             │
│      ✓ 安全内容区域          │
│                             │
│  [笔记标题 + 用户头像栏]     │  ← 底部 10%:标题栏遮挡
│                   [@水印]   │  ← 右下角 10%:平台水印
└─────────────────────────────┘

-m 模式生成 HTML 时,确保底部 10% 区域不放置关键文字或数据。

获取内容

  • URL → web_fetch 获取
  • 粘贴文本 → 直接使用
  • 文件路径 → read 获取

执行流程

Step 1: 加载用户偏好

检查 EXTEND.md 配置文件(优先级:项目级 > 用户级):

优先级 路径
1 .content-card/EXTEND.md(当前工作目录)
2 ~/.config/content-card/EXTEND.md
  • 找到:读取并解析,后续步骤中使用配置值作为默认值
  • 未找到:静默跳过,使用 SKILL.md 默认值

配置 schema 见 references/config/preferences-schema.md

Step 2: 理解内容

读取输入内容,提取:

  • 核心主题/标题
  • 关键信息点(数据、结论、对比、流程)
  • 内容气质:思辨/哲学、技术/工程、文学/叙事、科学/研究、商业/产品

Step 3: 关键词快捷匹配

用户输入中如果包含以下关键词,直接跳过气质推断和布局推荐,使用预设组合:

用户关键词 布局 风格 默认比例 说明
高密度信息大图 / high-density dense-modules corporate-clean portrait 信息密度优先
对比图 / vs / 对比 binary-comparison minimal-mono landscape 左右分屏对比
时间线 / timeline / 历程 linear-progression morandi-warm portrait 线性时间推进
流程图 / 步骤 / tutorial linear-progression corporate-clean portrait 步骤指引
数据看板 / dashboard / KPI dashboard tech-dark landscape 指标展示
知识卡片 / 总结卡 bento-grid morandi-warm portrait 多主题总览
对比矩阵 / 功能对比 comparison-matrix minimal-mono landscape 多因素对比表
思维导图 / mindmap hub-spoke paper-craft landscape 中心发散
漏斗 / funnel / 转化 funnel corporate-clean portrait 转化漏斗
冰山 / iceberg / 深层 iceberg morandi-warm portrait 表层vs深层

匹配规则:

  • 匹配到关键词后自动应用预设,跳到 Step 3(生成 HTML)
  • 用户仍可通过 --layout / --style 覆盖预设
  • 多个关键词同时命中时,取第一个匹配

Step 4: 结构化内容(信息图专用)

-i 模式在理解内容后,增加一步结构化转换:

  1. 提取标题和核心主张
  2. 将内容拆解为独立模块(每个模块 = 一个布局区块)
  3. 为每个模块标注:关键概念、核心数据、视觉元素建议
  4. 数据保真:源数据原样保留,不概括不改写。统计数字、引用、专有名词必须逐字保留
  5. 凭据剥离:如果源内容包含 API Key、Token、密码等敏感信息,必须在此步骤剥离

输出到 temp/content-card/structured-content.md 文件。好处:

  • 换风格/布局时直接复用,不用重新分析
  • 用户可在此文件上手动修改后重新生成
  • 保留分析过程的可追溯性

如果 temp/content-card/structured-content.md 已存在且内容未变,跳过分析直接复用。

⚠️ 检查点(Step 2-4 完成后)

内容理解 + 结构化完成后,如果用户未指定风格/配色,简要告知选择的方案再继续: "内容偏 [气质],准备用 [风格] + [配色] 做长图,可以吗?" 用户确认或无异议后继续。简单/重复任务可跳过。

Step 5: 感知内容气质,选择配色

气质决定配色方向,风格决定视觉系统。 气质在这一步确定,风格在 Step 2.5 确定。

气质 底色方向 强调色方向
思辨/哲学 暖灰、米白 深红、琥珀
技术/工程 冷灰、深蓝灰 青色、蓝绿
文学/叙事 暖白、奶油 赭石、深橄榄
科学/研究 纯白、浅灰 深蓝、靛蓝
商业/产品 浅灰、暖白 深橙、深青

Step 6: 选择视觉风格

如果用户指定了 --style,使用指定风格。否则根据气质自动推荐:

气质 默认 Style 备选
思辨/哲学 minimal-mono morandi-warm
技术/工程 tech-dark minimal-mono
文学/叙事 morandi-warm paper-craft
科学/研究 minimal-mono corporate-clean
商业/产品 corporate-clean minimal-mono

风格定义文件在 references/styles/\x3Cstyle>.md,生成 HTML 时读取对应文件中的 CSS 变量。

信息图布局库(-i 模式可选布局)

信息图有两个维度:布局(信息结构)× 内容气质(已有的配色系统)。

布局 最佳场景 结构描述
bento-grid 多主题总览、知识合集(默认) 不等分网格,每块独立主题
linear-progression 时间线、流程、教程步骤 从左到右或从上到下的线性推进
binary-comparison A vs B、before/after、优劣对比 左右对称分屏
hierarchical-layers 金字塔、优先级层级 从上到下的层级堆叠
hub-spoke 中心概念 + 关联要素 中心节点向外放射
funnel 转化漏斗、筛选过程 从宽到窄的漏斗形
iceberg 表面 vs 深层、显性 vs 隐性 水面线分隔,上下两部分
dashboard 指标看板、KPI 展示 数字大卡片 + 图表组合
winding-roadmap 旅程、里程碑 蜿蜒路径上的节点
circular-flow 循环过程、生态系统 首尾相连的环形
comparison-matrix 多因素对比、功能矩阵 行列网格,✓/✗ 标记
dense-modules 高密度信息、数据手册 紧凑模块化,最大信息密度

自动推荐:根据内容结构自动匹配最佳布局。

内容类型 → 布局推荐

内容类型 推荐布局 备选
时间线/历史 linear-progression winding-roadmap
步骤教程 linear-progression funnel
A vs B 对比 binary-comparison comparison-matrix
多因素对比 comparison-matrix binary-comparison
层级/优先级 hierarchical-layers
中心概念+扩展 hub-spoke bento-grid
转化/筛选 funnel linear-progression
显性 vs 隐性 iceberg hierarchical-layers
指标/数据 dashboard dense-modules
旅程/路线 winding-roadmap linear-progression
循环过程 circular-flow hub-spoke
多主题总览 bento-grid dense-modules
高密度手册 dense-modules bento-grid

气质 × 布局 兼容矩阵

选定内容气质和布局后,检查此矩阵确保组合合理:

气质 \ 布局 bento-grid linear binary-comp hierarchical hub-spoke funnel iceberg dashboard roadmap circular comp-matrix dense-mod
思辨/哲学 ✓✓ ✓✓ ✓✓ ✓✓
技术/工程 ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓
文学/叙事 ✓✓ ✓✓ ✓✓
科学/研究 ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓
商业/产品 ✓✓ ✓✓ ✓✓ ✓✓ ✓✓ ✓✓

✓✓ 强推荐 | ✓ 可用 | ✗ 不推荐(气质与布局形式冲突,效果差)

核心逻辑:思辨/文学偏深度叙事,避免数据密集型布局;技术/科学/商业偏结构化,避免纯叙事型布局。

兼容检查:选定气质+布局后查此矩阵。有 ✗ 则提示调整或换备选布局。

内容信号 → 气质+布局自动推荐

根据输入内容的关键词信号,自动推荐气质和布局组合:

内容信号 气质 推荐布局 备选
AI、架构、系统、代码、框架 技术/工程 bento-grid hub-spoke
对比、vs、选型、优劣 技术/工程 binary-comparison comparison-matrix
产品、增长、转化、商业模式 商业/产品 funnel dashboard
KPI、指标、数据、ROI 商业/产品 dashboard dense-modules
哲学、思辨、本质、悖论 思辨/哲学 iceberg hierarchical-layers
故事、经历、旅程、成长 文学/叙事 winding-roadmap linear-progression
实验、论文、研究、假设 科学/研究 linear-progression comparison-matrix
教程、步骤、流程、操作 技术/工程 linear-progression bento-grid
生态、循环、闭环、飞轮 商业/产品 circular-flow hub-spoke
层级、金字塔、优先级 思辨/哲学 hierarchical-layers hub-spoke

混合信号时:取第一个匹配的推荐,气质由主导信号决定。

Step 7: 生成 HTML

文件安全:生成新文件前,如果目标路径已存在同名文件,自动重命名为 {name}-backup-{YYYYMMDD-HHMMSS}.{ext}。适用于:

  • HTML 中间文件
  • 最终 PNG 输出
  • structured-content.md

示例:report.png 已存在 → 重命名为 report-backup-20260420-225400.png → 再生成新的 report.png

根据选择的模具,读取对应模板文件:

  • -lassets/long_template.html
  • -iassets/infograph_template.html
  • -massets/poster_template.html

注入风格变量:读取 references/styles/\x3Cstyle>.md 中的 CSS 变量定义,将其注入到 HTML 的 :root 选择器中。风格变量覆盖模板默认值,实现布局 × 风格的自由组合。

将内容填充到模板的 {{VARIABLE}} 占位符中。

Step 8: 品味检查

生成 HTML 后、截图前,Read references/taste.md,逐项过品味准则自检清单。

Step 9: 截图

node ~/.openclaw/skills/content-card/scripts/capture.js \x3Chtml文件路径> \x3C输出png路径> \x3C宽度> \x3C高度> [fullpage]

默认宽度 1080,长图和信息图用 fullpage 模式(高度自适应)。

依赖:Playwright。如未安装:

cd ~/.openclaw/skills/content-card && npm install playwright && npx playwright install chromium

Step 10: 交付

  • 输出路径:~/Downloads/{标题}.png
  • 报告文件路径

品味准则

Read references/taste.md — 所有模具的视觉质量底线。

核心原则:反 AI 生成痕迹

  • 禁 Inter 字体(用 Noto Serif SC / Geist / Satoshi)
  • 禁纯黑 #000(用 #1a1a1a)
  • 禁三等分卡片
  • 禁居中 Hero
  • 禁 AI 文案腔(赋能/无缝/释放)
  • 禁假数据(99.99%)
  • 最多 1 个强调色,饱和度 \x3C 80%
  • 阴影必须染色,不用灰色默认

使用场景示例

# 公众号知识卡片
/content-card -l 将这段 Agent 架构分析做成长图

# 小红书多卡
/content-card -m 把这个对比表做成多张卡片

# 数据信息图
/content-card -i 将这份项目分析报告做成信息图

设计品味准则

通用品味准则见 ~/.openclaw/workspace/references/design-taste.md,覆盖品牌协议、反 AI slop、品味锚点、事实验证。本 skill 遵守该文件的所有规则。涉及具体品牌时必须走品牌资产协议 5 步流程。

安全使用建议
This skill appears to do what it says (generate PNG cards from HTML templates), but take these precautions before installing or running it: - Review the path inconsistencies: many docs reference `~/.claude/skills/ljg-card` while the skill slug is `content-card`. Verify and correct hard-coded paths to avoid unexpected file reads or failures. - Playwright is required by the code but no install steps are provided. Expect to install Node dependencies and browser binaries (Playwright will download Chromium). Do this in a controlled environment (local dev VM or container) and review network traffic during installation. - When rendering, the headless browser may load external resources (Google Fonts, remote LOGO_PATH images). These cause outbound requests that could expose the content being rendered (or metadata) to external hosts. If you will render sensitive content, sanitize or inline external assets and avoid remote image URLs. - The skill reads two preference locations and writes /tmp/content-card files. Confirm you are comfortable with the skill reading ~/.config and project-level config files; do not keep secrets in those files. The SKILL.md claims it strips API keys/tokens from structured output in one step — but that is a runtime behavior to trust only if you review the implementation. - If you want to proceed, run the skill in a sandbox (container or isolated machine), install dependencies manually, and verify the capture script behavior before giving it access to important documents. If you want, I can list the exact files/lines that reference the `ljg-card` path and the places that will trigger external network requests (fonts/images) so you can patch them or ask the author to fix them.
功能分析
Type: OpenClaw Skill Name: content-card Version: 1.0.0 The content-card skill bundle is a legitimate tool designed to transform text, URLs, or files into aesthetic PNG images using Playwright. The execution flow is well-documented across SKILL.md and various reference files, involving content structuring, style application via CSS variables, and automated screenshot capture via scripts/capture.js. Notably, the instructions include a security-conscious step to explicitly strip sensitive information like API keys or tokens from the content before rendering. No evidence of data exfiltration, malicious prompt injection, or unauthorized persistence was found; the file and network access patterns are strictly aligned with the tool's stated purpose.
能力标签
cryptorequires-sensitive-credentials
能力评估
Purpose & Capability
The skill's stated goal (turn text/URL/file into PNG cards) matches the included HTML templates, style references, and a Node script that screenshots HTML via Playwright. However the package.json declares a heavy dependency (playwright) while the registry metadata gives no install spec — an instruction-only listing with node code and an npm dependency is inconsistent and requires extra setup. Also many reference docs mention a different skill folder name (`ljg-card`) which suggests copy/paste errors and may cause runtime path errors.
Instruction Scope
SKILL.md instructs the agent to read project/user config files (.content-card/EXTEND.md and ~/.config/content-card/EXTEND.md), read user-provided file paths, fetch URLs, and write structured content to temp/content-card/structured-content.md — these are plausible for preferences and caching but do grant read/write access to local files. The templates import Google Fonts and embed image src placeholders; when capture.js renders HTML, the headless browser may make external network requests (fonts, remote images), which could leak metadata or cause external resource fetches. There are also multiple hard-coded path inconsistencies (references to ~/.claude/skills/ljg-card) that may cause incorrect behavior.
Install Mechanism
There is no explicit install spec in the registry entry, but package.json and package-lock.json list playwright (and playwright-core). Playwright requires installing browser binaries (e.g., `npx playwright install chromium`) and is heavyweight; the skill provides a script that expects playwright present. The absence of an install step in the registry combined with bundled Node code is an operational mismatch and increases installation friction and implicit network downloads.
Credentials
The skill requests no environment variables or external credentials. It reads user preference files and writes temp files as part of normal operation. There are no hidden credential requests in the files provided.
Persistence & Privilege
The skill is not always-enabled and does not request elevated privileges. It reads config files in the current directory and the user's home (~/.config) and writes to /tmp — appropriate for preferences and temporary structured-output, but you should be comfortable with the skill reading those paths. It does not modify other skills or system-wide configs in the provided files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install content-card
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /content-card 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Weekly sync
元数据
Slug content-card
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Content Card 是什么?

将内容铸成 PNG 视觉卡片。三种模具:-l 长图阅读卡(默认)、-i 信息图、-m 多卡。 输入文本/URL/文件,输出高品质 PNG。 Use when: (1) 用户说"做成卡片"/"做成图"/"铸"/"cast", (2) 用户说"知识卡片"/"信息图"/"infograph", (3) 需要将文章/笔记... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 51 次。

如何安装 Content Card?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install content-card」即可一键安装,无需额外配置。

Content Card 是免费的吗?

是的,Content Card 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Content Card 支持哪些平台?

Content Card 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Content Card?

由 lovensky1992-wk(@lovensky1992-wk)开发并维护,当前版本 v1.0.0。

💬 留言讨论