← 返回 Skills 市场
mr-q526

小红书卡片生成器

作者 MrQ · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
361
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install card-renderer
功能描述
为小红书文案生成不同风格的知识卡片附图(如 Mac Pro、赛博朋克、包豪斯风)。当用户需要将 Markdown 文案渲染成美观的图片卡片时使用。支持自动分段渲染封面和详情页。
使用说明 (SKILL.md)

Card Renderer

本技能提供多种视觉风格的脚本,用于将文案正文渲染为 3:4 比例的小红书卡片。

可用风格

目前支持以下风格脚本,存放在 scripts/ 目录下:

  • Mac Pro 极客风 (render_mac_pro_card.py): 模拟 macOS 窗口、深色背景、极客代码高亮感。适合技术干货、开发实战。
  • 赛博朋克风 (render_cyber_card.py): 霓虹粉青配色、格栅背景、故障艺术感。适合硬核趋势、AI 科技。
  • 包豪斯极简风 (render_bauhaus_card.py): 经典红蓝黄撞色、不对称布局、粗线条。适合设计美学、结构化知识。
  • 复古羊皮纸风 (render_vintage_card.py): 温暖的纸张质感、打字机字体、典雅的边框。适合情感故事、历史回溯。
  • 梦幻毛玻璃风 (render_dreamy_card.py): 柔和的渐变背景、毛玻璃质感、优雅的排版。适合生活方式、创意灵感。
  • VS Code 极客风 (render_vscode_card.py): 模拟 VS Code 编辑器界面、带侧边栏和行号、代码注释风格标题。适合技术教程、代码实战。
  • 拍立得简约风 (render_polaroid_card.py): 经典的拍立得相框、底部留白手写感、简约大方。适合日常分享、感性随笔。
  • 现代杂志风 (render_magazine_card.py): 粗犷的非对称排版、超大装饰文字、瑞士平面设计感。适合高端访谈、深度解析。
  • 极简网格风 (render_minimal_grid_card.py): 干净的白底灰点背景、精确的文字对齐、带标签装饰。适合科普干货、学术总结。
  • 拼色形状风 (render_split_color_card.py): 柔和的浅色几何图形叠加、超大数字背景。适合系列教程、分步骤教学。
  • 优雅框线风 (render_framed_minimal_card.py): 精致的细框线设计、中心对齐布局、克制且高级。适合名言金句、深度观点。

使用方法

所有脚本的调用参数一致:

python3 {baseDir}/scripts/\x3Cscript_name>.py "标题" "副标题" "文案路径" "输出目录"

参数说明

  1. 标题: 卡片封面的主标题。
  2. 副标题: 封面主标题下方的装饰性小字。
  3. 文案路径: 指向包含正文的 .md.txt 文件。脚本会自动过滤正文并进行分段渲染。
  4. 输出目录: 图片生成的存放路径。脚本会自动生成 *_cover.png*_detail_N.png

开发新风格

如果需要添加新风格,请参考现有的 Python 脚本(基于 PIL 库)。每个脚本应包含:

  • strip_emojis: 清理不支持的字符。
  • render_cover: 渲染封面。
  • render_detail: 渲染详情页。
  • paginate_content: 处理长文本的分页逻辑。

注意事项

  • 脚本依赖 Pillow 库和 macOS 系统自带字体(如 STHeitiMonaco)。
  • 生成图片比例固定为 1080x1440 (3:4)。
  • 每个脚本输出时会打印 MEDIA:\x3Cpath> 以便在聊天界面预览。
安全使用建议
This skill appears to do what it says: local Python scripts render text files into styled PNG cards. Before using: (1) ensure Pillow is installed in the runtime environment; (2) be aware the scripts expect macOS font paths (they fall back to defaults if missing); (3) only pass intended .md/.txt files as the content path to avoid accidentally exposing sensitive files; (4) there is no network communication or credential access in the code, so network egress is not part of this skill's behavior.
功能分析
Type: OpenClaw Skill Name: card-renderer Version: 1.0.0 The card-renderer skill bundle is a legitimate tool designed to convert Markdown text into styled social media images (Xiaohongshu cards). The bundle contains multiple Python scripts (e.g., render_mac_pro_card.py, render_cyber_card.py) that use the Pillow library to generate images with various aesthetic themes. The code logic is transparent, focusing entirely on text wrapping, pagination, and image drawing. There is no evidence of data exfiltration, network activity, or malicious prompt injection; the scripts strictly process provided text files and save images to a local directory as described in SKILL.md.
能力评估
Purpose & Capability
Name/description describe generating Xiaohongshu-style card images; the repository contains multiple Python scripts that implement exactly that behavior (rendering text to PNG). No unrelated binaries, credentials, or external services are requested.
Instruction Scope
SKILL.md instructs running the included scripts with: title, subtitle, content file path, and output directory. The scripts read the user-supplied content file and write images to the output directory (printing MEDIA:<path>). This is appropriate for the purpose, but note that the scripts will read any file path you provide — do not pass sensitive system files as the '文案路径'.
Install Mechanism
No install spec is provided (instruction-only at runtime). The code depends on Pillow and system fonts (SKILL.md mentions Pillow and macOS fonts). Absence of an install step means nothing is fetched at install time; you must ensure Pillow is available in the runtime environment.
Credentials
The skill declares no environment variables or credentials and the code does not attempt to read env vars, network endpoints, or secret files. Font paths reference macOS system fonts — a platform assumption, not a credential request.
Persistence & Privilege
always:false and no special persistence or modifications to agent/system configuration. Scripts only create the user-specified output directory and image files; they do not modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install card-renderer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /card-renderer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of card-renderer skill. - Generates visually styled knowledge cards for Xiaohongshu content from Markdown or text files. - Supports multiple design themes: Mac Pro, Cyberpunk, Bauhaus, Vintage, Dreamy, VS Code, Polaroid, Magazine, Minimal Grid, Split Color, Framed Minimal. - Automatically paginates content into cover and details images. - Unified script calling interface for all styles. - Provides clear guidance on expanding with new style scripts. - Requires Pillow and macOS system fonts; outputs 1080x1440 images with preview support.
元数据
Slug card-renderer
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

小红书卡片生成器 是什么?

为小红书文案生成不同风格的知识卡片附图(如 Mac Pro、赛博朋克、包豪斯风)。当用户需要将 Markdown 文案渲染成美观的图片卡片时使用。支持自动分段渲染封面和详情页。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 361 次。

如何安装 小红书卡片生成器?

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

小红书卡片生成器 是免费的吗?

是的,小红书卡片生成器 完全免费(开源免费),可自由下载、安装和使用。

小红书卡片生成器 支持哪些平台?

小红书卡片生成器 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 小红书卡片生成器?

由 MrQ(@mr-q526)开发并维护,当前版本 v1.0.0。

💬 留言讨论