Agent skill

paper2xhs

把学术论文 PDF 转成小红书多图帖(标题 + 正文 + 标签 + 封面 + 论文主图/主实验结果配图)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面与配图、半自动发布)交给 scripts/ 下的小工具,论文理解、选题角度、文案撰写由你亲自完成并在关键点与用户确认。当用户说“论文转小红书”、“paper2xhs”、“把这篇论文发小红书”、“论文转社交媒体”、“PDF 转小红书帖子”时触发。

QuZhan51496github.com/QuZhan51496GitHub ↗
claude-codecan modify filesships scriptsApache-2.0
Install
npx skills add QuZhan51496/paper2anything --skill paper2xhs --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 9
SKILL.md size: 12 KB
Bundled scripts: yes
Allowed tools: BashReadWriteGlobGrepAskUserQuestionSendUserFile
Path: paper2xhs/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 333
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# paper2xhs — 论文转小红书(你主导的协调式) 把一篇论文 PDF 转成小红书帖子。**你是主笔**:这份文件是配方,不是全自动脚本—— 没有 `main.py`。机械步骤(解析 / 封面 / 发布)调用 `scripts/` 下的小工具;**论文理解、 选题角度、文案撰写由你亲自完成**(用 Read 看材料、用 Write 落产物),并在关键点用 `AskUserQuestion` 与用户确认。 ```text 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:封面+配图多图帖,可选) → 小红书帖子 ``` ## 运行方式 1. **一步步来**:机械步骤用 `Bash` 调脚本,创作步骤你自己用 `Read` / `Write` 做。不要试图一条命令跑完。 2. **每个 Bash 块开头就地算 `WORKDIR`**——各 Bash 调用是独立 shell、不共享变量,所以别指望 `export` 跨步存活: ```bash WORKDIR="$(dirname "$pdf_path")/.paper2anything/xhs/$(basename "${pdf_path%.*}")" ``` 其中 `$pdf_path` 是用户给的论文 PDF 路径(每个块都重新设一次)。脚本在 `${SKILL_DIR}/scripts`——`SKILL_DIR` 是**本 skill 的目录**(见本 skill 顶部注入的 "Base directory for this skill: …");各 Bash 块独立 shell, 用到它的块开头按需 `export SKILL_DIR=<那个目录>` 一次(和 `WORKDIR` 一样每块现设)。 3. **在两个决策点用 `AskUserQuestion` 暂停**:① 读懂论文后确认“选题角度”;② 文案成稿后确认。用户想改,可直接改产物 JSON/MD 或告诉你改。 4. **小红书是“准确、不夸大的科普”**:忠实反映论文贡献,口语化、有钩子,但**绝不编造数据或夸大结论**。 --- ## Step 0:环

What's inside
Steps it walks through
  1. 运行方式
  2. Step 0:环境与凭据
  3. Step 1:解析 PDF(脚本)
  4. Step 2:读懂论文 → 写 understanding(你来做)[确认]
  5. Step 3:写小红书帖子(你来做)[确认]
  6. Step 4:生成封面与配图(脚本,可选)
  7. Step 5:发布到小红书(脚本 + 你协调,可选)
  8. Step 6:把成品归集到 PDF 旁
  9. 产物位置
  10. 排错
Ships with 8 files
  • references/publish-guide.md
  • scripts/_env.py
  • scripts/cover.py
  • scripts/parse_pdf.py
  • scripts/post_images.py
  • scripts/publish.py
  • scripts/utils.py
  • scripts/xhs_login.py
Commands it runs
set -a; source <paper2anything 包根>/.env; set +a
conda run -n paper2anything --no-capture-output python -c "import requests, rich, dotenv" 2>&1
conda run -n paper2anything --no-capture-output \
python "${SKILL_DIR}/scripts/parse_pdf.py" "$pdf_path" --workdir "$WORKDIR"
python "${SKILL_DIR}/scripts/cover.py" --workdir "$WORKDIR" \
python "${SKILL_DIR}/scripts/post_images.py" --workdir "$WORKDIR"
export XHS_MCP_DIR="$HOME/.paper2anything/xhs"; mkdir -p "$XHS_MCP_DIR"
if [ -n "$XHS_MCP_BIN" ] && [ -x "$XHS_MCP_BIN" ]; then BIN="$XHS_MCP_BIN"; else
case "$(uname -s)-$(uname -m)" in
esac
More from paper2anything
All skills →
About this skill
What does the paper2xhs skill do?

把学术论文 PDF 转成小红书多图帖(标题 + 正文 + 标签 + 封面 + 论文主图/主实验结果配图)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面与配图、半自动发布)交给 scripts/ 下的小工具,论文理解、选题角度、文案撰写由你亲自完成并在关键点与用户确认。当用户说“论文转小红书”、“paper2xhs”、“把这篇论文发小红书”、“论文转社交媒体”、“PDF 转小红书帖子”时触发。

How do I install it?

Run `npx skills add QuZhan51496/paper2anything --skill paper2xhs --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From QuZhan51496/paper2anything, a repository with 333 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going