Distilled from Xiaohongshu video · visual-rich tutorial

Agent 原生文献管理库 Skill

这不是把 Zotero 搬进 AI,而是重新设计一个让 coding agent 能低损耗读取、按需展开、跨论文比较、可靠生成 Related Work 的本地研究仓库。

32:55
视频长度
656
ASR 片段
59
关键屏幕/页面
1
可复用 skill

操作地图

视频里的核心判断:文献工具解决了“存储/分类”,但会阻碍“计算”。Agent 原生库要让论文、笔记、实验、引用和个人判断都变成 agent 可检索、可分层读取的文件系统。

输入

从 arXiv source、PDF parser 或 OCR 得到 LaTeX/Markdown。

入库

每篇论文一个稳定文件夹,保留 source、PDF、metadata。

笔记

`notes.md` 写 Problem / Method / Results / My Notes。

索引

`papers.md` 作为顶层目录,列位置、标签、三句贡献。

调用

`AGENTS.md` 约束 agent 的读取顺序、引用规则和 subagent 策略。

可检索实践库

用搜索框或标签快速定位。每张卡片都是一个可以直接迁移到自己研究仓库的决策规则。

结构

拋弃 PDF,拥抱纯文本

PDF 对 agent 是高损耗输入。优先下载 arXiv LaTeX source;没有 source 时,用 MinerU 或 OCR/parser 转 Markdown/LaTeX,再把 PDF 作为人工核验附件。

  • 好处:agent 可以用 grep/section 定位 Introduction、Experiments、Related Work。
  • 不要让模型一次读完整 PDF 图像。
结构

`papers.md` 是入口,不是装饰

顶层索引让 agent 不必深入每个论文目录就知道库里有什么。每条记录必须有 path、tags、三句贡献卡:做了什么、怎么做、结果/限制。

结构

`notes.md` 承载你的判断

视频里的关键批评是:PDF 高亮和批注通常不会被重新打开,AI 也看不到你为什么重视某段。把个人判断、反驳、项目连接写入 `notes.md`。

流程

`AGENTS.md` 写仓库宪法

把读取顺序、引用规则、输出 schema、不要虚构 citation、多论文任务的 subagent 策略写成明确规则。它相当于这个文献库的系统提示词。

Protip

渐进式披露省 token,也降噪

先读 `papers.md` 建 shortlist,再读相关 `notes.md`,最后只打开需要的 source section。研究问题时别读实验细节;设计实验时才读 experiments。

Protip

多论文任务用 subagent 隔离上下文

让一个 agent 一次吞 10 篇论文会 lost in the middle。更稳的方式是每篇论文一个 subagent,返回统一 schema,主 agent 只负责合并和批判。

流程

Related Work 由路径说话

让 agent 从本地 notes/source/bib 中找 citation keys 和论点,不从模型记忆里编引用。可以融合几篇最相关论文的 Related Work 结构,再生成自己的 LaTeX。

失败模式

Skill 生成后要验证安装路径

视频演示里 skill creator 有翻车:生成了 skill,但 slash command 找不到。实践中要检查 skill 是否放到 agent 实际加载的目录,并做一次最小 smoke test。

时间线证据

00:08
主题让 coding agent 变成文献库助手,构建 agent native 文献仓库。
01:12
传统工具痛点跨论文对比麻烦、思考锁在 PDF、高亮/批注难复用、上下文断裂。
03:40
Agent 三堵墙PDF 解析损耗、上下文窗口限制、多任务信息干扰。
05:39
输入策略用纯文本而非 PDF 保存;arXiv source 优先,没有 source 用 MinerU 转 Markdown/LaTeX。
09:09
渐进式披露需要时才读更仔细的信息;库分成论文文件夹、`notes.md`、`papers.md`、`AGENTS.md`。
15:17
封装成 skill把下载、解析、建 notes、更新 papers.md 的重复 SOP 变成 fetch paper skill。
23:54
Subagent每篇论文独立上下文读取,避免多论文任务污染主上下文。
27:18
应用写 Related Work、实验章节、表格和图;第一版仍需人工微调。

可复制 Skill 草案

这是把视频方法压成可直接落地的 `SKILL.md`。建议先作为个人技能试跑,再根据你的领域改 `notes.md` 字段。

SKILL.md · agent-native-paper-library
---
name: agent-native-paper-library
description: Build and maintain a literature library designed for coding agents. Use when the user wants to ingest papers, compare papers, write related work, or keep research context queryable across a local workspace.
---

