pdf-bib-import

pdf-bib-import is a skill for Claude Code, Codex from yipng05-max/-skills. It costs 108 tokens per session (2,265 once invoked), scanned A, original, MIT.

A batch tool for extracting bibliographic details from multiple research-paper PDFs and importing them into a Feishu Base table. Bibliographic details include titles, authors, dates, journals, page information, DOIs, and abstracts.

In plain words
What is it for?
Use it to process a folder of academic PDFs, extract their citation information, check the results, and import the data into Feishu.
Why use it?
It avoids entering paper metadata one document at a time and keeps the collected references in one structured table.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 /tmp/extract_bib.py "/path/to/pdf_folder".

Good fit Use it to process a folder of academic PDFs, extract their citation information, check the results, and import the data into Feishu.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/yipng05-max/-skills
agentmods
npx agentmods add skills/yipng05-max/-skills/pdf-bib-import

Made for: Claude Code, Codex.

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 pdf-bib-import

README.md
[![agentmods](https://agentmods.dev/badge/skills/yipng05-max/-skills/pdf-bib-import/github.svg)](https://agentmods.dev/skills/yipng05-max/-skills/pdf-bib-import)
Your own site
<a href="https://agentmods.dev/skills/yipng05-max/-skills/pdf-bib-import"><img src="https://agentmods.dev/badge/skills/yipng05-max/-skills/pdf-bib-import/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 pdf-bib-import

Your own site · 80×15
<a href="https://agentmods.dev/skills/yipng05-max/-skills/pdf-bib-import"><img src="https://agentmods.dev/badge/skills/yipng05-max/-skills/pdf-bib-import.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,265 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.
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.00108 $0.02265
Opus 5 $0.00054 $0.01132
Sonnet 5 $0.00022 $0.00453
Haiku 4.5 $0.00011 $0.00227

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

Security

Grade A, and why

pdf-bib-import 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.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

return subprocess.run(cmd, capture_output=True, text=True).stdout.strip()
pdf-bib-import/SKILL.md · 228 lines

How it starts

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

PDF 题录批量导入飞书多维表格

核心原则(必须遵守)

成本控制:数据提取必须用脚本完成,禁止用 AI 逐篇读取 PDF——每次 AI 读取都消耗大量 token。

正确流程:写脚本提取 → 人工/脚本校对 → 脚本批量写入飞书,AI 只负责生成脚本和配置飞书结构。


Step 1:脚本提取 PDF 题录

1.1 生成提取脚本

/tmp 下生成 extract_bib.py,利用 pdftotext/opt/homebrew/bin/pdftotext)批量提取:

#!/usr/bin/env python3
"""
extract_bib.py — 从 PDF 目录批量提取题录,输出 bib_data.json
用法:python3 extract_bib.py <pdf_dir>
"""
import os, sys, json, subprocess, re

def run(cmd):
    return subprocess.run(cmd, capture_output=True, text=True).stdout.strip()

def extract_pdf_meta(path):
    info = run(["/opt/homebrew/bin/pdfinfo", path])
    meta = {}
    for line in info.splitlines():
        if ":" in line:
            k, _, v = line.partition(":")
            meta[k.strip()] = v.strip()
    text = run(["/opt/homebrew/bin/pdftotext", "-l", "2", path, "-"])
    return meta, text

def guess_fields(meta, text):
    """从 pdfinfo + 前两页文字中猜测题录字段,返回 dict。"""
    lines = [l.strip() for l in text.splitlines() if l.strip()]
    return {
        "论文题目": meta.get("Title", ""),
        "作者":     meta.get("Author", ""),
        "发表年份": None,
        "期刊名称": "",
        "卷期页码": "",
        "DOI":      "",
        "摘要":     "",
        "_raw_text_preview": "\n".join(lines[:40]),  # 供人工核查
    }

def main():
    pdf_dir = sys.argv[1] if len(sys.argv) > 1 else "."
    results = []
    for fname in sorted(os.listdir(pdf_dir)):
        if not fname.lower().endswith(".pdf"):
            continue
        fpath = os.path.join(pdf_dir, fname)
        meta, text = extract_pdf_meta(fpath)
        rec = guess_fields(meta, text)
        rec["_filename"] = fname
        results.append(rec)
        print(f"  ✓ {fname}")

    out = "/tmp/bib_data.json"
    with open(out, "w", encoding="utf-8") as f:
        json.dump(results, f, ensure_ascii=False, indent=2)
    print(f"\n已写出 {len(results)} 条记录 → {out}")
    print("请检查 bib_data.json,补全缺失字段后再执行 Step 3 导入。")

if __name__ == "__main__":
    main()

运行:

python3 /tmp/extract_bib.py "/path/to/pdf_folder"

Read the full file on GitHub · 228 lines

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 · 228 lines · 108 tokens per session scan A b50ea1c17e1c

Subscribe to this mod's changes

pdf-bib-import is a skill published in the GitHub repository yipng05-max/-skills (285 stars, last pushed 4mo ago), licensed MIT. It adds 108 tokens to every session and 2,265 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). 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