Claude Skill that makes 3:4 Xiaohongshu/小红书 images based on the content
npx skills add https://github.com/iamzifei/xiaohongshu-images-skill --skill xiaohongshu-imagesInstallieren Sie diesen Skill über die CLI und beginnen Sie mit der Verwendung des SKILL.md-Workflows in Ihrem Arbeitsbereich.
A Claude Code skill that transforms markdown, HTML, or text content into beautifully styled HTML pages with AI-generated cover images, then captures them as sequential screenshots at 3:4 ratio for Xiaohongshu posting.
/baoyu-cover-image skill/baoyu-cover-image skill installed in ~/.claude/skills/# Copy to global skills
cp -r xiaohongshu-images-skill ~/.claude/skills/
# Or symlink for development
ln -s /path/to/xiaohongshu-images-skill ~/.claude/skills/xiaohongshu-images-skill
pip install playwright
playwright install chromium
# Verify the skill exists
ls ~/.claude/skills/baoyu-cover-image/SKILL.md
Invoke the skill in Claude Code:
/xiaohongshu-images
Then provide your content:
/path/to/article.md/xiaohongshu-images
# My Article Title
This is the introduction paragraph explaining the topic...
## Section 1
Content for section 1 with detailed explanation...
## Section 2
More content here with examples...
The skill generates output in ~/Dev/obsidian/articles/<date-title>/:
xhs-preview.html - Styled HTML preview page_attachments/cover-xhs.png - AI-generated cover image_attachments/xhs-01.png, xhs-02.png, ... - Sequential screenshotsxiaohongshu-images-skill/
├── SKILL.md # Main skill definition
├── README.md # This file
├── prompts/
│ └── default.md # Default HTML/CSS styling prompt
├── scripts/
│ └── screenshot.py # Screenshot capture
└── .gitignore
Output directory (outside skill folder):
~/Dev/obsidian/articles/<date>-<title>/
├── xhs-preview.html # Styled HTML preview page
├── imgs/ # Created by baoyu-cover-image
│ ├── prompts/
│ │ └── cover.md # Cover image prompt
│ └── cover.png # Generated cover (moved to _attachments/)
└── _attachments/ # Obsidian-style attachments folder
├── cover-xhs.png # Cover image (moved from imgs/cover.png)
├── xhs-01.png # Screenshot page 1
├── xhs-02.png # Screenshot page 2
└── ...
Create custom styling templates in the prompts/ directory:
.md file (e.g., prompts/minimal.md)Edit prompts/default.md to customize:
Default screenshot dimensions (3:4 ratio for Xiaohongshu):
To modify, edit scripts/screenshot.py:
SCREENSHOT_WIDTH = 1080
SCREENSHOT_HEIGHT = 1440
Captures sequential screenshots of HTML pages.
python scripts/screenshot.py ~/Dev/obsidian/articles/<date>-<title>/xhs-preview.html
Output: ~/Dev/obsidian/articles/<date>-<title>/_attachments/xhs-01.png, xhs-02.png, etc.
Features:
/baoyu-cover-image skill is installed and working/baoyu-cover-image directly to debugplaywright install chromiumIf fonts don't load in screenshots:
screenshot.pyMIT License - See LICENSE file for details.
baoyu-cover-image - Cover image generation (required dependency)chinese-viral-writer - Chinese viral content creationwechat-article-formatter - WeChat article formattingwechat-article-publisher - WeChat publishing automation