← Back to Skills Marketplace
mr-q526

小红书卡片生成器

by MrQ · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
361
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install card-renderer
Description
为小红书文案生成不同风格的知识卡片附图(如 Mac Pro、赛博朋克、包豪斯风)。当用户需要将 Markdown 文案渲染成美观的图片卡片时使用。支持自动分段渲染封面和详情页。
README (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> 以便在聊天界面预览。
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install card-renderer
  3. After installation, invoke the skill by name or use /card-renderer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug card-renderer
Version 1.0.0
License
All-time Installs 2
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is 小红书卡片生成器?

为小红书文案生成不同风格的知识卡片附图(如 Mac Pro、赛博朋克、包豪斯风)。当用户需要将 Markdown 文案渲染成美观的图片卡片时使用。支持自动分段渲染封面和详情页。 It is an AI Agent Skill for Claude Code / OpenClaw, with 361 downloads so far.

How do I install 小红书卡片生成器?

Run "/install card-renderer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 小红书卡片生成器 free?

Yes, 小红书卡片生成器 is completely free (open-source). You can download, install and use it at no cost.

Which platforms does 小红书卡片生成器 support?

小红书卡片生成器 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 小红书卡片生成器?

It is built and maintained by MrQ (@mr-q526); the current version is v1.0.0.

💬 Comments