Ar9av/PaperOrchestra / skills/literature-review-agent
literature-review-agent
UnverifiedStep 3 of the PaperOrchestra pipeline (arXiv:2604.05018). Execute the literature search strategy from outline.json — discover candidate papers via web search, verify them through Semantic Scholar (Levenshtein > 70 fuzzy title match, temporal cutoff, dedup by paperId), cross-corroborate against Crossref + OpenAlex to flag hallucinated citations, build a BibTeX file, and draft Introduction + Related Work using ≥90% of the verified pool. Runs in parallel with the plotting-agent. TRIGGER when the orchestrator delegates Step 3 or when the user asks to "find citations for my paper", "draft the related work", or "build the bibliography".
scripts/levenshtein_match.py
View on GitHub#!/usr/bin/env python3
"""
levenshtein_match.py — Fuzzy title match for citation verification.
Implements the paper's Rule 1 (App. D.3): a candidate paper passes only if
its title's Levenshtein ratio against the Semantic Scholar hit's title is
strictly greater than 70.
Includes a substring-bypass safety net for short candidate titles (the
Linformer false-negative case): if the candidate is < 4 words and is
contained as a substring in the S2 hit's title, return 100.
Exit code is always 0; the integer ratio is printed to stdout. The caller
parses it and decides whether to discard.
Usage:
python levenshtein_match.py --candidate "..." --found "..."
python levenshtein_match.py --candidate "..." --found "..." --substring-bypass
"""
import argparse
import re
import sys
try:
import Levenshtein
except ImportError:
print("ERROR: python-Levenshtein required. Install with: pip install python-Levenshtein",
file=sys.stderr)
sys.exit(2)
def normalize(s: str) -> str:
s = s.lower().strip()
s = re.sub(r"[^a-z0-9\s]", " ", s)
s = re.sub(r"\s+", " ", s)
return s
def ratio(a: str, b: str, substring_bypass: bool = False) -> int:
na, nb = normalize(a), normalize(b)
r = int(round(Levenshtein.ratio(na, nb) * 100))
if substring_bypass and len(na.split()) < 4:
if na in nb:
return max(r, 95)
return r
def main() -> int:
p = argparse.ArgumentParser(description=__doc__)
p.add_argument("--candidate", required=True,
help="The original candidate title (from web search)")
p.add_argument("--found", required=True,
help="The title returned by Semantic Scholar")
p.add_argument("--substring-bypass", action="store_true",
help="Bump short-candidate substring matches to 95")
p.add_argument("--threshold", type=int, default=70,
help="Print PASS/FAIL alongside the ratio (default 70)")
args = p.parse_args()
r = ratio(args.candidate, args.found, args.substring_bypass)
verdict = "PASS" if r > args.threshold else "FAIL"
print(f"{r} {verdict}")
return 0
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |