pdf-to-obsidian-canvas

读取一篇学术论文 PDF 和一个 .canvas 模板文件,依据模板节点结构提取并分析论文内容,并输出一个兼容 Obsidian 的 .canvas JSON 文件。用于用户提供 PDF 和文献分析用 canvas 模板时触发。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "pdf-to-obsidian-canvas":https://skillpi.com/zh/skills/deepskill-c1e2b3e4631758b8aa1c4802f5e6d2694e2c45c71a3380e9a3189e5755b43664。安装前核对上游来源和版本:https://skillhub.cn/skills/user_bd4716e5/wwdeqiyi。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

读取一篇学术论文 PDF 和一个 .canvas 模板文件,依据模板节点结构提取并分析论文内容,并输出一个兼容 Obsidian 的 .canvas JSON 文件。用于用户提供 PDF 和文献分析用 canvas 模板时触发。

0 下载

介绍来源: third_party · user_bd4716e5 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
Analyze an academic paper PDF against a predefined canvas template (计量文献分析框架.canvas) and produce an Obsidian-compatible `.canvas` file. The template defines a node-edge graph structure covering bibliographic info, abstract, introduction, literature review, hypotheses, data, methods, results, and contributions.
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: pdf-to-obsidian-canvas
description: "Reads an academic paper PDF and a .canvas template file, extracts and analyzes the paper according to the template node structure, then outputs an Obsidian-compatible .canvas JSON file. Used when user provides a PDF and a canvas template for literature analysis. Triggers: 按照模板分析文献, 输出为canvas文件, 计量文献分析框架, obsidian canvas, 文献分析canvas."
agent_created: true

PDF to Obsidian Canvas — Academic Paper Analysis

Overview

Analyze an academic paper PDF against a predefined canvas template (计量文献分析框架.canvas) and produce an Obsidian-compatible .canvas file. The template defines a node-edge graph structure covering bibliographic info, abstract, introduction, literature review, hypotheses, data, methods, results, and contributions.

Workflow

Step 1: Read the Template Canvas

Read the canvas template file (user-provided path, typically 计量文献分析框架.canvas). Parse its JSON to extract:

  • Every node's id, x, y, width, height, and text (the latter carries the content placeholder/instruction)
  • Every edge's id, fromNode, fromSide, toNode, toSide

The template's text fields contain instructions in Chinese with a PS marker indicating what to fill. Replace each placeholder with the actual analysis content. Section-header nodes (e.g. "文献信息", "结构化信息", "数据", "结果") keep their short labels.

Step 2: Extract Text from the PDF

Use PyPDF2 to extract all text from the paper PDF. If PyPDF2 is unavailable, install it into the managed Python environment first. Read pages sequentially and concatenate all text for analysis.

Step 3: Analyze the Paper — Fill Each Template Node

Map each template node to the corresponding analysis. The major node groups and their content expectations:

Node Group Key Content to Fill
文献名称 Full APA citation
期刊 Journal name, ABS/FT50/UTD24 tier
主题 Research domain/field (1 line)
一句话总结 ≤30 Chinese characters on core contribution
标签 English + Chinese hashtags
摘要 Original English abstract
中文译文 Full Chinese translation of abstract
引言 How the paper enters the field, research questions, research design
引言逻辑结构 Numbered steps of the introduction's argument flow
研究问题 Explicit RQs
研究空白 Numbered list of research gaps
研究设计 Data source, methods, analysis plan
文献综述 What theories are used, what each LR section covers
涉及理论 Named theories with key citations
理论构建框架 The conceptual framework the paper builds
研究假设 All hypotheses with derivation logic
数据采集 Data source, collection method, time range, sample size
变量 DV, IV, controls, moderators with measurement
模型 Econometric model specification with formulas
结果分析 Which hypotheses are supported/not, key coefficients
稳健性检验 Each robustness check and its rationale
理论贡献 Numbered theoretical contributions

Step 4: Generate the Canvas JSON

CRITICAL — use scripts/canvas_builder.py to produce the final file. Do NOT write JSON directly with the Write tool. The script ensures proper formatting that Obsidian can parse.

The script approach:

  1. Build a Python dict with the same nodes and edges structure as the template
  2. Use \u201c and \u201d Unicode escapes for ALL Chinese curly double-quotes within text values
  3. Use Python's json.dump with ensure_ascii=False and indent='\t' to serialize

Why the script is mandatory:

  • Writing JSON directly with the Write tool causes Chinese curly quotes ("", U+201C/U+201D) to be flattened to ASCII straight quotes (", U+0022), which breaks JSON parsing because the straight quotes are interpreted as JSON string delimiters
  • Python's json.dump correctly serializes \n as the two-character escape sequence \n, which Obsidian Canvas requires for multi-line text nodes
  • Tab indentation (indent='\t') matches the template's formatting

Usage of the builder script:

python scripts/canvas_builder.py --template template.canvas --output output.canvas

However, in most cases it is cleaner to write a custom Python script inline that constructs the node content dict and calls json.dump, because each paper's analysis content is unique. The key invariant is: always use json.dump, never Write tool for canvas JSON.

Step 5: Validate and Deliver

After writing the canvas file, verify:

  • JSON is valid (the script ensures this)
  • Node count matches the template
  • Edge count matches the template
  • Multi-line text nodes show \n as literal backslash-n, not actual newlines

Present the file with present_files. Clean up temporary scripts.

Chinese Quotation Mark Handling — Mandatory Rule

For ALL text content that contains Chinese curly double-quotes, use Python variables:

LQ = "\u201c"  # Chinese left double quote "
RQ = "\u201d"  # Chinese right double quote "
text = "文章提出" + LQ + "核心概念" + RQ + "的定义"

Never embed the raw " / " characters directly in Python string literals — use the Unicode escape variables above. This prevents any risk of the quotes being flattened to ASCII.

Template Preservation

Preserve the template's node id, x, y, width, height values exactly. Only modify text and (optionally, if content overflows) width/height for content nodes.

Preserve all edge definitions exactly as-is — they encode the visual graph topology.

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值78/100

亮点

  • 针对学术研究人员提供高效的文献分析自动化能力
  • 将 PDF 论文结构化映射到 Obsidian Canvas 模板,显著提升知识管理效率
触发精准85/100

亮点

  • 触发词覆盖中英文关键场景,边界清晰,有效避免误触
结构规范72/100

待提升项

  • 文档过长 原报告严重程度:轻微

    SKILL.md 内容约600行,超出建议的500行限制

    改进建议:可考虑将部分技术细节移至独立文档或通过折叠区块优化阅读体验

  • 缺少 When to Use 章节 原报告严重程度:轻微

    未显式定义典型使用场景和用户画像

    改进建议:补充 'When to Use' 章节以增强用户引导

亮点

  • Phase 划分清晰,Step 1-5 流程完整,具备端到端执行指导
执行可靠88/100

亮点

  • 强制使用专用脚本处理 JSON 序列化,有效规避中文引号解析风险
  • 覆盖 PyPDF2 依赖缺失等异常场景,具备输出验证机制
证据可验 (前四项均值)81/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。