Xhs article to image

From stevehuang0115/crewly · View interactive version

Xhs article to image is an AI agent skill from the GitHub repository stevehuang0115/crewly. Convert markdown articles into XiaoHongShu (小红书) style portrait image cards (1080×1440 PNGs) for social distribution.

How to use this skill

Skill file

xhs-article-to-image

Convert markdown articles into XiaoHongShu (小红书) style image cards.

Description

Generates multiple PNG images (1080×1440, 3:4 portrait ratio) from markdown article content, styled in the popular XiaoHongShu magazine-layout format: bold titles, clean white backgrounds, structured paragraphs with visual hierarchy.

Usage

bash execute.sh '{"content":"# Title\n\nArticle body...","outputDir":"/tmp/xhs-output"}'

Or from a file:

bash execute.sh '{"sourceFile":"/path/to/article.md","outputDir":"/tmp/xhs-output"}'

Parameters

| Parameter | Required | Default | Description |

|-----------|----------|---------|-------------|

| content | Yes* | - | Markdown article content (required if no sourceFile) |

| sourceFile | Yes* | - | Path to markdown file (required if no content) |

| outputDir | Yes | - | Directory to write PNG images to |

| title | No | auto | Override the article title (auto-extracts from first H1) |

| author | No | "" | Author name shown at bottom of pages |

| accentColor | No | "#1a1a1a" | Accent color for decorative elements |

| bgColor | No | "#fafaf8" | Background color |

| maxCharsPerPage | No | 350 | Approximate characters per page before splitting |

| coverImage | No | "" | URL or path to image for the cover page |

Output

Dependencies

Style Features

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.