关于 active-research
active-research 是一项借助 Actionbook Browser 研究主题、领域或论文并生成 HTML 报告的技能,面向需要汇总网络资料的研究任务。它按主题类型选择搜索路径,并包含针对动态页面的等待与提取流程。
主要功能
- 01研究主题、领域和论文
- 02按输入类型选择搜索策略
- 03处理 SPA 和动态页面
- 04生成 HTML 报告
- 05支持 JSON 输出路径
适用场景
- 01查找并整理某个主题的资料
- 02阅读论文并探索相关研究
- 03分析指定 URL 的页面内容
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ actionbook/ actionbook --skill active-research安装后在 Claude Code 中输入/active-research确认已加载。
详细介绍
主动研究
使用 Actionbook Browser 分析任意主题、领域或论文,并生成精美的 HTML 报告 — 支持感知 SPA 的导航、网络空闲检测、批量操作和智能页面分析。
增强的浏览器功能
| 功能 | 描述 |
|---|---|
| 等待页面加载 | wait-idle — 监控 fetch/XHR,直到网络稳定 |
| 获取 SPA 内容 | wait-fn — 提取内容前等待 JS 条件满足 |
| 理解页面 | snapshot --filter interactive --max-tokens N — 聚焦内容,节省预算 |
| 阻止弹窗 | --auto-dismiss-dialogs — 自动处理 alert/confirm/prompt |
| 提高加载速度 | --block-images — 跳过图片,加快文本提取 |
| 保持页面稳定 | --no-animations — 冻结 CSS 过渡效果 |
| 检测错误 | console --level error — 检查页面问题 |
| 多步表单 | batch — 一次调用执行多个操作 |
| 调试元素 | info <selector> — 检查可见性、位置和属性 |
| 跟踪更改 | snapshot --diff — 仅查看更改内容 |
| 反检测 | 对受保护的网站使用 --stealth + fingerprint rotate |
| 身份验证管理 | storage set — 为受限内容注入 JWT/令牌 |
| 一次性抓取 | browser fetch <url> — 一条命令完成导航、等待、提取和关闭 |
| 静态页面提速 | --lite — 优先使用 HTTP,仅在需要时回退到浏览器 |
| 反爬取 URL | --rewrite-urls — 将 x.com→xcancel.com、reddit→old.reddit |
| 等待时间调节 | --wait-hint — 根据域名调整等待时间(fast/normal/slow/heavy) |
| 日志关联 | --session-tag — 为所有操作添加标签,便于调试 |
用法
/active-research <topic>
/active-research <topic> --output ./reports/my-report.json
或者直接告诉 Claude:“研究 XXX 并生成报告”
参数
| 参数 | 必填 | 默认值 | 描述 |
|---|---|---|---|
topic | 是 | - | 要研究的主题(任意文本) |
--output | 否 | ./output/<topic-slug>.json | JSON 报告的输出路径 |
主题检测
| 模式 | 类型 | 策略 |
|---|---|---|
arxiv:XXXX.XXXXX | 论文 | arXiv Advanced Search + 使用 ar5iv 深入阅读 |
doi:10.XXX/... | 论文 | 解析 DOI,然后通过 arXiv Advanced Search 查找相关工作 |
| 学术关键词(paper、research、model、algorithm) | 学术主题 | arXiv Advanced Search + 使用 Google 搜索非学术来源 |
| URL | 特定页面 | 抓取并分析页面 |
| 一般文本 | 主题研究 | 使用 Google 搜索;如相关,则使用 arXiv Advanced Search |
架构
┌──────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────┐
│ Claude │────▶│ Actionbook │────▶│ Web Pages │────▶│ Extract │
│ Code │ │ Browser │ │ (multiple) │ │ Content │
└──────────┘ └──────────────┘ └──────────────┘ └─────┬────┘
│ │ wait-idle │ │ SPA / dynamic │ │
│ │ batch ops │ │ protected │ │
│ │ --stealth │ │ mobile-only │ │
│ │ snapshot │ └───────────────┘ │
│ └──────────────┘ │
│ ┌──────────────┐ ┌──────────────┐ │
├─────────▶│ Actionbook │ │ arXiv Adv. │ │
│ │ search/get │────▶│ Search Form │───────────▶│
│ │ (selectors) │ │ (40+ fields) │ │
│ └──────────────┘ └──────────────┘ │
│ │
┌──────────┐ ┌──────────────┐ ┌──────────────┐ │
│ Open in │◀────│ json-ui │◀────│ Write JSON │◀───────────┘
│ Browser │ │ render │ │ Report │ Synthesize
└──────────┘ └──────────────┘ └──────────────┘
必须使用 Actionbook CLI
浏览网页时始终使用 actionbook browser 命令。绝不可使用其他方式访问网页:
- 绝不可通过 bash 使用
curl、wget、httpie或任何 HTTP 命令行工具 - 绝不可通过 bash 使用
python -c "import requests"或任何脚本语言的 HTTP 库 - 绝不可使用 WebFetch 或 WebSearch 工具
- 只能使用
actionbook browser和actionbook search/actionbook get命令
需要网页内容时,首选方式是:actionbook browser fetch <url> --format text --json(一次性操作)。
对于交互式多步工作流,请使用:actionbook browser open <url> → actionbook browser wait-idle → actionbook browser text。
浏览器标志 — 研究默认设置
重要:研究时打开浏览器,务必始终使用这些标志。
# PREFERRED: One-shot fetch (I1) — handles open+wait+extract+close automatically
actionbook --block-images --rewrite-urls browser fetch "<url>" --format text --json
# For interactive multi-step workflows, use explicit open:
actionbook --block-images --auto-dismiss-dialogs --no-animations --rewrite-urls browser open "<url>"
| 标志 | 用途 |
|---|---|
--block-images | 跳过图片下载 — 提取文本时,页面加载速度提升 2-5 倍 |
--auto-dismiss-dialogs | 防止 alert/confirm/prompt 阻塞自动化操作 |
--no-animations | 冻结 CSS 动画 — 快照稳定,不受时序问题影响 |
--rewrite-urls | 将 x.com→xcancel.com、reddit→old.reddit,避免触发反机器人拦截 |
--wait-hint <hint> | 根据域名调整等待时间:instant、fast、normal、slow、heavy 或毫秒数 |
--session-tag <tag> | 为所有操作添加标签,以便关联日志和调试 |
--lite(仅 fetch) | 优先尝试 HTTP;对于静态页面(Wikipedia、文档、博客)跳过浏览器 |
对于启用了反机器人保护的网站,请添加 --stealth:
actionbook --block-images --auto-dismiss-dialogs --no-animations --stealth --rewrite-urls browser open "<url>"
导航模式 — 务必遵循
选项 A:一次性抓取(只读页面提取的首选方式):
# Single command: navigate → wait (domain-aware) → extract → close
actionbook --block-images --rewrite-urls browser fetch "<url>" --format text --json
# For static pages (Wikipedia, docs, blogs), add --lite to skip browser entirely:
actionbook --rewrite-urls browser fetch "<url>" --format text --lite --json
# For accessibility tree:
actionbook --block-images --rewrite-urls browser fetch "<url>" --format snapshot --max-tokens 2000 --json
选项 B:交互式多步模式(适用于表单、点击和多页流程):
# Step 1: Navigate
actionbook browser open "<url>" # or: goto, click a link
# Step 2: Wait for load (MANDATORY in v2)
actionbook browser wait-idle # Wait for fetch/XHR to settle
# Step 3: Extract content
actionbook browser text [selector] # Extract text
# OR
actionbook browser snapshot --filter interactive --max-tokens 500 # Understand page structure
为什么 wait-idle 至关重要:
- SPA(React、Vue、Next.js)会在初始 HTML 加载后,通过 fetch/XHR 加载内容
- 如果不等待,
text返回的内容将为空或不完整 wait-idle会监控所有待处理的网络请求,并等待网络安静 500ms
对于网络稳定后仍会动态加载内容的页面:
actionbook browser wait-idle
actionbook browser wait-fn "document.querySelector('.results')" # Wait for specific element
actionbook browser text ".results"
完整工作流
提醒: 此工作流中的每次网页访问都必须使用
actionbook browser命令。 严禁使用curl、wget、python requests或任何其他 HTTP 工具。 bash 工具只能用于运行actionbookCLI 命令和执行本地文件操作(json-ui render、open)。
第 1 步:规划搜索策略
根据主题,从不同角度生成 5-8 个搜索查询:
- 核心定义 / 概述
- 最新进展 / 新闻
- 技术细节 / 实现
- 比较 / 替代方案
- 专家观点 / 分析
- 使用场景 / 应用
搜索顺序 — 务必先查询 Actionbook API,再进行搜索:
| 步骤 | 操作 | 原因 |
|---|---|---|
| 第 2 步(首先) | 查询 Actionbook API | 浏览前获取 arXiv、ar5iv 及其他已知网站的已验证选择器。 |
| 第 3 步(其次) | arXiv 高级搜索 | 使用 Actionbook 选择器进行多字段、带筛选条件的学术搜索。 |
| 第 4 步(第三) | Google / Bing 搜索 | 补充博客、新闻、代码、讨论及非学术来源。 |
第 2 步:查询 Actionbook API 获取选择器(务必首先执行)
访问任何 URL 之前,先查询 Actionbook 的索引选择器。
# Search for indexed actions by domain
actionbook search "<keywords>" -d "<domain>"
# Get detailed selectors for a specific page
actionbook get "<domain>:/<path>:<area>"
适用于研究的预索引网站:
| 网站 | area_id | 关键选择器 |
|---|---|---|
| arXiv 高级搜索 | arxiv.org:/search/advanced:default | 40+ 个选择器:字段选择、术语输入、类别复选框、日期范围筛选器 |
| ar5iv 论文 | ar5iv.labs.arxiv.org:/html/{paper_id}:default | h1.ltx_title_document、div.ltx_authors、div.ltx_abstract、section.ltx_section |
| Google Scholar | scholar.google.com:/:default | #gs_hdr_tsi(搜索)、#gs_hdr_tsb(提交) |
| arXiv 首页 | arxiv.org:/:default | 搜索 240 多万篇文章 |
对于计划访问的任何 URL,运行 actionbook search "<keywords>" -d "<domain>" 检查其是否已编入索引。
第 3 步:搜索 arXiv(优先使用 URL,表单作为备用)
经验教训:通过浏览器自动化提交 arXiv 表单并不可靠。请优先使用基于 URL 的搜索。
选项 A:基于 URL 的搜索(首选——最可靠):
# Simple keyword search
actionbook --block-images --auto-dismiss-dialogs --no-animations browser open "https://arxiv.org/search/?query=large+language+model+agent&searchtype=all"
actionbook browser wait-idle
actionbook browser text "#main-container"
# Advanced URL search with filters
# searchtype: all, title, author, abstract
# start: result offset (0, 50, 100, ...)
actionbook browser open "https://arxiv.org/search/?query=Rust+machine+learning&searchtype=all&start=0"
actionbook browser wait-idle
actionbook browser text "#main-container"
搜索策略:先广后窄:
- 首次搜索:使用宽泛的词语(例如
"Rust" "machine learning")——目标是获得 50 条以上结果 - 如果结果太少(< 10):进一步扩大范围,移除日期和类别筛选条件
- 如果结果太多(> 200):添加更具体的词语,使用
searchtype=title - 尝试 2–3 种不同的查询角度(例如框架名称、用例、基准测试)
选项 B:通过批处理进行表单交互(备用——URL 搜索效果不足时使用):
# Open arXiv with research flags
actionbook --block-images --auto-dismiss-dialogs --no-animations browser open "https://arxiv.org/search/advanced"
actionbook browser wait-idle
# Use batch for form — fewer round-trips, more reliable
cat <<'EOF' | actionbook browser batch --delay 150
{
"actions": [
{"kind": "click", "selector": "#terms-0-field"},
{"kind": "click", "selector": "option[value='title']"},
{"kind": "type", "selector": "#terms-0-term", "text": "large language model agent"},
{"kind": "click", "selector": "#classification-computer_science"},
{"kind": "click", "selector": "#date-filter_by-3"},
{"kind": "type", "selector": "#date-from_date", "text": "2025-01-01"},
{"kind": "type", "selector": "#date-to_date", "text": "2026-02-23"},
{"kind": "click", "selector": "button:has-text('Search'):nth(2)"}
],
"stopOnError": true
}
EOF
actionbook browser wait-idle
actionbook browser text "#main-container"
# If batch form submission fails (page shows form again instead of results):
# → Fall back to Option A URL-based search immediately
# → Do NOT retry the form — it wastes time
arXiv 搜索功能(来自已索引的选择器——适用于选项 B):
| 功能 | 选择器 |
|---|---|
| 搜索字段(标题/作者/摘要) | #terms-0-field select |
| 搜索词 | #terms-0-term input |
| 添加布尔词项 | button "Add another term +" |
| 筛选:计算机科学 | #classification-computer_science |
| 筛选:物理、数学等 | #classification-physics、#classification-mathematics |
| 日期:过去 12 个月 | #date-filter_by-1 radio |
| 日期:指定年份 | #date-filter_by-2 radio + #date-year |
| 日期:自定义范围 | #date-filter_by-3 radio + #date-from_date / #date-to_date |
| 显示摘要 | #abstracts-0 radio |
第 4 步:使用 Google / Bing 搜索进行补充
# Search via Google (with wait-idle for SPA results)
actionbook browser open "https://www.google.com/search?q=<encoded_query>"
actionbook browser wait-idle
actionbook browser text "#search"
# Or search via Bing
actionbook browser open "https://www.bing.com/search?q=<encoded_query>"
actionbook browser wait-idle
actionbook browser text "#b_results"
解析搜索结果以提取 URL。对于每个发现的 URL,调用 Actionbook API 检查是否已编入索引。
重要:URL 处理规则(生产环境使用经验)
-
绝不要根据搜索摘要手动构造 URL。 许多 Google 摘要中的 URL 都经过截断或重新格式化。请改用:
- 使用
actionbook browser snapshot --filter interactive查找实际的链接元素 - 直接点击链接:
actionbook browser click "a[href*='domain.com']" - 或从快照引用中提取 href
- 使用
-
预计有 20–30% 的 URL 已失效。 实际使用中,约 20 个 URL 中有 5 个会返回 404。请妥善处理:
actionbook browser open "<url>" actionbook browser wait-idle # Check if the page is a 404 or error page actionbook browser wait-fn "!document.title.includes('404') && !document.title.includes('Not Found')" --timeout 3000 # If timeout → page is dead, skip immediately. Do NOT retry. -
从 Google 摘要中挽救信息。 如果 URL 已失效,但 Google 摘要中包含有用信息:
- 已提取的摘要文本本身就是有效数据
- 在报告中使用这些信息,并注明来源已无法访问
- 在其他站点(archive.org、缓存版本)搜索相同内容
-
使用 4 个以上不同的搜索查询。 不要只依赖一种搜索角度:
- 查询 1:核心主题概览(例如
"Rust AI ecosystem 2026") - 查询 2:具体框架/工具(例如
"Candle vs Burn Rust ML framework") - 查询 3:用例/基准测试(例如
"Rust LLM inference performance benchmark") - 查询 4:近期新闻/进展(例如
"Rust machine learning latest 2026") - 查询 5:社区/生态系统(例如
"Rust AI agent framework comparison")
- 查询 1:核心主题概览(例如
第 5 步:深入阅读来源
首选:使用 browser fetch 一次性提取页面内容(自动处理等待、提取和清理):
# Quick text extraction (most common)
actionbook --block-images --rewrite-urls browser fetch "<url>" --format text --json
# Static pages (Wikipedia, docs, blogs) — skip browser entirely
actionbook --rewrite-urls browser fetch "<url>" --format text --lite --json
# Page structure analysis
actionbook --block-images --rewrite-urls browser fetch "<url>" --format snapshot --max-tokens 2000 --json
# With token budget for LLM context management
actionbook --block-images --rewrite-urls browser fetch "<url>" --format text --max-tokens 4000 --json
对于交互式工作流(表单、点击),请改用多步骤操作:
actionbook browser open "<url>"
actionbook browser wait-idle # MANDATORY: wait for network
actionbook browser text # Full page text (fallback)
actionbook browser text "<selector>" # Use Actionbook selector if indexed
如果页面内容似乎不完整,请进行调试:
# Check for JS errors that might block rendering
actionbook browser console --level error
# Check if a specific element exists
actionbook browser wait-fn "document.querySelector('.content')" --timeout 5000
# Inspect element properties
actionbook browser info ".content"
对于 arXiv 论文,请按以下顺序尝试来源:
# 1. arXiv abstract (most reliable) — use fetch
actionbook --block-images browser fetch "https://arxiv.org/abs/<arxiv_id>" --format text --json
# 2. HuggingFace papers page
actionbook --block-images browser fetch "https://huggingface.co/papers/<arxiv_id>" --format text --json
# 3. ar5iv HTML (structured, but fails on new papers) — use --lite for static HTML
actionbook browser fetch "https://ar5iv.org/html/<arxiv_id>" --format text --lite --json
# NOTE: if content too short, ar5iv didn't render. Fall back.
# 4. GitHub repo (from search results) — use fetch
actionbook --block-images browser fetch "<github_repo_url>" --format text --json
对于受保护的网站(Cloudflare、机器人检测)——使用带隐身功能的交互模式:
actionbook --stealth --block-images --auto-dismiss-dialogs --rewrite-urls browser open "<protected_url>"
actionbook browser wait-idle
actionbook browser text
对于仅限移动端的内容:
actionbook browser emulate iphone-14
actionbook browser open "<url>"
actionbook browser wait-idle
actionbook browser text
对于 Google Scholar(已由 Actionbook 编入索引):
actionbook browser open "https://scholar.google.com"
actionbook browser wait-idle
actionbook browser click "#gs_hdr_tsi"
actionbook browser type "#gs_hdr_tsi" "<query>"
actionbook browser click "#gs_hdr_tsb"
actionbook browser wait-idle
actionbook browser text "#gs_res"
对于未编入索引的网站,使用快照来发现页面结构:
actionbook --block-images browser fetch "<url>" --format snapshot --max-tokens 800 --json
第 6 步:综合研究结果
将收集到的信息整理成一份连贯的报告:
- 概述/执行摘要
- 关键发现
- 详细分析
- 支持数据/证据
- 影响/意义
- 来源
第 7 步:生成 json-ui JSON 报告
使用 Write 工具,按照 @actionbookdev/json-ui 架构编写 JSON 文件。
输出路径: ./output/<topic-slug>.json(或用户指定的 --output 路径)
第 8 步:渲染 HTML
关键:必须尝试所有备用方法后才能放弃。不要在第一次失败后就停止。
重要:JSON_FILE 和 HTML_FILE 始终使用绝对路径。
逐一尝试以下方法,直到有一种成功:
# Method 1: Monorepo absolute path (most reliable if inside actionbook project)
node "$(git rev-parse --show-toplevel)/packages/json-ui/dist/cli.js" render /absolute/path/to/report.json -o /absolute/path/to/report.html
# Method 2: Global install (if user ran: cd packages/json-ui && npm link)
json-ui render /absolute/path/to/report.json -o /absolute/path/to/report.html
# Method 3: npx (if published to npm)
npx @actionbookdev/json-ui render /absolute/path/to/report.json -o /absolute/path/to/report.html
绝不要默默放弃。 如果所有方法都失败,请告知用户:
- JSON 报告已保存至
<path> - 若要启用 HTML 渲染,请运行:
cd <actionbook-repo>/packages/json-ui && npm link
第 9 步:在浏览器中打开
# macOS
open <report.html>
# Linux
xdg-open <report.html>
第 10 步:关闭浏览器
完成后务必关闭浏览器:
actionbook browser close
错误恢复模式
使用高级浏览器功能进行智能错误恢复:
模式:页面加载失败
# 1. Open page
actionbook browser open "<url>"
actionbook browser wait-idle --timeout 15000
# 2. Check for JS errors
actionbook browser console --level error
# If errors found → page is broken, skip to next source
# 3. Check if content rendered
actionbook browser wait-fn "document.body.innerText.length > 100" --timeout 5000
# If timeout → content didn't render, try fallback
模式:未找到选择器
# 1. Use snapshot to discover actual page structure
actionbook browser snapshot --filter interactive --max-tokens 800
# 2. Or inspect a specific area
actionbook browser info "<parent_selector>"
# Returns: suggested selectors, visibility, tag info
# 3. Adjust selector and retry
模式:反机器人检测
# 1. If initial load returns CAPTCHA or access denied:
actionbook browser close
# 2. Reopen with stealth
actionbook --stealth --no-animations --auto-dismiss-dialogs browser open "<url>"
actionbook browser wait-idle
# 3. If still blocked, rotate fingerprint
actionbook browser fingerprint rotate --os windows
actionbook browser open "<url>"
actionbook browser wait-idle
模式:SPA 内容未加载
# 1. Wait for network
actionbook browser wait-idle --idle-time 1000 --timeout 15000
# 2. Wait for specific element
actionbook browser wait-fn "document.querySelector('.results')" --timeout 10000
# 3. If still empty, check console
actionbook browser console --level error
# 4. Try clicking a loading trigger
actionbook browser snapshot --filter interactive --max-tokens 300
# Look for "Load More", "Show Results", etc.
完整错误处理参考
| 错误 | 恢复策略 |
|---|---|
| 浏览器无法打开 | actionbook browser status,重试并检查 console --level error |
| 页面加载超时 | wait-idle --timeout 15000,然后运行 console --level error 进行诊断 |
| URL 返回 404 | 使用 wait-fn "!document.title.includes('404')" 快速检测。立即跳过,不要重试。 使用 Google 摘要文本作为备用数据。 |
| arXiv 表单提交失败 | 改用基于 URL 的搜索:arxiv.org/search/?query=...&searchtype=all |
| ar5iv 内容被截断 | 改用 arxiv 摘要,并使用 wait-fn "document.body.innerText.length > 5000" 进行验证 |
| 未找到选择器 | 使用 snapshot --filter interactive 查找实际结构 |
| 动态内容缺失 | 使用 wait-idle 和 wait-fn 检查特定条件 |
| 警告弹窗阻塞 | --auto-dismiss-dialogs 可彻底避免此问题 |
| 反机器人检测 | 使用 --stealth 和 fingerprint rotate |
| 媒体较多的页面加载缓慢 | 使用 --block-images 或 --block-media,可提速 2–5 倍 |
| CSS 动画干扰 | --no-animations 可冻结所有过渡效果 |
| json-ui 渲染崩溃 | 检查 MetricsGrid — suffix/value 必须是纯字符串 |
npx json-ui 返回 404 | 尝试全部 3 种方法(monorepo、global、npx) |
| 没有搜索结果 | 先使用宽泛搜索(50+ 个结果),再缩小范围。尝试 4 个以上的查询角度。 |
重要: 完成前务必运行 actionbook browser close,即使发生错误也不例外。
功能使用检查清单
完成研究前,请确认你使用了以下功能:
| 功能 | 使用场景 | 检查 |
|---|---|---|
browser fetch | 只读页面提取(优先于 open+wait+text) | 大多数页面读取时使用 |
--lite | 静态页面(Wikipedia、文档、博客)——完全跳过浏览器 | 静态网站使用 fetch 时添加 |
--rewrite-urls | 始终启用(避免 x.com、reddit 上的反机器人机制) | 在初始浏览器启动时设置 |
--wait-hint | 根据域名调整等待时间(快/慢/繁重) | 与 fetch 或手动流程配合使用 |
--session-tag | 需要日志关联的多步操作 | 调试会话时设置 |
wait-idle | 每次会触发导航的 open/goto/click 之后 | 每个页面都必须使用 |
--block-images | 始终启用(研究不需要图片) | 在初始浏览器启动时设置 |
--auto-dismiss-dialogs | 始终启用(防止操作受阻) | 在初始浏览器启动时设置 |
--no-animations | 始终启用(确保快照稳定) | 在初始浏览器启动时设置 |
wait-fn | 网络空闲后内容仍异步加载时 | 用于 SPA 和动态页面 |
console --level error | 页面内容似乎不完整或异常时 | 用于调试 |
batch | 填写多步表单时(arXiv、Google Scholar) | 可替代 5 条以上的连续命令 |
snapshot --filter interactive | 探索未知页面结构时 | 用于未索引的网站 |
info <selector> | 点击/输入未按预期工作时 | 调试元素可见性 |
--stealth | 网站返回 CAPTCHA 或拒绝访问时 | 重试时添加 |
应避免的常见错误:
- 当
browser fetch一条命令即可完成时,仍手动执行open → wait-idle → text → close - 静态页面(Wikipedia、文档、博客)未使用
--lite——浏览器启动会浪费 5-10 秒 - 未使用
--rewrite-urls——x.com 和 reddit.com 有严格的反机器人机制,会阻止抓取 - 在交互模式下导航后忘记使用
wait-idle(内容会显示为空) - 表单交互未使用
batch(速度慢、不可靠) - 重试失效的 URL,而不是跳过它
- 根据搜索摘要手动构造 URL,而不是点击链接
- 只使用一种搜索查询角度(始终使用 4 种以上不同的查询)
- 提取内容前未检查 404 页面
json-ui 报告模板
重要:始终包含 BrandHeader 和 BrandFooter。
{
"type": "Report",
"props": { "theme": "auto" },
"children": [
{
"type": "BrandHeader",
"props": {
"badge": "Deep Research Report",
"poweredBy": "Actionbook"
}
},
{
"type": "Section",
"props": { "title": "Overview", "icon": "paper" },
"children": [
{
"type": "Prose",
"props": {
"content": "Overview of the topic..."
}
}
]
},
{
"type": "Section",
"props": { "title": "Key Findings", "icon": "star" },
"children": [
{
"type": "ContributionList",
"props": {
"items": [
{
"badge": "Finding",
"title": "...",
"description": "..."
}
]
}
}
]
},
{
"type": "Section",
"props": { "title": "Detailed Analysis", "icon": "bulb" },
"children": [
{
"type": "Prose",
"props": { "content": "..." }
}
]
},
{
"type": "Section",
"props": { "title": "Key Metrics", "icon": "chart" },
"children": [
{
"type": "MetricsGrid",
"props": { "metrics": [], "cols": 3 }
}
]
},
{
"type": "Section",
"props": { "title": "Sources", "icon": "link" },
"children": [
{
"type": "LinkGroup",
"props": { "links": [] }
}
]
},
{
"type": "BrandFooter",
"props": {
"timestamp": "YYYY-MM-DDTHH:MM:SSZ",
"attribution": "Powered by Actionbook",
"disclaimer": "This report was generated by AI using web sources. Verify critical information independently."
}
}
]
}
论文报告模板(适用于 arXiv 论文)
分析学术论文时,请使用更丰富的模板,包含:
PaperHeader(标题、arxivId、日期、类别)AuthorList(作者及其所属机构)Abstract(突出显示关键词)ContributionList(主要贡献)MethodOverview(分步介绍方法)ResultsTable(实验结果)Formula(关键公式,LaTeX)Figure(来自 ar5iv 的论文插图)
可用的 json-ui 组件
| 组件 | 用途 | 关键属性 |
|---|---|---|
BrandHeader | 报告页眉 | badge, poweredBy |
PaperHeader | 论文元数据 | title, arxivId, date, categories |
AuthorList | 作者 | authors: [{name, affiliation}], maxVisible |
Section | 主要章节 | title, icon (paper/star/bulb/chart/code/link/info/warning) |
Prose | 富文本 | content (支持 粗体、斜体、代码、列表) |
Abstract | 摘要文本 | text, highlights: ["keyword"] |
ContributionList | 编号列出的发现 | items: [{badge, title, description}] |
MethodOverview | 分步说明 | steps: [{step, title, description}] |
MetricsGrid | 关键统计数据 | metrics: [{label, value, trend, suffix}], cols |
ResultsTable | 数据表格 | columns, rows, highlights: [{row, col}] |
Table | 通用表格 | columns: [{key, label}], rows, striped, compact |
Callout | 信息/提示/警告 | type (info/tip/warning/important/note), title, content |
Highlight | 引用块 | type (quote/important/warning/code), text, source |
KeyPoint | 关键发现卡片 | icon, title, description, variant |
CodeBlock | 代码片段 | code, language, title, showLineNumbers |
Formula | LaTeX 方程 | latex, block, label |
Figure | 图片 | images: [{src, alt, width}], label, caption |
Image | 单张图片 | src, alt, caption, width |
DefinitionList | 术语/定义 | items: [{term, definition}] |
LinkGroup | 来源链接 | links: [{href, label, icon}] |
Grid | 网格布局 | cols, children |
Card | 卡片容器 | padding (sm/md/lg), shadow |
TagList | 标签 | tags: [{label, color, href}] |
BrandFooter | 页脚 | timestamp, attribution, disclaimer |
json-ui 已知问题
| 问题 | 现象 | 修复方法 |
|---|---|---|
MetricsGrid.suffix 为对象 | text.replace is not a function | suffix 必须是纯字符串 |
MetricsGrid.value 为数字 | 渲染错误 | value 必须是字符串(例如,"58.5",而不是 58.5) |
缺少 BrandHeader/BrandFooter | 报告显示异常 | 务必同时包含两者 |
Table 行值为对象 | 单元格中显示 [object Object] | 行单元格值必须是纯字符串 |
| Prose 内容过长 | 渲染被截断 | 拆分为多个 Prose 块或使用子章节 |
文本字段
所有文本字段都应使用纯英文字符串。
{ "title": "Key Findings" }
注意: MetricsGrid 属性 value 和 suffix,以及 Table 行单元格的值,必须始终为纯字符串。
学术论文支持
arXiv 论文
ar5iv.org HTML(阅读时优先使用,但发布不到 3 个月的论文往往内容不完整):
| 元素 | 选择器 | 可靠性 | 备用方案 |
|---|---|---|---|
| 标题 | h1.ltx_title_document | 高 | div.ltx_abstract |
| 作者 | div.ltx_authors | 高 | — |
| 摘要 | div.ltx_abstract | 高 | — |
| 全文 | article | 中 | 章节选择器失效时使用 |
| 章节 | section.ltx_section | 新论文中可靠性较低 | article |
| 图 | figure.ltx_figure | 中 | — |
| 表格 | table.ltx_tabular | 中 | — |
推荐方法: 使用 wait-idle + wait-fn 确认 ar5iv 内容已加载:
actionbook browser open "https://ar5iv.org/html/<arxiv_id>"
actionbook browser wait-idle --timeout 15000
actionbook browser wait-fn "document.body.innerText.length > 5000" --timeout 10000
# If wait-fn times out → content didn't render, fall back to other sources
推荐的来源优先级
| 优先级 | 来源 | 可获取内容 | 可靠性 |
|---|---|---|---|
| 1 | arxiv.org/abs/<id> | 摘要、元数据、提交历史 | 很高 |
| 2 | huggingface.co/papers/<id> | 摘要、社区、相关模型 | 很高 |
| 3 | GitHub 仓库 | README、代码、模型库 | 高 |
| 4 | HuggingFace 模型卡片 | 训练方案、基准测试 | 高 |
| 5 | ar5iv.org/html/<id> | 论文 HTML 全文 | 中 |
| 6 | Google Scholar / Semantic Scholar | 引用、相关工作 | 中 |
其他学术来源
- Google Scholar(
scholar.google.com)——Actionbook 已收录 - Semantic Scholar(
semanticscholar.org) - Papers With Code(
paperswithcode.com) - 会议论文集网站
质量指南
- 广度:从至少 3-5 个不同来源开展研究
- 深度:阅读全文,而不只是查看摘要片段
- 准确性:通过多个来源交叉核对事实
- 结构:根据每种内容类型使用适当的 json-ui 组件
- 归属:始终在报告中附上来源链接
- 时效性:相关性相同时,优先选择近期来源