技能详情(站内镜像,无评论)
作者:Jinx @aatrooox
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.1.0
统计:⭐ 1 · 561 · 4 current installs · 4 all-time installs
⭐ 1
安装量(当前) 4
🛡 VirusTotal :可疑 · OpenClaw :良性
Package:aatrooox/z-card-image
安全扫描(ClawHub)
- VirusTotal :可疑
- OpenClaw :良性
OpenClaw 评估
The skill is coherent with its stated purpose (rendering text into card/cover PNGs), requires only Python and headless Chrome (plus ffmpeg for one template), and contains no hidden network endpoints or credential requests.
目的
Name/description, declared binaries (python3, google-chrome), templates, and scripts all align: the code builds HTML from templates and uses headless Chrome (and ffmpeg for wechat-cover-split) to create PNGs. No unrelated services or credentials are requested.
说明范围
SKILL.md instructions map directly to the scripts' behavior: detecting environment binaries, choosing templates, applying highlights, and calling the renderer. The runtime instructions do not instruct reading arbitrary system config, contacting external endpoints, or exfiltrating data. The scripts do run subprocesses (Chrome, optional ffmpeg) to render screenshots, which is expected for this function.
安装机制
This is an instruction-and-script-only skill with no install spec. No remote downloads or package installs are performed automatically by the skill bundle itself.
证书
No environment variables or credentials are required. Minor oddity: several files/reference docs (and render_card.py) contain a hard-coded absolute default icon path (/Users/aatrox/.openclaw/agents/zoe/...), which is a developer-specific workspace path — not a credential but may not exist on other users' systems and could cause missing-icon behavior. The scripts also reference local asset paths for fonts and avatars; these are normal for rende…
持久
always is false and the skill does not request persistent system-wide privileges. It writes temporary HTML files and output PNGs to the provided output paths; this is expected behavior for a renderer.
综合结论
This skill appears to do exactly what it says: render templates into PNGs using Python and headless Chrome (ffmpeg only for the wechat-cover-split template). Before installing or running: 1) ensure python3 and Chrome/Chromium are available and that you are comfortable the agent can run headless Chrome and (optionally) ffmpeg; 2) be aware the code executes subprocesses (chrome and ffmpeg) and creates temporary HTML files — run it in an environm…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「z-card-image」。简介:生成配图、封面图、卡片图、文字海报、公众号文章封面图、微信公众号头图、X 风格帖子分享图、帖子长图、社媒帖子长图。适用于帖子类型数据、post data、so…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/aatrooox/z-card-image/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: z-card-image
version: 1.1.0
description: 生成配图、封面图、卡片图、文字海报、公众号文章封面图、微信公众号头图、X 风格帖子分享图、帖子长图、社媒帖子长图。适用于帖子类型数据、post data、social posts、tweet/thread、转发推文、转发帖子、小绿书配图、图片封面、card image。
metadata:
openclaw:
requires:
bins:
- python3
- google-chrome
---
# z-card-image
将用户提供的文案渲染成 PNG 卡片图。
支持短文案封面图、长文分页图、X 风格帖子分享长图,以及公众号文章封面图。只要输入是“帖子类型数据”并希望导出成 X 风格长图,都应走 `x-like-posts`。
## 环境要求
- Python 3
- Google Chrome(macOS:`/Applications/Google Chrome.app`;Linux:`chromium` 需修改脚本路径)
## 执行流程
0. **环境提示**(用户触发时检测一次,有问题给提示,不中止流程):
- `python3 --version` → 失败则告知:「⚠️ 未检测到 Python 3,渲染可能失败」
- 检查 Chrome 路径 → 失败则提示安装
1. **识别场景**:
- 短文案封面图 → `poster-3-4`
- 长文分页图 → `article-3-4`
- X 风格帖子分享图 / 帖子长图 / 帖子类型数据 → `x-like-posts`
- 公众号文章封面图 → `wechat-cover-split`
2. **查模板规则**:根据模板在「模板索引」中找到对应规范文档,读取后按其规则处理文案和参数。**如用户要求高亮:整行用 `--hl1/hl2/hl3`,按词用 `--highlight-words`(逗号分隔),两者可同时使用,不能忽略**
3. **识别平台**:按「平台预设」自动设置配色;推特长图默认使用 Twitter 风格蓝白灰配色
4. **渲染输出**:
- `poster-3-4` → 执行 `render_card.py`
- `article-3-4` → 执行 `render_article.py`
- `x-like-posts` → 执行 `render_x_like_posts.py`
- `wechat-cover-split` → 执行 `render_card.py`
- 默认 `--out` 填 `tmp/...png`;如用户指定导出位置,可直接传绝对路径或相对路径
5. **输出产物**:生成 PNG 到指定路径,供后续发送、裁切或复用;如需给外部工具上传,仍应避免写入系统 `/tmp/`
## x-like-posts 导航
`x-like-posts` 用于“帖子类型数据 → X 风格分享长图”。
当命中这条路线时,继续读取:
- [references/x-like-posts.md](references/x-like-posts.md):输入 JSON 格式、可显示字段、时间规则、导出规则
- [references/tweet-thread.md](references/tweet-thread.md):旧命名兼容说明
## 输入校验
- **比例不存在**:驳回请求,告知当前支持的比例列表,询问是否新增模板
- **文案超出模板字数上限**:先自动拆分/缩写后再渲染,不要直接塞入
- **帖子过多**:按规范拆成多张 `Part 1 / Part 2`,不要把超长内容强行塞进一张
- **公众号封面标题过长**:先压缩成 2~3 行短标题,再渲染,不能把完整长标题硬塞进模板
## 平台预设
| 平台 | `--footer` | `--bg` | `--highlight` |
|------|-----------|--------|--------------|
| 公众号(默认) | `公众号 · 早早集市` | `#e6f5ef` | `#22a854` |
| 小红书 | `小红书 · 阿康` | `#fdecea` | `#e53935` |
> 用户提到"小红书配图"时使用小红书预设;"小绿书"= 公众号配图,使用公众号预设;否则默认公众号。
## 模板索引
| 模板名 | 比例 | 尺寸 | 用途 | 规范文档 |
|--------|------|------|------|---------|
| `poster-3-4` | 3:4 | 900×1200 | 文字海报(金句/大字报/封面) | [references/poster-3-4.md](references/poster-3-4.md) |
| `article-3-4` | 3:4 | 900×1200 | 长文分页卡片 | [references/article-3-4.md](references/article-3-4.md) |
| `x-like-posts` | 自适应长图 | 900px 宽 | X 风格帖子分享长图 | [references/x-like-posts.md](references/x-like-posts.md) |
| `wechat-cover-split` | 335:100 | 1340×400 | 公众号文章封面长条图(左标题右 icon) | [references/wechat-cover-split.md](references/wechat-cover-split.md) |
## 新增模板
1. 新建 `assets/templates/<name>.html`
2. 在 `render_card.py` 的 `size_map` 里注册尺寸
3. 在上方模板索引中添加一行
4. 创建对应 `references/<name>.md`,记录该模板的参数、字数上限、配图选取规则