Paper Reading Agent
AI-powered academic paper analysis and summarization with citation tracking and figure extraction.
When to Use
Use this skill when user requests:
- Read paper / analyze paper / summarize paper
- Extract key points / innovations from paper
- Understand paper content
- Generate paper summary
- Extract citation relationships
- Analyze citation relevance and identify key references
- Fetch and integrate GitHub project code for better understanding
Project Structure
The project is bundled in ${CLAUDE_SKILL_DIR}/:
paper-reader/
├── SKILL.md # This file
├── README.md # Documentation
├── error_example/ # Example files with issues
└── scripts/ # Project code
├── src/ # Source code
│ ├── agent/ # PaperAgent core
│ │ ├── paper_agent.py
│ │ └── github_integration.py # GitHub integration
│ ├── parsers/ # PDF/HTML parsers
│ ├── llm/ # LLM integration
│ ├── analysis/ # Citation tracking, analysis, figure analysis
│ │ ├── citation_tracker.py # Citation extraction
│ │ ├── citation_analyzer.py # Citation relevance analysis
│ │ ├── citation_graph.py # Citation graph visualization
│ │ └── figure_analyzer.py # Figure extraction
│ └── output/ # Markdown generation
├── tests/ # Test files
├── paper_reader.py # CLI entry point
└── pyproject.toml # Project configuration
Usage
Command Line
Run analysis using uv from the skill directory:
# Basic usage - specify paper path
uv --directory ${CLAUDE_SKILL_DIR}/scripts run python paper_reader.py /path/to/paper.pdf
# Specify output path
uv --directory ${CLAUDE_SKILL_DIR}/scripts run python paper_reader.py /path/to/paper.pdf -o ./output/
# Use specific model
uv --directory ${CLAUDE_SKILL_DIR}/scripts run python paper_reader.py /path/to/paper.pdf -m minimax/MiniMax-M2.5
# Enable verbose output
uv --directory ${CLAUDE_SKILL_DIR}/scripts run python paper_reader.py /path/to/paper.pdf -v
Python API
import sys
sys.path.insert(0, "${CLAUDE_SKILL_DIR}/scripts")
from pathlib import Path
from src.agent import PaperAgent
agent = PaperAgent(model="minimax/MiniMax-M2.5", temperature=0.7)
paper_path = Path("/path/to/paper.pdf")
output_path = Path("./output/summary.md")
summary = agent.read_and_summarize(paper_path, output_path)
print(f"Title: {summary.title}")
print(f"Abstract: {summary.abstract}")
print(f"Key Innovations: {summary.key_innovations}")
Parse Only (No LLM)
import sys
sys.path.insert(0, "${CLAUDE_SKILL_DIR}/scripts")
from pathlib import Path
from src.parsers import UniversalParser
parser = UniversalParser()
result = parser.parse(Path("paper.pdf"))
print(f"Title: {result.title}")
print(f"Full text length: {len(result.text)} chars")
print(f"Sections: {list(result.sections.keys())}")
Citation Graph Generation
import sys
sys.path.insert(0, "${CLAUDE_SKILL_DIR}/scripts")
from src.analysis.citation_tracker import CitationTracker
from src.analysis.citation_graph import CitationGraphVisualizer
tracker = CitationTracker()
tracker.extract_citations(paper_text)
viz = CitationGraphVisualizer()
graph = viz.build_graph_from_tracker(tracker, "Paper Title")
mermaid = viz.generate_mermaid(graph)
print(mermaid)
Configuration
Model Priority
- Anthropic (default) - Uses
ANTHROPIC_API_KEY+ANTHROPIC_MODEL - OpenAI - Uses
OPENAI_API_KEY+OPENAI_MODEL - MiniMax - Falls back to
minimax/MiniMax-M2.5if neither above configured - Manual Override - Specify with
-mflag
Environment Variables
# Anthropic API (recommended - default)
export ANTHROPIC_API_KEY=your-key
export ANTHROPIC_MODEL=claude-sonnet-4-20250514
# Or OpenAI
export OPENAI_API_KEY=your-key
export OPENAI_MODEL=gpt-4o
# Or MiniMax (fallback)
export MINIMAX_API_KEY=your-key
export MINIMAX_GROUP_ID=your-group-id
Output Format
Generated summary includes:
- Abstract
- Introduction
- Key Innovations
- Core Techniques
- Experimental Results
- Discussion
- Conclusion
- Datasets
- Metrics
- Citation Analysis - Relevant citations with author, year, topic, relevance score, and contribution
Examples
Direct Invocation
/paper-reader /path/to/your_paper.pdf
With Output Path
/paper-reader /path/to/your_paper.pdf -o ./my_summary.md
Analyze Paper Content
User says: "Can you read this paper and tell me what it's about?"
→ Use this skill to parse the PDF and generate a comprehensive summary.