paper2xhs

paper2xhs is a skill for Claude Code from QuZhan51496/paper2anything. It costs 143 tokens per session (5,936 once invoked), scanned A, original, Apache-2.0.

A process for turning an academic paper PDF into an illustrated multi-image post for Xiaohongshu, a Chinese social-media platform. It combines a plain-language explanation with a cover, paper figures, and tags.

In plain words
What is it for?
Understanding papers, writing accurate Xiaohongshu titles and captions, creating a cover, selecting main figures or experiment results, and preparing a multi-image post.
Why use it?
It removes the manual work of extracting the paper, choosing a topic angle, writing the post, preparing images, and optionally publishing it.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Good fit Understanding papers, writing accurate Xiaohongshu titles and captions, creating a cover, selecting main figures or experiment results, and preparing a multi-image post.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/quzhan51496/paper2anything/paper2xhs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add QuZhan51496/paper2anything --skill paper2xhs
Clone the repo
git clone --depth 1 https://github.com/QuZhan51496/paper2anything

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for paper2xhs

README.md
[![agentmods](https://agentmods.dev/badge/skills/quzhan51496/paper2anything/paper2xhs/github.svg)](https://agentmods.dev/skills/quzhan51496/paper2anything/paper2xhs)
Your own site
<a href="https://agentmods.dev/skills/quzhan51496/paper2anything/paper2xhs"><img src="https://agentmods.dev/badge/skills/quzhan51496/paper2anything/paper2xhs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for paper2xhs

Your own site · 80×15
<a href="https://agentmods.dev/skills/quzhan51496/paper2anything/paper2xhs"><img src="https://agentmods.dev/badge/skills/quzhan51496/paper2anything/paper2xhs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,936 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 178
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 184
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Rogue Agent · line 11
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 11
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Data Exfiltration · line 189
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Rogue Agent · line 198
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00143 $0.05936
Opus 5 $0.00072 $0.02968
Sonnet 5 $0.00029 $0.01187
Haiku 4.5 $0.00014 $0.00594

Measured 10d ago against content hash 03473bac9717, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

paper2xhs scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/_env.py, scripts/cover.py, scripts/parse_pdf.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fL -o "$XHS_MCP_DIR/$ASSET.tar.gz" "https://github.com/xpzouying/xiaohongshu-mcp/releases/latest/download/$ASSET.tar.gz" \
paper2xhs/SKILL.md · 280 lines

How it starts

The opening of the file, as written. The whole thing — 280 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:封面+配图多图帖,可选)
 → 小红书帖子

运行方式

  1. 一步步来:机械步骤用 Bash 调脚本,创作步骤你自己用 Read / Write 做。不要试图一条命令跑完。
  2. 每个 Bash 块开头就地算 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 一样每块现设)。
  3. 在两个决策点用 AskUserQuestion 暂停:① 读懂论文后确认“选题角度”;② 文案成稿后确认。用户想改,可直接改产物 JSON/MD 或告诉你改。
  4. 小红书是“准确、不夸大的科普”:忠实反映论文贡献,口语化、有钩子,但绝不编造数据或夸大结论

Step 0:环境与凭据

统一环境:所有 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):

Read the full file on GitHub · 280 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 280 lines · 143 tokens per session scan A 03473bac9717

Subscribe to this mod's changes

paper2xhs is a skill published in the GitHub repository QuZhan51496/paper2anything (416 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 143 tokens to every session and 5,936 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories