Token导航 LogoToken导航TokenDH.com
开发操作浏览器unknown未标认证来源可访问许可证需确认审计通过

xhs-md2imgXHS md2img 开发

Agent Skill

xhs-md2img 用于补充开发相关能力,适合在 Local Agent 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

494

周安装

21

下载量

173
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:xhs-md2img(XHS md2img 开发)
来源仓库:https://skills.volces.com
仓库路径:xhs-md2img
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

用于补充开发相关能力,支持 Local Agent 承接开发任务。

  • 适合在需要让 Agent 处理开发事项时使用。
  • 可结合来源仓库和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件操作。
  • xhs-md2img 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

xhs-md2img

Convert Markdown text into beautiful Xiaohongshu (XHS) style card images. Supports 5 color themes, automatic pagination, smart LLM-powered title extraction, and AI-generated decorative backgrounds.

Overview

This skill renders Markdown content as multi-page card images optimized for Xiaohongshu (Little Red Book) posts. It handles the full pipeline from raw text to publish-ready PNG images.

Use cases:

  • Convert long-form content into XHS-ready multi-image posts
  • Generate styled card images from Markdown articles
  • Create visually appealing social media graphics with AI backgrounds

Quick Start

Minimal input — just provide Markdown text:

{
  "markdown": "## 5个提升效率的方法\n\n**1. 番茄工作法** — 25分钟专注 + 5分钟休息\n\n**2. 任务批处理** — 把相似的事情集中做\n\n> 效率不是做更多的事,而是用更少的时间做对的事。"
}

This produces a single card image with the default (white) theme.

Input Parameters

See templates/input-schema.json for the full JSON Schema. Key parameters:

ParameterTypeDefaultDescription
markdownstring*(required)*Markdown content. Use --- for manual page breaks.
titlestring*(auto-extracted)*Cover title. If omitted, LLM extracts one from content.
authorstringAuthor name shown on cover.
descriptionstringCover subtitle/description.
themeenum"default"Color theme: default, monokai, nord, sakura, mint.
font_familyenum"sans-serif"Font: sans-serif, serif, wenkai.
paddingenum"medium"Card padding: small, medium, large.
show_coverbooleantrueWhether to show cover block.
bg_styleenum"ai_art"Background: ai_art (AI-generated) or none (solid color).

Rendering Pipeline

The rendering pipeline has 5 stages:

1. Smart Format (LLM)

If the input is plain text (not already Markdown), the LLM reformats it:

  • Title extraction: Extracts a short, punchy cover title (10-20 chars)
  • Body formatting: Adds Markdown structure (## headings, **bold**, - lists, > quotes)
  • Constraint: The LLM is strictly forbidden from modifying any original text content — it can only add Markdown formatting marks

The LLM prompt enforces: all emojis, hashtags, special symbols, and wording must be preserved verbatim. Only Markdown formatting (##, **, -, >, blank lines) may be added.

2. Markdown to HTML

Uses python-markdown with extensions:

  • tables, fenced_code, codehilite (Pygments), nl2br, sane_lists, smarty, attr_list, md_in_html, toc
  • XHS hashtags (#tag#) are converted to styled pill badges

3. HTML/CSS Card Construction

Builds a full HTML page with CSS styling per theme. Each card is a fixed-size div (375x500px base, exported at 3x = 1125x1500px). See templates/card-template.html for the template structure.

Card structure:

.xhs-card (fixed size, background color)
├── .bg-art (optional AI background, low opacity overlay)
└── .card-inner (z-index:1, above background)
    ├── .cover-block (title, author, description — first page only)
    └── .prose-content (rendered Markdown HTML)

4. Auto-Pagination (Playwright JS)

Content that overflows a single card is automatically split across multiple pages:

  1. Playwright measures each top-level element's height in the browser
  2. Elements are grouped into pages that fit the card height
  3. New card divs are created in the DOM with cloned background art
  4. Page numbers (1 / N) are added to each card
  5. The last card is shrunk to fit its content (avoids large empty space)

5. Screenshot & Upload

Each .xhs-card div is screenshotted as PNG via Playwright. Images are uploaded to Alibaba Cloud OSS if configured, otherwise returned as base64 data URIs.

Theme System

5 built-in themes with carefully tuned palettes. See references/themes.md for full hex values.

ThemeBackgroundFeel
defaultWhite #ffffffClean, professional
monokaiDark #272822Tech, developer-oriented
nordDeep blue #2e3440Nordic minimalist
sakuraSoft pink #fff5f5Warm, feminine
mintLight green #f0faf4Fresh, natural

AI Background Generation

When bg_style: "ai_art", the skill generates a subtle decorative background image:

  1. Prompt generation: LLM creates an image prompt based on the card's text content and theme
  2. Image generation: Routes to one of two providers automatically:

- Gemini (if LLM_API_KEY points to googleapis.com): Native Gemini API, returns base64 data URI, synchronous - DashScope wanx (if DASHSCOPE_API_KEY is set): Async submit + poll, returns URL

  1. Compositing: Background is overlaid at very low opacity (8-18% depending on theme) behind the card content

See references/api-reference.md for API details.

Prompt constraints: Generated backgrounds are always abstract decorative elements (watercolor, bokeh, geometric lines, plant silhouettes) — never text, faces, or specific objects.

Output Format

{
  "__type": "xhs_card_images",
  "title": "Extracted or provided title",
  "theme": "default",
  "total_pages": 3,
  "pages": [
    {
      "index": 0,
      "page": 1,
      "total_pages": 3,
      "width": 1125,
      "height": 1500,
      "size_bytes": 123456,
      "url": "https://...",
      "oss_uploaded": true
    }
  ]
}

If OSS is not configured, each page includes data_uri instead of url, with oss_uploaded: false.

Privacy & External Endpoints

This skill makes network calls to:

EndpointPurposeData sent
LLM API (configurable)Smart formatting, BG prompt generationText content (title + body summary)
DashScope wanx APIAI background image generationEnglish image prompt (no user content)
Gemini APIAI background image generation (alternative)English image prompt (no user content)
Alibaba Cloud OSSImage upload (optional)Generated PNG images

No user content is sent to image generation APIs — only LLM-generated English art prompts describing abstract decorative elements.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

79.24%
按下载量换算137

安全审计

Socket

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills