with one click
xhs-md2img
将Markdown批量导出固定尺寸的小红书长文图片。适用"md转图片/转小红书长文图"。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
将Markdown批量导出固定尺寸的小红书长文图片。适用"md转图片/转小红书长文图"。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Generate a project-specific AGENTS.md draft from the current repository when the user asks to initialize, create, rewrite, or refine AGENTS.md for this repo. Use when the user wants only repo-specific instructions, not generic coding rules. This skill must inspect the current repository, extract its local conventions and boundaries, present a draft first, and wait for user confirmation before writing or overwriting AGENTS.md.
Generic memory and self-improvement skill for user-level or project-level contexts. Use when the user wants Codex to remember stable preferences, workflow patterns, repeated failures, or durable context; when checking whether memory/automation/AGENTS are initialized; when initializing memory infrastructure in ~/.codex or a project root; or when listing, deleting, clearing, or promoting memory records.
小红书爆款文案助手。将技术或职场经历转化为情感共鸣强、极具传播力的故事。遵循S.L.R.A.模型。
skill查询与管理。列出所有可用skill清单,搜索及查看skill详细用法。
将 Markdown 转为适合小红书粘贴的纯文本(去掉
大齐风格文章撰写与初稿生成。模拟通俗有趣、去AI味的专家口吻,输出高质量内容。
| name | xhs-md2img |
| description | 将Markdown批量导出固定尺寸的小红书长文图片。适用"md转图片/转小红书长文图"。 |
Convert a Markdown article into fixed-size Xiaohongshu (小红书) long-form images.
/xhs-md2img posts/turing-story/source.md
Important: All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions:
SKILL_DIR${SKILL_DIR}/scripts/<script-name>.ts${SKILL_DIR} in this document with the actual pathScript Reference:
| Script | Purpose |
|---|---|
scripts/md2image.ts | Main script to convert Markdown to images |
Output directory: xhs-img/{topic-slug}/
alan-turing-bio)turing-story-20260118-143052)Contents:
| File | Description |
|---|---|
source.{ext} | Source files |
pages/temp.html | Temporary HTML file for rendering |
NN-page.png | Generated images |
Comic Progress:
- [ ] Step 1: Check existing
- [ ] Step 2: Generate images
- [ ] Step 3: Completion report
| Step | Action | Key Output |
|---|---|---|
| 1 | Check existing directory | Handle conflicts |
| 2 | Generate images | NN-page.png |
| 3 | Completion report | Summary |
# Basic (render directly from the original Markdown)
npx -y bun ${SKILL_DIR}/scripts/md2image.ts article.md \
--out xhs-img/${TOPIC_SLUG} \
--width 1440 --height 1920 \
--device-scale 2 \
--body-font-px 50 \
--font sans \
| Option | Description |
|---|---|
<markdown-file> | Input Markdown file path (required) |
--out <dir> | Output directory (default: xhs-img). Supports nested paths like xhs-img/<topic-slug> |
--width <px> | Single-page width (default: 1440) |
--height <px> | Single-page height (default: 1920, 3:4) |
--device-scale <n> | Device scale factor / DPR (default: 2) |
--body-font-px <px> | Body font size in px (default: 50) |
--font <sans|serif> | Body font family style (default: sans) |
| Variable | Description |
|---|---|
| (none) | No environment variables are required by this skill |
Load Priority: CLI args > defaults
executablePathcolumn-width = page width, column-gap = 0)clip: { x: pageIndex * width, y: 0, width, height }file://... URLs---) are not rendered (treated as semantic separators but visually noisy)