paper2xhs
paper2xhs transforms academic PDFs into Xiaohongshu multi-image posts where you drive the creative work. You read the paper, write the caption and title, pick key figures, and the skill handles PDF parsing, cover generation (via API or local fallback), and optional publishing to Xiaohongshu.
paper2xhs converts academic papers into Xiaohongshu posts with AI-generated covers and extracted figures.
AI-generated summary based on this skill's SKILL.md
Install
QuZhan51496/paper2anything/paper2xhs · repository language: Python
git clone https://github.com/QuZhan51496/paper2anything
cp -r paper2anything/paper2xhs ~/.claude/skills/paper2xhsnpx skillfed install QuZhan51496/paper2anything/paper2xhsFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I convert an academic paper to a Xiaohongshu post?
paper2xhs reads your PDF, extracts figures and text, then guides you through writing a caption and title. You select key visuals, and the skill generates a cover image (via API or local fallback) and formats everything into a Xiaohongshu multi-image post ready to publish or edit further.
Can paper2xhs turn PDF into little red book content automatically?
paper2xhs automates the technical heavy lifting—PDF parsing, figure extraction, and cover generation—but keeps you in control of the creative decisions. You write the caption and title, choose which figures to include, and decide whether to publish. This human-in-the-loop approach ensures accuracy and engagement.
What does paper2xhs do with research figures and data?
paper2xhs extracts figures and data visualizations from your PDF and repurposes them as cover art and post images. You can select which visuals best tell your story, and the skill arranges them into Xiaohongshu's multi-image format for maximum visual impact on the platform.
Does paper2xhs support automated paper to XHS conversion?
paper2xhs streamlines the workflow from PDF to multi-image post through automation of parsing, extraction, and formatting. Cover generation uses an API when available or falls back to local methods. Your editorial decisions—caption, title, and figure selection—remain central to the process.
How does paper2xhs generate cover images for posts?
paper2xhs generates cover images via API integration when available, with a local fallback option if the API is unavailable. You can also extract and use existing figures from the paper. This flexibility ensures your Xiaohongshu post always has a compelling visual entry point.
Can I publish directly to Xiaohongshu from paper2xhs?
paper2xhs formats your multi-image post and can optionally publish directly to Xiaohongshu. You maintain full control over the final content before publishing, allowing you to review captions, titles, and image order to ensure everything meets your standards.
SKILL.md
rendered from the published skill — quoted content, verbatim
paper2xhs — 论文转小红书(你主导的协调式)
把一篇论文 PDF 转成小红书帖子。你是主笔:这份文件是配方,不是全自动脚本——
没有 main.py。机械步骤(解析 / 封面 / 发布)调用 scripts/ 下的小工具;论文理解、
选题角度、文案撰写由你亲自完成(用 Read 看材料、用 Write 落产物),并在关键点用
AskUserQuestion 与用户确认。
PDF
→ 解析 (parse_pdf.py:MinerU → parsed/ + figures/)
→ 你读懂论文 (读 parsed/ + 看 figures/) → understanding/paper_understanding.json [确认选题角度]
→ 你写小红书文案 (标题/正文/标签/封面文字) → xhs_post.json + xhs_post.md [确认文案]
→ 封面+配图 (cover.py 封面:默认 API 生图 gpt-image-2、无 key 回退本地合成;
post_images.py 配图:把你选的论文主图/主实验图按序复制成图集,原图直出)
→ 半自动发布 (publish.py:封面+配图多图帖,可选)
→ 小红书帖子
运行方式
- 一步步来:机械步骤用
Bash调脚本,创作步骤你自己用Read/Write做。不要试图一条命令跑完。 - 每个 Bash 块开头就地算
WORKDIR——各 Bash 调用是独立 shell、不共享变量,所以别指望export跨步存活: ```bash WORKDIR="$(dirname "$pdf_path")/.paper2anything/xhs/$(basename
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 9 files
paper2xhs/SKILL.md
paper2xhs/references/publish-guide.md
paper2xhs/scripts/_env.py
paper2xhs/scripts/cover.py
paper2xhs/scripts/parse_pdf.py
paper2xhs/scripts/post_images.py
paper2xhs/scripts/publish.py
paper2xhs/scripts/utils.py
paper2xhs/scripts/xhs_login.py