xhs-md-to-plain-text
SKILL.md
XHS Markdown → Plain Text
把 Markdown 里的标记(标题 #、加粗 **、列表符号、引用 >、链接语法等)去掉,输出为 .txt,方便直接粘贴到小红书。
使用方法
Step 0:设置 SKILL_DIR
SKILL_DIR="/path/to/xhs-md-to-plain-text"
Step 1:生成纯文本
- 生成完整文本(全文件去标记)
npx -y bun ${SKILL_DIR}/scripts/md2text.ts /path/to/article.md --out xhs-img
- 只抽取
## 正文内容到## 标签之间(更适合直接发正文)
npx -y bun ${SKILL_DIR}/scripts/md2text.ts /path/to/article.md --body-only --out xhs-img/body.txt
参数
npx -y bun ${SKILL_DIR}/scripts/md2text.ts <markdown-file> [options]
Options:
--out <path> 输出文件路径或输出目录(默认: xhs-img)
--body-only 仅抽取“正文内容”段(## 正文内容 → ## 标签)
Weekly Installs
4
Repository
daqi/daqi-skillsGitHub Stars
1
First Seen
Feb 11, 2026
Security Audits
Installed on
gemini-cli4
github-copilot4
codex4
kimi-cli4
amp4
opencode4