pdf-to-obsidian-canvas
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "pdf-to-obsidian-canvas" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c1e2b3e4631758b8aa1c4802f5e6d2694e2c45c71a3380e9a3189e5755b43664. Verify the upstream source and version against https://skillhub.cn/skills/user_bd4716e5/wwdeqiyi before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Read an academic paper PDF and a .canvas template file, extract and analyze the paper's content according to the template's node structure, and output an Obsidian-compatible .canvas JSON file. Used when the user provides a PDF and a canvas template for literature analysis.
Introduction source: third_party · user_bd4716e5 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
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: truePDF 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, andtext(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:
- Build a Python dict with the same
nodesandedgesstructure as the template - Use
\u201cand\u201dUnicode escapes for ALL Chinese curly double-quotes within text values - Use Python's
json.dumpwithensure_ascii=Falseandindent='\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.dumpcorrectly serializes\nas 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
\nas 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.
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对学术研究人员提供高效的文献分析自动化能力
- 将 PDF 论文结构化映射到 Obsidian Canvas 模板,显著提升知识管理效率
Highlights
- 触发词覆盖中英文关键场景,边界清晰,有效避免误触
Areas to improve
-
文档过长 Reported severity: Minor
SKILL.md 内容约600行,超出建议的500行限制
Recommendation: 可考虑将部分技术细节移至独立文档或通过折叠区块优化阅读体验
-
缺少 When to Use 章节 Reported severity: Minor
未显式定义典型使用场景和用户画像
Recommendation: 补充 'When to Use' 章节以增强用户引导
Highlights
- Phase 划分清晰,Step 1-5 流程完整,具备端到端执行指导
Highlights
- 强制使用专用脚本处理 JSON 序列化,有效规避中文引号解析风险
- 覆盖 PyPDF2 依赖缺失等异常场景,具备输出验证机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.