PDF Text Replace
instavm/coderunner
Replace text in fillable PDF forms by updating form field values.
把学术论文 PDF 转成小红书多图帖(标题 + 正文 + 标签 + 封面 + 论文主图/主实验结果配图)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面与配图、半自动发布)交给 scripts/ 下的小工具,论文理解、选题角度、文案撰写由你亲自完成并在关键点与用户确认。当用户说“论文转小红书”、“paper2xhs”、“把这篇论文发小红书”、“论文转社交媒体”、“PDF…
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add QuZhan51496/paper2anything --skill paper2xhs -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install QuZhan51496/paper2anything paper2xhs --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/QuZhan51496/paper2anything.git skills-src && mkdir -p .claude/skills && cp -r skills-src/paper2xhs .claude/skills/paper2xhs && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "paper2xhs" agent skill from https://github.com/QuZhan51496/paper2anything/tree/main/paper2xhs into .claude/skills/paper2xhs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paper2xhs", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/QuZhan51496/paper2anything/tree/main/paper2xhsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add QuZhan51496/paper2anything --skill paper2xhs -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install QuZhan51496/paper2anything paper2xhs --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QuZhan51496/paper2anything.git skills-src && mkdir -p .agents/skills && cp -r skills-src/paper2xhs .agents/skills/paper2xhs && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "paper2xhs" agent skill from https://github.com/QuZhan51496/paper2anything/tree/main/paper2xhs into .agents/skills/paper2xhs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paper2xhs", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add QuZhan51496/paper2anything --skill paper2xhs -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install QuZhan51496/paper2anything paper2xhs --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QuZhan51496/paper2anything.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/paper2xhs .cursor/skills/paper2xhs && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "paper2xhs" agent skill from https://github.com/QuZhan51496/paper2anything/tree/main/paper2xhs into .cursor/skills/paper2xhs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paper2xhs", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/QuZhan51496/paper2anything.git --path paper2xhs--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add QuZhan51496/paper2anything --skill paper2xhs -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install QuZhan51496/paper2anything paper2xhs --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QuZhan51496/paper2anything.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/paper2xhs .gemini/skills/paper2xhs && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "paper2xhs" agent skill from https://github.com/QuZhan51496/paper2anything/tree/main/paper2xhs into .gemini/skills/paper2xhs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paper2xhs", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install QuZhan51496/paper2anything paper2xhsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add QuZhan51496/paper2anything --skill paper2xhs -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/QuZhan51496/paper2anything.git skills-src && mkdir -p .github/skills && cp -r skills-src/paper2xhs .github/skills/paper2xhs && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "paper2xhs" agent skill from https://github.com/QuZhan51496/paper2anything/tree/main/paper2xhs into .github/skills/paper2xhs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paper2xhs", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add QuZhan51496/paper2anything --skill paper2xhs -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install QuZhan51496/paper2anything paper2xhs --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/QuZhan51496/paper2anything.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/paper2xhs .opencode/skills/paper2xhs && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "paper2xhs" agent skill from https://github.com/QuZhan51496/paper2anything/tree/main/paper2xhs into .opencode/skills/paper2xhs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paper2xhs", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
paper2xhs把学术论文 PDF 转成小红书多图帖(标题 + 正文 + 标签 + 封面 + 论文主图/主实验结果配图)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面与配图、半自动发布)交给 scripts/ 下的小工具,论文理解、选题角度、文案撰写由你亲自完成并在关键点与用户确认。当用户说“论文转小红书”、“paper2xhs”、“把这篇论文发小红书”、“论文转社交媒体”、“PDF…
Paper2xhs is an agent skill from QuZhan51496/paper2anything. 把学术论文 PDF 转成小红书多图帖(标题 + 正文 + 标签 + 封面 + 论文主图/主实验结果配图)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面与配图、半自动发布)交给 scripts/ 下的小工具,论文理解、选题角度、文案撰写由你亲自完成并在关键点与用户确认。当用户说“论文转小红书”、“paper2xhs”、“把这篇论文发小红书”、“论文转社交媒体”、“PDF 转小红书帖子”时触发。
Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `references/publish-guide.md`, `scripts/_env.py` and `scripts/cover.py`).
It sits in Documents & Office, covering PDF. It works with Xiaohongshu, Bash and Model Context Protocol. The repository describes itself as: An agent skills pack that turns an academic paper PDF into slides, a poster, a webpage, a Xiaohongshu post, or a WeChat article (paper2slides/poster/html/xhs/wechat). The licence is Apache-2.0.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 72bf82d. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadWriteGlobGrepAskUserQuestionSendUserFileFrom allowed-tools in the SKILL.md frontmatter.
Ships 7 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
condapythoncurlFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
github.comAlso links to:
mineru.netFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
OPENAI_API_KEYMINERU_API_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Paper2xhs loads about 3.1k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 568 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found patterns that need a careful read before installing.
凭据集中在 paper2anything 包根的 `.env`(从 `.env.example` 复制,已 gitignore)。每个新 shell 先导出一次:set -a; source <paper2anything 包根>/.env; set +ab.com/xpzouying/xiaohongshu-mcp)**(自带无头 Chromium 的单二进制 + REST API)。**登录一次后 cookies 持久、之后免登录**。二进制由 ① 自动备好(`XHS_MCP_BIN`# 解析二进制:优先 .env 的 XHS_MCP_BIN;否则用持久目录里的;都没有就按平台自动下载T= ; echo "未知平台,请手动下载 xiaohongshu-mcp 并在 .env 设 XHS_MCP_BIN" ;;- **MinerU 解析失败**:核对 `.env` 的 `MINERU_API_TOKEN`(在 https://mineru.net 申请);PDF 应 ≤200MB / ≤200 页;能访问 `mineru.net`。重跑 Stepallowed-tools: Bash, Read, Write, Glob, Grep, AskUserQuestion, SendUserFileAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from QuZhan51496/paper2anything at commit 72bf82d, republished under its Apache-2.0 licence (© QuZhan51496). 568 words, ~3,133 tokens.
.claude/skills/paper2xhs/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.把一篇论文 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 做。不要试图一条命令跑完。WORKDIR——各 Bash 调用是独立 shell、不共享变量,所以别指望 export 跨步存活: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 一样每块现设)。AskUserQuestion 暂停:① 读懂论文后确认“选题角度”;② 文案成稿后确认。用户想改,可直接改产物 JSON/MD 或告诉你改。统一环境:所有
python命令都在 paper2anything 的统一 conda 环境里(顶层environment.yml创建),命令以conda run -n paper2anything --no-capture-output为前缀。
凭据集中在 paper2anything 包根的 .env(从 .env.example 复制,已 gitignore)。每个新 shell 先导出一次:
set -a; source <paper2anything 包根>/.env; set +a本 skill 用到的 key(理解与文案由你亲自做,不调用任何 LLM API):
MINERU_API_TOKEN — 解析 PDF(必填)OPENAI_API_KEY(+ OPENAI_BASE_URL) — 封面默认走它生图(gpt-image-2);无 key 或 key 不可用时回退本地合成(复用论文原图)XHS_MCP_BIN — 可选:自定义 xiaohongshu-mcp 二进制位置;不设则发布时 skill 自动按平台下载到 ~/.paper2anything/xhs/。另可选 XHS_MCP_URL(自定义服务地址/端口,默认 http://localhost:18060)。依赖自检(缺啥按提示装;依赖统一在 environment.yml):
conda run -n paper2anything --no-capture-output python -c "import requests, rich, dotenv" 2>&1pdf_path="/path/to/paper.pdf" # ← 用户的论文 PDF
WORKDIR="$(dirname "$pdf_path")/.paper2anything/xhs/$(basename "${pdf_path%.*}")"
conda run -n paper2anything --no-capture-output \
python "${SKILL_DIR}/scripts/parse_pdf.py" "$pdf_path" --workdir "$WORKDIR"产出($WORKDIR 下):
parsed/paper_meta.json(title / authors / abstract)、parsed/sections.json([{title, content}])、parsed/figures_index.json([{figure_id, caption, image_path, page}],image_path 已指向 figures/ 实体)、parsed/references.jsonfigures/* 论文插图实体解析完,先 Read parsed/sections.json 与 parsed/paper_meta.json 通读全文。
这是创作的地基,你自己做判断,不要交给脚本:
Read parsed/sections.json(全文)+ parsed/paper_meta.json;Read parsed/figures_index.json 看图注(个别图 caption 可能为空;多面板大图可能被解析器拆成两半、完整图注只挂在其中一半上,且拆缝处图例/轴标签可能被裁——一律以实际看图为准),并实际 Read 几张候选图片(figures/ 下)判断哪些清晰、适合做封面或配图——图注说“framework”的图在小图里未必好看,只有你的眼睛能判断。Write 落 understanding/paper_understanding.json,schema:{
"paper_title": "...", "method_name": "方法简称(如 AccKV)",
"one_sentence_summary": "一句话讲清这篇做了什么",
"problem": "解决什么问题", "method": "怎么做的",
"highlights": ["有数据支撑的亮点1", "创新点2", "应用价值3"],
"experiment_results": ["关键数据1(含数字)", "..."],
"keywords": ["领域关键词", "..."],
"cover_palette": {"bg": "#F4F5F7", "accent": "#2E86AB"},
"important_figures": [
{"figure_id": "fig_1", "image_path": "<figures_index.json 里的真实路径>",
"suitable_for_cover": true, "importance_score": 0.9, "description": "图说明"}
],
"post_figures": [
{"image_path": "<figures_index.json 里的真实路径>"}
]
}important_figures 必须含 image_path(取自 parsed/figures_index.json,指向真实存在的图)、suitable_for_cover、importance_score——封面默认走 API 生图(gpt-image-2),仅当 OPENAI_API_KEY 未配/不可用时回退本地合成、靠这几个字段复用原图;漏了则回退时无图 → 封面 skipped。post_figures(多图帖正文配图,建议 2~4 张、按展示顺序排):第一张放论文主图(框架/方法总览),
其后放主实验结果图;只放你亲眼 Read 过、缩到手机宽度仍清晰可读的图。配图原图直出、
不做任何加工。发布时图集 = 封面 + 这些配图。cover_palette(可选):本地合成回退路径的配色,按论文领域选 bg(浅色打底) + accent(强调色),标题字色会随底色深浅自动适配。参考浅色调:通用 #F4F5F7+#2E86AB、生物 #EEF6F0+#2D8A5F、物理数学 #F1ECF8+#6A30C2、工程 #FBF0EC+#D85A3C、社科 #F4EEF2+#8A5A78、化学 #EAF4F8+#0E86C0。AskUserQuestion 与用户确认选题角度:这篇论文发小红书主打哪个亮点 / 用什么钩子 / 面向哪类读者。带着确认结果再写文案。按小红书风格亲自撰写,用 Write 落 xhs_post.json 和 xhs_post.md。
小红书文案规则(领域知识):
hashtags 字段同步放这些标签(发布脚本读 hashtags)。cover_text ≤15 字(封面大字用)。产物 schema —— xhs_post.json:
{"title": "...", "body": "含 emoji/换行,末尾带标签的完整正文",
"hashtags": ["#标签1", "#标签2"], "cover_text": "≤15字封面词", "paper_title_zh": "论文中文标题"}xhs_post.md:第一行 # {title},然后正文;可在顶部放  占位(封面在 Step 4 生成)。
写完用 AskUserQuestion 给用户看标题 + 正文摘要,确认或按反馈修改(可直接改 JSON/MD)。
封面主/副标题此刻由你现拟(你已读透论文,比从 JSON 里捡更贴切),经 --title(主标题大字)/ --subtitle(副标题小字)传入:
pdf_path="/path/to/paper.pdf"
WORKDIR="$(dirname "$pdf_path")/.paper2anything/xhs/$(basename "${pdf_path%.*}")"
conda run -n paper2anything --no-capture-output \
python "${SKILL_DIR}/scripts/cover.py" --workdir "$WORKDIR" \
--title "你拟的封面主标题大字" --subtitle "你拟的副标题小字"逻辑:默认用 OPENAI_IMAGE_MODEL(默认 gpt-image-2)生成竖版封面,主标题大字用你传入的 --title、副标题小字用 --subtitle(留空才分别回退 xhs_post.cover_text / 论文标题);未配 OPENAI_API_KEY 或 key 不可用时回退本地合成——复用 understanding.important_figures 里 suitable_for_cover 最高分的论文原图(叠加 --title,配色取 cover_palette);两者都不可用则 skipped(不阻断流程)。产出 cover.png。
生图 API 单次可能要好几分钟(经中转可达 6~7 分钟)——本命令的 Bash 超时设 ≥10 分钟(600000ms),别用默认 2 分钟,超时被杀时 logs/ 不会留 cover_result.json。
再生成正文配图(多图帖的第 2~N 张,纯本地排版、不调 API):
conda run -n paper2anything --no-capture-output \
python "${SKILL_DIR}/scripts/post_images.py" --workdir "$WORKDIR"逻辑:读 understanding.post_figures,把选中的论文原图按序直接复制为
post_images/p1.png|jpg…(原图直出、不加工,后缀随原图);
understanding 没写 post_figures 时回退 important_figures 按分前 3;
一张可用图都没有则 skipped(不阻断)。生成后逐张 Read 亲眼确认——图缩到手机宽度后糊、
文字不可读,就回去调 post_figures(换图/删图)重跑本命令(重跑会清掉旧 p*)。
发布走开源的 xiaohongshu-mcp(自带无头 Chromium 的单二进制 + REST API)。登录一次后 cookies 持久、之后免登录。二进制由 ① 自动备好(XHS_MCP_BIN 仅自定义位置时配,见 Step 0)。首次配置/登录的分环境完整步骤见 references/publish-guide.md——先 Read 它。不发布就跳过本步,把产物路径告诉用户手动发。
① 确保 mcp 二进制就位并在固定持久目录运行(二进制不存在会自动下载;cookies 落这里、跨论文复用):
export XHS_MCP_DIR="$HOME/.paper2anything/xhs"; mkdir -p "$XHS_MCP_DIR"
# 解析二进制:优先 .env 的 XHS_MCP_BIN;否则用持久目录里的;都没有就按平台自动下载
if [ -n "$XHS_MCP_BIN" ] && [ -x "$XHS_MCP_BIN" ]; then BIN="$XHS_MCP_BIN"; else
case "$(uname -s)-$(uname -m)" in
Linux-x86_64) ASSET=xiaohongshu-mcp-linux-amd64 ;;
Darwin-arm64) ASSET=xiaohongshu-mcp-darwin-arm64 ;;
Darwin-x86_64) ASSET=xiaohongshu-mcp-darwin-amd64 ;;
*) ASSET= ; echo "未知平台,请手动下载 xiaohongshu-mcp 并在 .env 设 XHS_MCP_BIN" ;;
esac
BIN="$XHS_MCP_DIR/$ASSET"
if [ -n "$ASSET" ] && [ ! -x "$BIN" ]; then
echo "未找到 mcp 二进制,自动下载 $ASSET …"
curl -fL -o "$XHS_MCP_DIR/$ASSET.tar.gz" "https://github.com/xpzouying/xiaohongshu-mcp/releases/latest/download/$ASSET.tar.gz" \
&& tar xzf "$XHS_MCP_DIR/$ASSET.tar.gz" -C "$XHS_MCP_DIR" && chmod +x "$BIN"
fi
fi
# 起服务(已在跑就跳过;BIN 不可用则报错、不硬起)
if ! curl -sf http://localhost:18060/api/v1/login/status >/dev/null 2>&1; then
if [ ! -x "$BIN" ]; then
echo "mcp 二进制不可用($BIN)——下载失败或平台不支持,无法发布;手动下载并设 XHS_MCP_BIN,见 references/publish-guide.md"
else
( cd "$XHS_MCP_DIR" && nohup "$BIN" -port=:18060 > mcp.log 2>&1 & )
for i in $(seq 1 30); do curl -sf http://localhost:18060/api/v1/login/status >/dev/null 2>&1 && break; sleep 2; done
fi
fi(首次会下载 mcp 二进制 + 其 Chromium(约 150MB),可能要等;日志见 $XHS_MCP_DIR/mcp.log。macOS 若被 Gatekeeper 拦:xattr -c "$BIN"。)
② 查登录态:
conda run -n paper2anything --no-capture-output python "${SKILL_DIR}/scripts/publish.py" --check-only已登录 → 跳到 ④。未登录 → 走 ③。
③ 登录(仅首次或会话失效时):登录要换带界面/monitor 的方式起 mcp,先停掉 ① 起的那个(按进程名精确停,别用 pkill -f,会误杀自身):
pkill -x xiaohongshu-mcp; sleep 1再照 references/publish-guide.md 按环境操作。无头服务器要点:带 -rod "monitor=:9273" 重起 mcp(保持默认无头)→ xhs_login.py 取码 → SendUserFile 把 qr.png 发用户、提醒首次可能要先在 monitor 端口(:9273)的浏览器界面里扫一道「新设备验证」码 → AskUserQuestion 等用户确认扫完 → 监测 cookies 写出 → 成功后再 pkill -x xiaohongshu-mcp 停掉、回 ① 重启(去掉 monitor、加载 cookies)。
conda run -n paper2anything --no-capture-output python "${SKILL_DIR}/scripts/xhs_login.py" \
--out "$XHS_MCP_DIR/qr.png" --cookies "$XHS_MCP_DIR/cookies.json" --wait④ 发布前给用户过目:Read xhs_post.json 把标题 + 正文发给用户看,SendUserFile 发 cover.png 与 post_images/ 下全部配图;用 AskUserQuestion 让用户确认发布并选可见性(选项默认「公开可见」,另有「仅自己可见」「仅互关好友可见」)。
⑤ 发布(传入用户选的可见性):
pdf_path="/path/to/paper.pdf"
WORKDIR="$(dirname "$pdf_path")/.paper2anything/xhs/$(basename "${pdf_path%.*}")"
conda run -n paper2anything --no-capture-output \
python "${SKILL_DIR}/scripts/publish.py" --workdir "$WORKDIR" --visibility "公开可见"图集自动取封面 + post_images/ 下配图(按 p1、p2… 排序,含封面最多 18 张)。返回「发布成功」即完成。
成品默认埋在 .paper2anything/xhs/<stem>/ 里不好找。文案+封面定稿后(无论是否走 Step 5 发布),把它们复制一份
到与 PDF 同级的 <stem>_xhs/ 目录(.paper2anything 内副本保留不动),让用户在论文旁直接取用:
pdf_path="/path/to/paper.pdf"
WORKDIR="$(dirname "$pdf_path")/.paper2anything/xhs/$(basename "${pdf_path%.*}")"
DEST="${pdf_path%.*}_xhs" # 与 PDF 同目录、同名 + _xhs 后缀
i=2; while [ -e "$DEST" ]; do DEST="${pdf_path%.*}_xhs_v$i"; i=$((i+1)); done # 重名则追加 _v2、_v3
mkdir -p "$DEST"
cp "$WORKDIR/xhs_post.md" "$WORKDIR/xhs_post.json" "$DEST/"
[ -f "$WORKDIR/cover.png" ] && cp "$WORKDIR/cover.png" "$DEST/" # 封面可能 skipped,存在才复制
[ -d "$WORKDIR/post_images" ] && cp -r "$WORKDIR/post_images" "$DEST/" # 配图同理,存在才复制xhs_post.md 以  相对引用封面,故文案、封面与配图整组放进 <stem>_xhs/ 子目录、引用不破。
中间产物落在论文旁 <pdf目录>/.paper2anything/xhs/<stem>/(同目录多篇论文按 <stem> 分篇、互不覆盖),最终成品另复制到 PDF 同级的 <stem>_xhs/(Step 6):
| 路径 | 内容 | 谁写 |
|---|---|---|
.paper2anything/xhs/<stem>/parsed/ | MinerU PIR(meta/sections/figures_index/references) | parse_pdf |
.paper2anything/xhs/<stem>/figures/ | 论文插图实体 | parse_pdf |
.paper2anything/xhs/<stem>/understanding/paper_understanding.json | 论文理解 + important_figures | 你 |
.paper2anything/xhs/<stem>/xhs_post.json xhs_post.md | 小红书文案 | 你 |
.paper2anything/xhs/<stem>/cover.png | 封面 | cover |
.paper2anything/xhs/<stem>/post_images/ | 正文配图(论文原图直出 p1.png | jpg…) |
.paper2anything/xhs/<stem>/logs/ | 各脚本 *_result.json | 脚本 |
<pdf目录>/<stem>_xhs/ | 成品归集:xhs_post.md + .json + cover.png + post_images/,与 PDF 同级 | 你(Step 6) |
重跑覆盖工作区 .paper2anything/xhs/<stem>/(中间产物);归集步骤遇同名 <stem>_xhs/ 会另存为 _v2、_v3,不覆盖旧成品。
.env 的 MINERU_API_TOKEN(在 https://mineru.net 申请);PDF 应 ≤200MB / ≤200 页;能访问 mineru.net。重跑 Step 1 即可(覆盖)。skipped):通常是既没配可用 OPENAI_API_KEY、又没有可复用的论文原图。配上 key 走 AI 生图,或确保 understanding.important_figures 有 suitable_for_cover:true 且 image_path 存在的图以供本地合成回退。post_figures[].image_path 必须取自 parsed/figures_index.json 且文件真实存在(路径错会逐张跳过);understanding 没写 post_figures 时回退 important_figures 按分前 3;全无可用图则 skipped。发布只认 post_images/ 下的 p<序号>.* 文件。未登录 → 按 references/publish-guide.md 完成登录(首次注意「新设备验证」);连不上 mcp → 看 ① 是否成功起服务(二进制下载/启动失败查 $XHS_MCP_DIR/mcp.log)。登录成功后须重启 mcp 才会加载 cookies。不发布可跳过 Step 5、手动发产物。publish.py 非零退出(2=未登录、3=连不上)时 conda run 会附带打印一行 ERROR conda.cli.main_run——那只是退出码传播,不是脚本崩溃。© QuZhan51496, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 8 other files (scripts, references) in paper2xhs of QuZhan51496/paper2anything.
Open the folder on GitHubat commit 72bf82d
Paper2xhs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Paper2xhs this skillQuZhan51496/paper2anything | 450 | — | ~3.1k | Automated safety check: Warn | Apache-2.0 | |
| PDF Text Replaceinstavm/coderunner | 893 | — | ~536 | Automated safety check: Pass | Apache-2.0 | |
| PullmdAeternaLabsHQ/pullmd | 486 | — | ~2.6k | Automated safety check: Pass | AGPL-3.0 | |
| MineruNebutra/MinerU-Skill | 123 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Markdown Exporterbowenliang123/markdown-exporter | 272 | 1 repos | ~5.3k | Automated safety check: Pass | Apache-2.0 | |
| Datasheetsbiosshot/easyeda-copilot | 170 | — | ~1.2k | Automated safety check: Pass | MIT |
instavm/coderunner
Replace text in fillable PDF forms by updating form field values.
AeternaLabsHQ/pullmd
Read any web page, document, or YouTube video as clean Markdown using PullMD.
Nebutra/MinerU-Skill
An AI-Native skill for parsing PDF / Office / image files into clean Markdown with MinerU — a fast, zero-config document parser for AI agents.
bowenliang123/markdown-exporter
Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.
biosshot/easyeda-copilot
Download component datasheet PDFs, locate useful pages, and read verified pinouts, electrical limits, thermal data and application notes using the agent's PDF tools.
cookjohn/cnki-skills
Browse journal issues, view table of contents, and download original TOC PDF from CNKI.
QuZhan51496/paper2anything
Convert an academic paper PDF into a publish-ready, self-contained single-page project homepage (a self-contained index.html) — the kind of paper landing page researchers host on GitHub Pages.
QuZhan51496/paper2anything
Turn an academic paper PDF into a presentation deck (.pptx) end-to-end.
QuZhan51496/paper2anything
Convert academic papers (PDF) into conference posters (HTML/PNG).
QuZhan51496/paper2anything
把学术论文 PDF 转成微信公众号深度解读推文(长文 + 配图 + 封面)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面、md2wechat 发布草稿箱)交给 scripts/ 下的小工具,论文理解、文章结构、长文撰写由你亲自完成并在关键点与用户确认。当用户说“论文转公众号”、“paper2wechat”、“把论文写成公众号文章”、“论文转微信推文”、“PDF…
Works with
Categories
把学术论文 PDF 转成小红书多图帖(标题 + 正文 + 标签 + 封面 + 论文主图/主实验结果配图)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面与配图、半自动发布)交给 scripts/ 下的小工具,论文理解、选题角度、文案撰写由你亲自完成并在关键点与用户确认。当用户说“论文转小红书”、“paper2xhs”、“把这篇论文发小红书”、“论文转社交媒体”、“PDF…. Paper2xhs is an agent skill from QuZhan51496/paper2anything.
Paper2xhs fits situations like: tasks that involve PDF.
Run `npx skills add QuZhan51496/paper2anything --skill paper2xhs -a claude-code`. Or copy the skill folder (paper2xhs in QuZhan51496/paper2anything) into .claude/skills/paper2xhs in your project. Claude Code loads it when a task matches its description.
Run `npx skills add QuZhan51496/paper2anything --skill paper2xhs -a codex`. Or copy the skill folder (paper2xhs in QuZhan51496/paper2anything) into .agents/skills/paper2xhs in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add QuZhan51496/paper2anything --skill paper2xhs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/paper2xhs, .gemini/skills/paper2xhs, .github/skills/paper2xhs and .opencode/skills/paper2xhs in your project.
Going by SKILL.md and its folder, Paper2xhs needs Python for the scripts in its folder, the command-line tools its instructions call (conda, python and curl) and credentials named OPENAI_API_KEY and MINERU_API_TOKEN. Our summary lists: Python 3; A credential in MINERU_API_TOKEN; A credential in OPENAI_API_KEY. Its frontmatter pre-approves these tools: Bash, Read, Write, Glob, Grep, AskUserQuestion, SendUserFile.
SKILL.md names 2 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: mineru.net. This is read from the text; nothing was executed.
Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Paper2xhs is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Paper2xhs: PDF Text Replace (instavm/coderunner, 893 stars), Pullmd (AeternaLabsHQ/pullmd, 486 stars), Mineru (Nebutra/MinerU-Skill, 123 stars) and Markdown Exporter (bowenliang123/markdown-exporter, 272 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
QuZhan51496 (a GitHub user) maintains it in QuZhan51496/paper2anything, which has 450 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 16, 2026.
Source: QuZhan51496/paper2anything on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.