Today paper summary

From InternScience/DrClaw · View interactive version

Today paper summary is an AI agent skill from the GitHub repository InternScience/DrClaw. Retrieves papers the user browsed today, downloads PDFs, generates summaries, and returns an enriched list. Use when the user asks what papers they read today, wants a summary of today's papers, or asks about their recent reading activity.

How to use this skill

Skill file

today-paper-summary

Collect academic papers visited in the browser today, download their PDFs, summarize each one, and return structured results.

Workflow

Step 1: Fetch today's paper URLs

from browser_history import collect_today_paper_urls
records = collect_today_paper_urls()

records is a List[Dict] with fields: browser, db_path, url, title, visit_count, last_visit_time.

Step 2: Download PDFs

import requests
from pathlib import Path
from datetime import date

save_dir = Path(date.today().isoformat())
save_dir.mkdir(exist_ok=True)

def get_pdf_url(url: str) -> str:
    """Convert an abstract URL to a PDF URL (arXiv-specific)."""
    return url.replace("/abs/", "/pdf/")

def download_pdf(pdf_url: str, dest: Path) -> bool:
    try:
        r = requests.get(pdf_url, timeout=30, headers={"User-Agent": "Mozilla/5.0"})
        if r.status_code == 200:
            dest.write_bytes(r.content)
            return True
    except Exception:
        pass
    return False

Step 3: Extract text and summarize

import pypdf

def extract_text(pdf_path: Path, max_pages: int = 5) -> str:
    reader = pypdf.PdfReader(str(pdf_path))
    return "\n".join(p.extract_text() or "" for p in reader.pages[:max_pages])

Summary prompt template:

Summarize the following paper in concise English using this format:

[Core contribution] One sentence (≤ 50 words)
[Method highlights]
- ...
[Key findings]
- ...

Paper content:
{text}

Step 4: Build the enriched list

results = []
for r in records:
    results.append({
        "browser":         r["browser"],
        "last_visit_time": r["last_visit_time"],
        "title":           r["title"],
        "url":             r["url"],
        "summary":         "<summary from Step 3, or 'unavailable' on failure>",
    })

Return results.

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.