Install
openclaw skills install related-works-report-from-paper-mdsBuild a related-works report from one or more paper markdown files by extracting Related Works sections, resolving cited papers, deduplicating references, retrieving arXiv abstracts via Tavily plus local helpers, and assembling a final report inside a user-specified work folder. Use when the user points at paper_mds, wants a related-works survey report, or asks to turn several paper markdown files into a final_related_works_report.md.
openclaw skills install related-works-report-from-paper-mdsOrchestrate a full related-works reporting workflow for: $ARGUMENTS
This workflow turns a small set of paper markdown files into a reproducible report:
paper md files
-> step1 extract Related Works + cited papers
-> step2 deduplicate cited papers
-> sequential Tavily abstract lookup + local arXiv fetch
-> normalized citation companion text
-> final_related_works_report.md
The output is not just the final report. Every intermediate artifact is written into the user-selected work folder so the process can be resumed, audited, or partially rerun.
Before running, collect or infer:
If WORKDIR is missing, ask the user for it before doing substantial work.
All process outputs and the final report must be written under WORKDIR. Do not write process artifacts elsewhere.
P001final_related_works_report.mdCreate and maintain these artifacts under WORKDIR:
| Artifact | Purpose |
|---|---|
step1_extracted_related_works_and_citations.md | Per-source Related Works verbatim + citation tables |
step1_normalized_related_works.md | Citation-normalized companion text using dedup ids like P001 when replacement is unambiguous |
step2_deduplicated_paper_list.md | Deduplicated paper list with source occurrences |
title_batches/batch_XX.md | Abstract lookup batches |
abstract_batches/batch_XX_fetches.jsonl | One JSON line per title after Tavily + local fetch |
abstract_batches/batch_XX_results.md | Rendered markdown per abstract batch |
final_related_works_report.md | Final assembled report |
Run phases in order. Do not stop after a checkpoint unless:
Parallelism rules:
PAPER_MD_PATHS.WORKDIR, WORKDIR/title_batches, and WORKDIR/abstract_batches.Use one clean-context sub agent per source markdown file.
Each sub agent must return:
[12], Guo et al., 2017, etc.)Merge all outputs into WORKDIR/step1_extracted_related_works_and_citations.md.
Build WORKDIR/step2_deduplicated_paper_list.md.
Rules:
Before final assembly, produce WORKDIR/step1_normalized_related_works.md.
Goal:
step1_extracted_related_works_and_citations.mdP001Preferred format:
[12] -> [P052](Guo et al., 2017) -> [P095]Rules:
This step exists because the final report should be easy to align with the deduplicated bibliography.
Use the helper scripts stored inside this skill:
.cursor/skills/related-works-report-from-paper-mds/scripts/fetch_arxiv_abs.py.cursor/skills/related-works-report-from-paper-mds/scripts/jsonl_to_abstract_batch_md.py"<paper title>" arXivabs, then html, then pdfhtml/pdf to canonical https://arxiv.org/abs/<id>arXiv URL and Abstract emptyFor each processed title, immediately append one JSON line to:
WORKDIR/abstract_batches/batch_XX_fetches.jsonlEach line should include at least:
dedup_idinput_titletavily_statustavily_errorarxiv_urlfetchAfter a batch completes, render markdown with:
python3 ".cursor/skills/related-works-report-from-paper-mds/scripts/jsonl_to_abstract_batch_md.py" \
"WORKDIR/abstract_batches/batch_XX_fetches.jsonl" \
"WORKDIR/abstract_batches/batch_XX_results.md"
Use the final builder script stored inside this skill:
python3 ".cursor/skills/related-works-report-from-paper-mds/scripts/build_final_related_works_report.py" \
"WORKDIR/step1_extracted_related_works_and_citations.md" \
"WORKDIR/step2_deduplicated_paper_list.md" \
"WORKDIR/abstract_batches" \
"WORKDIR/final_related_works_report.md" \
"WORKDIR/step1_normalized_related_works.md"
The final report should contain:
WORKDIR.step2 in Part 2.scripts/fetch_arxiv_abs.py — compact metadata + abstract extraction from a known arXiv URLscripts/jsonl_to_abstract_batch_md.py — render one batch markdown from JSONLscripts/build_final_related_works_report.py — assemble the final report from workdir artifactsWORKDIR contents, see examples.md/related-works-report-from-paper-mds \
"0_refs/paper_mds/2025_ConfidenceVLA.md 0_refs/paper_mds/2025_SAFE.md 0_refs/paper_mds/2025_FAIL_Detect.md --workdir 0_docs/related_works_report_run_02"