Index of every page on this site: llms.txt
All skills
erafat avatar

/md-to-xhs-cards

@3930f9f
by ERerafat/skills17 stars
1
Run it yourself

Convert a Markdown file into Xiaohongshu (Little Red Book) image cards with deterministic layout, preserving markdown structure order and embedded local images. Use when users ask for direct MD-to-XHS card conversion, markdown poster cards, 图文卡片拆分, or preserving original markdown text/format in social image outputs.

Use this Skill: https://skilld.dev/gh/erafat/skills/md-to-xhs-cards

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈349 tokens on demand. Your agent reads this file only when SKILL.md points to it.

md-to-xhs-cards

Convert Markdown into Xiaohongshu (小红书 / RedNote) image cards with deterministic layout, local image support, and optional direct XHS publishing.

What It Does

  • Converts .md content into 3:4 card images (1080x1440 by default)
  • Preserves source order (headings, paragraphs, lists, quotes, code, images)
  • Supports Markdown images and Obsidian embeds (![[...]])
  • Generates a cover card and ending signature
  • Optionally publishes generated cards to Xiaohongshu

Quick Start

scripts/run_md_to_xhs_cards.sh path/to/post.md

Output:

  • NN-card.png files
  • manifest.json

Render + Publish to XHS

scripts/run_md_to_xhs_cards.sh path/to/post.md \
  --publish-xhs \
  --publish-title "标题" \
  --publish-desc "正文摘要"

Dry-run publish:

scripts/run_md_to_xhs_cards.sh path/to/post.md \
  --publish-xhs \
  --publish-dry-run

Cookie Configuration

Publishing reads cookie in this order:

  1. --publish-cookie
  2. XHS_COOKIE environment variable
  3. .env in current directory or skill directory

Files

  • SKILL.md - skill instructions for Codex/Claude
  • scripts/md_to_xhs_cards.py - renderer
  • scripts/publish_xhs.py - publisher
  • references/render-spec.md - render options/spec

Keywords

Xiaohongshu, RedNote, 小红书, markdown to image cards, XHS publishing, Codex skill, Claude skill.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings2mo4 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill converts Markdown files into Xiaohongshu image cards and includes a publishing utility. It handles sensitive authentication cookies stored in local environment files. While functional, it introduces a potential attack surface where a malicious Markdown file could trick the agent into exfiltrating session cookies to an unauthorized API endpoint.

  • Socket2mo

    1 alert: gptSecurity

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer8mo

    4/6 files flagged

Signed by skilld at 3930f9f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Steadyupdated 9 months ago

README badge

README badge for erafat/skills/md-to-xhs-cards