# Agent Native Paper Library

## Goal
Turn a folder of papers into an agent-readable research workspace where every paper has clean source text, a compact note, stable metadata, and explicit instructions for how agents should read, compare, and write from the library.

## When To Use
- You are starting a new research topic from an empty folder.
- You need cross-paper comparison, research trend mapping, or related work drafting.
- You want the agent to read only the information needed for the current question.
- You want your own reading criteria, annotations, and experimental concerns to stay visible to the agent.

## Folder Contract
```text
paper-library/
  AGENTS.md                 # how agents must behave in this library
  papers.md                 # top-level index: title, id, tags, 3-line contribution
  papers/
    1512.03385-resnet/
      source/               # arXiv LaTeX, Markdown, or parsed text
      paper.pdf             # optional, for human reading
      notes.md              # agent/human note for this paper
      metadata.json         # id, title, authors, venue, year, links, tags
  prompts/
    ingest-paper.md
    compare-papers.md
    related-work.md
```

## Core Principles
1. Prefer LaTeX or Markdown over PDF. PDF is for humans; source text is for agents.
2. Use progressive disclosure. The agent reads `papers.md` first, `notes.md` second, and source sections only when needed.
3. Keep every paper structurally isomorphic. Same fields, same headings, same metadata keys.
4. Put your thinking in `notes.md`, not only in PDF highlights.
5. For many-paper jobs, use one subagent per paper, then merge summaries in a clean parent context.
6. Related work must cite from local `.bib`/source paths, not model memory.

## Ingest Workflow
1. Resolve the paper id or URL.
2. Download arXiv source when available; otherwise parse PDF into Markdown/LaTeX with MinerU or another OCR/parser.
3. Create the paper folder using a stable id and short slug.
4. Create `metadata.json`.
5. Ask the agent to read source text and write `notes.md` using the library note schema.
6. Update `papers.md` with tags, location, and a three-line contribution card.
7. Verify that links, paths, and citations resolve locally.

## `notes.md` Schema
```markdown
# <Paper Title>

## Problem
What problem does the paper solve, and why did it matter at publication time?

## Method
What is the core method, architecture, dataset, loss, or experimental design?

## Results
What changed compared with prior work? Include metrics only when they affect decisions.

## Useful For
When should this paper be retrieved for future research questions?

## My Notes
Personal judgment, objections, follow-up ideas, and connections to current projects.

## Evidence Pointers
- source/<file>.tex:<section or line if available>
- paper.bib:<citation key>
```

## `papers.md` Entry Schema
```markdown
## <citation-key> — <title>
- Path: `papers/<id-slug>/`
- Tags: <topic>, <method>, <dataset>, <task>
- One-liner: <what it does>
- Solves: <problem>
- How: <method>
- Result: <effect or limitation>
```

## Agent Rules
- Start every task by reading `AGENTS.md` and `papers.md`.
- Do not open source files for every paper unless the task requires it.
- When comparing papers, first build a shortlist from `papers.md`, then open relevant `notes.md`, then open source sections.
- For more than five papers, spawn subagents with isolated context and require each to return the same schema.
- Never invent citations. Use local citation keys or explicit source paths.
- If parsing quality is uncertain, state the uncertainty and point to the original PDF.

## Verification
- `papers.md` mentions every folder under `papers/`.
- Every `notes.md` has Problem, Method, Results, Useful For, My Notes, Evidence Pointers.
- Every related-work draft includes citation keys that exist in local `.bib` or metadata.
- Large comparison tasks do not paste all papers into one context.

Prompt 模板

入库一篇论文
给定 arXiv id 或 URL。下载 source;如果没有 source,解析 PDF 为 Markdown。创建标准目录、metadata、notes.md,并更新 papers.md。先列计划,执行后验证路径和 citation key。
跨论文比较
先从 papers.md 找候选论文。每篇打开 notes.md,只在需要时读 source section。输出共同问题、方法差异、实验差异、可组合 idea、证据路径。
写 Related Work
从本地库选择最相关论文,读取它们的 notes、Related Work 和 bib。生成 LaTeX 段落,所有 citation key 必须来自本地文件;缺失 citation 时标记 TODO,不要编。
实践底线:Agent 原生不是“把所有东西喂给模型”,而是把文件系统设计成模型可以自己逐层探索的研究界面。