Token导航 LogoToken导航TokenDH.com
开发操作浏览器clawhub未标认证来源可访问clear审计提醒

xhs-md2picxhs MD2 图片

Agent Skill

xhs-md2pic 用于处理浏览器自动化、网页检查和页面信息提取,适合在 OpenClaw 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

20,265

周安装

836

GitHub Stars

1

下载量

6,621
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install xhs-md2pic

简介

将Markdown文本转换为小红书风格卡片图像,支持自动分页与标题优化。

  • 适合内容可视化展示与图文混排场景,提升笔记吸引力与传播效果。
  • 内置5种主题模板,采用确定性浏览器截图规则生成高质量图片。
  • 需确认输出尺寸与格式要求,避免使用未授权字体或图片资源。
  • 适用于个人创作与商业推广,但需注意版权合规与平台发布规范。

SKILL.md

name
xhs-md2img
description
Convert Markdown text to beautiful Xiaohongshu (XHS) style card images with 5 themes, deterministic browser screenshot rules, auto-pagination, smart title extraction, and AI-generated decorative backgrounds.
metadata
clawdbot
emoji
🎴
requires
env
[DASHSCOPE_API_KEY]
anyBins
[python3, python]
primaryEnv
DASHSCOPE_API_KEY
permissions
network
true
filesystem
true

xhs-md2img

Convert Markdown text into Xiaohongshu (XHS) style multi-page card images with deterministic browser rendering and screenshot behavior.

Overview

This skill renders Markdown content as publish-ready XHS card images and is designed to run reliably in browser screenshot services.

Use cases:

  • Convert long-form content into XHS-ready multi-image posts
  • Generate styled card images from Markdown articles
  • Produce stable multi-page screenshots with consistent size and pagination

Quick Start

Minimal input — just provide Markdown text:

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

Default export is one 1125x1500 PNG card (375x500 CSS px at export_scale=3).

Input Parameters

See templates/input-schema.json for the full schema.

Core content/style params:

  • markdown (required): Markdown content. Use --- for manual page breaks.
  • title, author, description: Cover metadata.
  • theme: default, monokai, nord, sakura, mint.
  • font_family: sans-serif, serif, wenkai.
  • padding: small, medium, large.
  • show_cover: Whether to show cover block.
  • bg_style: ai_art or none.

Browser screenshot control params:

  • card_width / card_height: Single card CSS size (default 375x500).
  • export_scale: Pixel ratio multiplier (default 3).
  • viewport_width / viewport_height: Browser viewport size for rendering stability.
  • page_gap: Vertical gap between cards in DOM (default 20).
  • pagination_mode: mixed (default), auto, manual_only.
  • max_pages: Hard limit to avoid runaway pagination.
  • show_page_number: Whether to render 1 / N indicator.
  • avoid_orphan_heading: Keep headings with at least one following block.
  • last_page_compact: Shrink last card when content is short.

Deterministic Browser Screenshot Contract

Use these hard rules for consistent XHS-like output:

  1. Fixed card geometry
  • Card ratio must stay 3:4 (375x500 base).
  • Output pixel size must be card_width * export_scale by card_height * export_scale.
  • Prefer export_scale=3 for XHS quality (1125x1500).
  1. Stable browser context
  • Run headless browser with deviceScaleFactor=export_scale.
  • Keep zoom at 100%; do not use browser print mode.
  • Use explicit viewport (recommended 440x760 for default card).
  1. Render readiness gates (must pass before pagination/screenshot)
  • Wait for document.fonts.ready.
  • Wait until document.body[data-fonts-loaded="true"] is present.
  • Wait 2 consecutive animation frames with unchanged .xhs-card bounding boxes.
  1. Element-only screenshot
  • Screenshot each .xhs-card element, never full page + crop.
  • Disable animations/transitions during capture.
  • Export PNG only.

For implementation runbook and failure checks, read references/browser-screenshot-spec.md.

Rendering Pipeline

1. Smart Format (LLM)

If input is plain text, reformat to Markdown without changing wording:

  • Extract a short cover title (10-20 chars)
  • Add structure (##, **, lists, quotes)
  • Preserve all original symbols/emojis/hashtags verbatim

2. Markdown to HTML

Use python-markdown with extensions:

  • tables, fenced_code, codehilite, nl2br, sane_lists, smarty, attr_list, md_in_html, toc
  • Convert XHS hashtags (#tag#) into styled pills

3. HTML/CSS Card Construction

Use templates/card-template.html with fixed card dimensions and theme variables.

Card layers:

  • .xhs-card: fixed-size card container
  • .bg-art: optional low-opacity decorative image
  • .card-inner: content layer above background

4. Pagination Rules (Critical)

Apply pagination in DOM, not PDF/print pagination.

Priority order:

  1. Split by manual separators (---) first.
  2. Within each segment, split by top-level block elements.
  3. If avoid_orphan_heading=true, never place a heading as the last visible block on a page.
  4. Keep list/table/code blocks intact when possible.
  5. If a single block exceeds one page, split safely:
  • list: split by li
  • table: split by row groups
  • code/pre: split by line groups
  • paragraph: split by sentences as final fallback

Overflow rule:

  • Page content area must satisfy scrollHeight <= clientHeight.
  • Keep a bottom safety space (~16 CSS px) to avoid visual clipping.

5. Multi-Page Screenshot Output

For each page:

  • Create one .xhs-card node
  • Add optional page indicator page / total_pages
  • Capture element screenshot in PNG
  • Return pages ordered by index

Output shape:

{
  "__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, return data_uri for each page.

XHS Visual Quality Checklist

Before returning images, verify:

  • Exact size per page matches export formula
  • No cropped text at bottom edge
  • Heading/body spacing is consistent across pages
  • Page number style is subtle (low opacity)
  • Last page has no large empty area when last_page_compact=true

Theme System

5 built-in themes are defined in references/themes.md.

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":

  1. LLM generates an abstract decorative prompt from content/theme
  2. Provider auto-select:
  • Gemini first when LLM_BASE_URL is Google
  • DashScope wanx fallback when available
  1. Blend into card with low opacity (8-18% by theme)

Constraints:

  • Decorative only (watercolor/bokeh/geometric/plant silhouettes)
  • No text, no faces, no explicit objects

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

Privacy & External Endpoints

Network calls may include:

  • LLM API: format + title + bg prompt generation
  • DashScope/Gemini: background image generation (prompt only)
  • Alibaba Cloud OSS: optional output image upload

No raw user document is sent to image models; only abstract prompt text is used.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

81.12%
按下载量换算5,371

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills