Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

md-to-xhs-cardsmd 转 xhs 卡

Agent Skill

md-to-xhs-cards 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

384

周安装

16

GitHub Stars

12

下载量

128
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/erafat/skills --skill md-to-xhs-cards

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。

  • 适合围绕代码变更或仓库状态进行整理分析。md-to-xhs-cards 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 通过 GitHub 安装,建议核验权限范围和命令执行风险。
  • 使用前应确认维护状态及是否会触发网络请求。
  • 可结合原始 README 了解具体操作流程。

SKILL.md

Markdown To Xiaohongshu Cards

Overview

Convert markdown content into a multi-image card set suitable for Xiaohongshu posting. Keep source ordering and formatting cues (headings, paragraphs, lists, quotes, code, dividers, images) without rewriting the content.

Quick Start

  1. Resolve the markdown file path from the user request.
  2. Run:
scripts/run_md_to_xhs_cards.sh /absolute/or/relative/path/to/file.md
  1. Return output folder and generated card paths.

Default output folder: <markdown-dir>/<markdown-stem>-xhs-cards

Workflow

  1. Validate input:
  • Confirm markdown file exists.
  • Confirm referenced images are local files when possible (![...](...) or Obsidian ![[...]]).
  1. Execute deterministic rendering:
  • Run scripts/run_md_to_xhs_cards.sh.
  • Use --width and --height to match required aspect ratio.
  • Use --background, --text-color, and related flags for style adjustment.
  • Use --author (and optionally --title / --subtitle) for a dedicated cover card.
  1. Verify output:
  • Ensure at least one NN-card.png exists.
  • Check manifest.json for count and filenames.
  • If images are missing, report placeholders and list unresolved image paths.
  1. Optional publish to Xiaohongshu:
  • Add --publish-xhs to publish immediately after rendering.
  • Use --publish-title / --publish-desc overrides when needed.
  • For safe validation, run once with --publish-dry-run.
  1. Report clearly:
  • Provide absolute output directory.
  • Provide absolute paths for all generated cards.
  • Call out any missing/remote image limitations.

Quality Rules

  • Keep direct conversion behavior: do not rewrite the article content unless user asks.
  • Keep markdown block order stable.
  • Preserve image placement where possible (markdown and Obsidian image embeds).
  • Prefer 3:4 cards for Xiaohongshu (1080x1440 or 1242x1660).

Common Commands

Default:

scripts/run_md_to_xhs_cards.sh content/post.md

Set explicit output directory:

scripts/run_md_to_xhs_cards.sh content/post.md --output-dir exports/xhs-cards

Use larger Xiaohongshu canvas:

scripts/run_md_to_xhs_cards.sh content/post.md --width 1242 --height 1660

Style tuning:

scripts/run_md_to_xhs_cards.sh content/post.md \
  --background "#f3f3f3" \
  --text-color "#141414" \
  --muted-color "#6f6f6f" \
  --line-height-scale 1.80

Render + publish in one command:

scripts/run_md_to_xhs_cards.sh content/post.md \
  --publish-xhs \
  --publish-title "医生的病历写给谁看" \
  --publish-desc "关于病历、医疗决策,与医生的身份危机"

Dry-run publish validation:

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

User Option Packs

Soft reading style:

scripts/run_md_to_xhs_cards.sh content/post.md \
  --background "#faf9f6" \
  --quote-bg "#f4f2eb" \
  --quote-border "#e8e3d7" \
  --quote-accent "#7a756a"

Cover + ending signature:

scripts/run_md_to_xhs_cards.sh content/post.md \
  --author "鹿不角" \
  --signature-text "-- 鹿不角"

Keep author on cover too:

scripts/run_md_to_xhs_cards.sh content/post.md \
  --author "鹿医生" \
  --cover-author

Cover with author:

scripts/run_md_to_xhs_cards.sh content/post.md --author "鹿医生"

Last-page signature (without cover author):

scripts/run_md_to_xhs_cards.sh content/post.md \
  --author "鹿不角" \
  --signature-text "-- 鹿不角"

Dependencies

  • scripts/run_md_to_xhs_cards.sh auto-selects a Python interpreter with Pillow.
  • If none found, install:
python3 -m pip install pillow
  • Optional publishing uses scripts/publish_xhs.py:

- Local mode: python3 -m pip install xhs - API mode (--publish-api-mode): python3 -m pip install requests

  • Cookie lookup supports:

- --publish-cookie - XHS_COOKIE environment variable - .env in current directory / skill directory

References

  • Rendering details and defaults: references/render-spec.md

Claude Compatibility

Use the same command workflow in Claude Code. This skill is CLI-driven and does not depend on Codex-only interaction primitives.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.92%
按下载量换算46

Claude

27.18%
按下载量换算35

Cursor

20.38%
按下载量换算26

Gemini CLI

8.99%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills