Install
openclaw skills install @soul-code/paper-digestParse and deeply analyze academic papers (PDF, images) into structured research cards covering problem, methods, datasets, results, limitations, and contributions. Uses SoMark to accurately recover two-column layouts, formulas, tables, and figures before AI extraction. Ideal for literature review, research tracking, and knowledge base building. Requires SoMark API Key (SOMARK_API_KEY).
openclaw skills install @soul-code/paper-digestTurn any academic paper into a structured, actionable research card. SoMark first parses the PDF into clean Markdown — correctly handling two-column layouts, inline formulas, figure captions, and reference lists. The AI then extracts a standardized research card ready for literature reviews, Notion/Obsidian databases, or team knowledge sharing.
Academic PDFs are structurally hostile to standard text extraction: two-column layouts get scrambled, tables lose their alignment, figure captions drift out of context, and equations become gibberish. SoMark recovers the correct reading order and structure, which makes the subsequent AI analysis dramatically more accurate.
In short: parse with SoMark first, then extract structured insights.
Example requests:
Important — API quota notice: Each parse consumes one API call from the user's SoMark quota.
Before running the parser, ask the user:
Wait for the user to confirm before proceeding. Do not run the parser without explicit user confirmation.
Important: Before starting, tell the user that SoMark will parse the PDF to correctly reconstruct the two-column layout, tables, and figures — ensuring the analysis reflects the actual content rather than scrambled text extraction.
API concurrency limit: For the same SOMARK_API_KEY, do not run multiple parsing script invocations concurrently. Wait until the current invocation finishes and the parsed outputs are available before starting another invocation that uses the same API key.
python paper_digest.py \
-f <paper_file> \
-o <output_dir> \
--output-formats '["markdown", "json"]' \
--element-formats '{"image": "url", "formula": "latex", "table": "html", "cs": "image"}' \
--feature-config '{"enable_text_cross_page": false, "enable_table_cross_page": false, "enable_title_level_recognition": false, "enable_inline_image": true, "enable_table_image": true, "enable_image_understanding": true, "keep_header_footer": false}'
Script location: paper_digest.py in the same directory as this SKILL.md
Supported formats: .pdf .png .jpg .jpeg .bmp .tiff .webp .heic .heif .gif .doc .docx
--output-formats (Optional)This argument controls which parser outputs should be requested and saved.
If omitted, the default value is:
["markdown", "json"]
If you provide this argument, you may pass a partial JSON object. Any omitted keys continue using the default values.
Supported keys, allowed values, and defaults:
| Key | Allowed values |
|---|---|
markdown | Save the parsed paper as a Markdown file |
json | Save the parsed paper as a JSON output |
Example:
--output-formats '["markdown", "json"]'
--element-formats (Optional)This argument controls how specific element types are rendered in the parser output.
If omitted, the default value is:
{ "image": "url", "formula": "latex", "table": "html", "cs": "image" }
If you provide this argument, you may pass a partial JSON object. Any omitted keys continue using the default values.
Supported keys, allowed values, and defaults:
| Key | Allowed values | Default |
|---|---|---|
image | url, base64, none | url |
formula | latex, mathml, ascii | latex |
table | html, image, markdown | html |
cs | image | image |
Example:
--element-formats '{"image": "url", "table": "html"}'
--feature-config (Optional)This argument controls parser feature switches.
If omitted, the default value is:
{
"enable_text_cross_page": false,
"enable_table_cross_page": false,
"enable_title_level_recognition": false,
"enable_inline_image": true,
"enable_table_image": true,
"enable_image_understanding": true,
"keep_header_footer": false
}
If you provide this argument, you may pass a partial JSON object. Any omitted keys continue using the default values. All values must be boolean (true or false).
Supported keys and defaults:
| Key | Default | Description |
|---|---|---|
enable_text_cross_page | false | Merge text content across page boundaries |
enable_table_cross_page | false | Merge tables across page boundaries |
enable_title_level_recognition | false | Recognize heading and title levels |
enable_inline_image | true | Include inline image output |
enable_table_image | true | Include table image output |
enable_image_understanding | true | Enable image understanding features |
keep_header_footer | false | Preserve header and footer content |
Example:
--feature-config '{"enable_inline_image": true, "enable_table_image": true}'
--base-url (Optional)This argument overrides the SoMark API base URL. Use it to switch between regional endpoints.
If omitted, the SOMARK_BASE_URL environment variable is used. If that is also unset, the default is https://somark.cn/api/v1 (mainland China).
| Region | URL |
|---|---|
| Mainland China (中国大陆) | https://somark.cn/api/v1 |
| Outside mainland China | https://somark.ai/api/v1 |
Example:
# Mainland China (default)
--base-url "https://somark.cn/api/v1"
# Outside mainland China
--base-url "https://somark.ai/api/v1"
<filename>.md — full paper in Markdown (correct reading order)<filename>.json — JSON output (blocks with positions)parse_summary.json — metadata (file path, output paths, elapsed time)After the script finishes, read the generated Markdown and extract the following structured fields:
| 字段 | 内容 |
|---|---|
| 标题 | |
| 作者 | |
| 机构 | |
| 发表年份 | |
| 发表venue | (会议/期刊名称,如 NeurIPS 2024, Nature, CVPR) |
| arXiv / DOI |
一句话总结(用一句话概括这篇论文做了什么)
研究问题 这篇论文试图解决什么问题?现有方法的局限性是什么?
核心贡献(按重要性排列)
方法
实验设置
主要结果
局限性与未来工作
在提取完结构化字段后,提供独立评估:
Structure the output as:
## 论文精读卡
### 基本信息
[bibliographic table]
### 一句话总结
[one-sentence summary]
### 研究问题与背景
[problem statement]
### 核心贡献
[numbered list]
### 方法
[method description]
### 实验与结果
[datasets, metrics, key numbers]
### 局限性
[limitations]
### 独立评估
[critical assessment across 4 dimensions]
### 相关论文
[connections and recommendations]
If the user provides multiple papers, process them sequentially and at the end present a comparison table:
| 论文 | 问题 | 方法 | 数据集 | 主要结果 | 新颖性评分 |
|---|
If the user has not configured an API key:
Step 1: Ask whether SOMARK_API_KEY is already set — do not ask for the key in chat.
Step 2: Direct them to:
Open "API Workbench" → "APIKey", and create a key in the format sk-******.
Step 3: Ask them to run:
export SOMARK_API_KEY=your_key_here
Step 4: Mention free quota is available:
1107 / Invalid API Key: ask the user to verify SOMARK_API_KEY.2000 / Invalid parameters: check file path and format.--output-formats, --element-formats, or --feature-config: ask the user to provide valid JSON syntax.markdown, json.image, formula, table, and cs.feature-config values must be booleans."language" field to the research card.null for fields that cannot be found.