Install
openclaw skills install auto-paper-writerClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
自动撰写科研论文的完整 AI pipeline。当用户说"撰写[方向]论文"、"自动写论文"、"生成论文"时触发。功能包括:(1) 搜索 ArXiv 最新论文并下载原始 PDF;(2) 总结现有工作局限性;(3) 设计创新模型框架;(4) 撰写双栏 LaTeX 论文(IEEEtran格式);(5) 生成科研级 matplotlib 配图;(6) 编译 PDF 并保存到桌面。此技能仅生成学术论文框架和创新点思路,不保证内容创新性和实验真实性,用户需自行在 Overleaf/本地 LaTeX 中补充实验结果和细节调整。
openclaw skills install auto-paper-writer自动撰写科研论文的完整 pipeline。从文献调研到 PDF 输出的端到端自动化。
使用 ArXiv API 搜索相关方向的最新论文:
# PowerShell 调用 ArXiv API
$query = "your search terms"
$url = "https://export.arxiv.org/api/query?search_query=all:$query&start=0&max_results=10&sortBy=submittedDate&sortOrder=descending"
优先搜索 ICLR/NeurIPS/AAAI/ICML 等顶会论文,以及与用户方向相关的高引用工作。
将搜索到的论文信息保存到文献文件夹:
# 创建文献文件夹
$ref_dir = "$paper_dir\references"
New-Item -ItemType Directory -Path $ref_dir -Force
# 保存论文列表(Markdown 格式)
$ref_content = @"
# 文献调研
## 搜索时间:$(Get-Date -Format "yyyy-MM-dd HH:mm")
## 搜索方向:$direction
## 搜索关键词:$keywords
---
### 论文列表
| # | 论文标题 | 作者 | 日期 | arXiv ID |
|---|---------|------|------|----------|
"@
foreach ($entry in $xml.feed.entry) {
$title = $entry.title -replace '\s+', ' '
$authors = ($entry.author | ForEach-Object { $_.name }) -join ', '
$published = $entry.published.Substring(0,10)
$arxiv_id = $entry.id.Split('/')[-1]
$ref_content += "`n| - | $title | $authors | $published | [$arxiv_id](https://arxiv.org/abs/$arxiv_id) |"
}
$ref_content += "@"
$ref_content | Out-File -FilePath "$ref_dir\paper_references.md" -Encoding UTF8
保存内容:
references/paper_references.md — 论文列表(标题/作者/日期/链接)references/*.pdf — 原始论文 PDF 文件从 ArXiv 下载每篇论文的原始 PDF,文件用论文标题命名:
# ArXiv PDF 下载地址格式
# https://arxiv.org/pdf/{arxiv_id}.pdf
foreach ($entry in $xml.feed.entry) {
$arxiv_id = $entry.id.Split('/')[-1] -replace 'v\d+$', ''
$title = $entry.title -replace '\s+', ' ' -replace '[^\w\s-]', '' -replace '\s', '_'
$pdf_url = "https://arxiv.org/pdf/$arxiv_id.pdf"
$pdf_path = "$ref_dir\$title.pdf"
# 截断过长文件名,保留前 50 字符
if ($title.Length -gt 50) {
$title = $title.Substring(0, 50)
$pdf_path = "$ref_dir\$title.pdf"
}
try {
Invoke-WebRequest -Uri $pdf_url -OutFile $pdf_path -UseBasicParsing
Write-Host "Downloaded: $title.pdf"
} catch {
Write-Host "Failed to download: $arxiv_id"
}
}
文件命名规则:
下载结果示例:
references/Bidirectional_Cross-Modal_Prompting_for_Event-Frame.pdfreferences/MM-WebAgent_A_Hierarchical_Multimodal_Web_Agent.pdf重要:此步骤是标准工作流程的必要环节,必须执行!
阅读摘要和核心方法,总结现有工作的局限性:
按标准科研论文结构,使用 IEEEtran 双栏格式:
\documentclass[conference]{IEEEtran}
论文结构:
使用标准 LaTeX 公式、表格、\ref{} 交叉引用。
使用 matplotlib 生成 300dpi 高质量图片:
import matplotlib.pyplot as plt
plt.rcParams['font.size'] = 10
plt.rcParams['figure.dpi'] = 300
# 图1: 模型框架图 - 整体架构,模块化,箭头标注
# 图2: 方法细节图 - 核心创新机制
# 图3: 实验结果图 - 对比曲线、柱状图
使用 TeX Live(不是 Tectonic)编译:
$texlive = "D:\texlive\2026\bin\windows\pdflatex.exe"
$paper_dir = "C:\Users\29064\Desktop\PaperName"
# 必须运行两次!第一次生成 .aux,第二次解析交叉引用
& $texlive "$paper_dir\paper.tex" -interaction=nonstopmode -output-directory="$paper_dir"
& $texlive "$paper_dir\paper.tex" -interaction=nonstopmode -output-directory="$paper_dir"
关键规则:
输出路径:C:\Users\29064\Desktop\[论文名字]\
包含文件:
paper.tex - 主论文文件paper.pdf - 编译后的 PDFfigure1.png / figure2.png / figure3.png - 配图references/paper_references.md - 文献调研列表references/*.pdf - 原始论文 PDF论文撰写完成后,删除所有临时脚本文件:
search_*.ps1)download_*.ps1)generate_*.py)Remove-Item "$env:USERPROFILE\Desktop\*.ps1" -Force
Remove-Item "$env:USERPROFILE\Desktop\*.py" -Force
Remove-Item "$env:USERPROFILE\Desktop\*_v*.pptx" -Force