Skip to content

alaliqing/claude-paper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude Paper

Transform research papers into comprehensive learning environments

English | δΈ­ζ–‡

License: MIT Node Version Claude Code Plugin

A powerful Claude Code plugin that automates research paper study through intelligent material generation, code demonstrations, and an interactive web viewer.

Library View
Library View - Browse and search your paper collection
Reading View
Reading View - Study papers with rich formatting and math support

Features

  • Automatic PDF parsing - Extract title, authors, abstract, and full content
  • Smart content truncation - Handles large papers (50k char limit) intelligently
  • Code repository detection - Automatically finds GitHub, arXiv, CodeOcean links
  • Adaptive learning materials - Generates README, summary, insights, Q&A based on paper complexity
  • Code demonstrations - Clean implementations with Jupyter notebooks and original code integration
  • Interactive web viewer - Nuxt.js interface with math equation support (KaTeX)
  • Intelligent assessment - Difficulty levels and paper type detection for adaptive content generation

Quick Start

Installation

Install from the Claude Code marketplace:

# Add the marketplace
/plugin marketplace add alaliqing/claude-paper

# Install the plugin
/plugin install claude-paper

# Restart Claude Code for the plugin to take effect

That's it! The plugin will automatically:

  • Install all dependencies (pdf-parse for PDF processing)
  • Create the papers directory at ~/claude-papers/
  • Initialize the search index
  • Install web viewer dependencies

System Requirements

  • Node.js: 18.0.0 or higher
  • npm: Comes with Node.js
  • Claude Code: Latest version with plugin support
  • poppler-utils: For PDF image extraction (install via system package manager)
    • macOS: brew install poppler
    • Ubuntu/Debian: sudo apt-get install poppler-utils
    • Arch Linux: sudo pacman -S poppler

Usage

Study a Research Paper

Simply talk to Claude Code to study a paper:

Help me study the paper at ~/Downloads/attention-is-all-you-need.pdf

You can also use URLs:

# Direct PDF URL
Help me study the paper at https://arxiv.org/pdf/1706.03762.pdf

# arXiv abstract URL (automatically converted to PDF)
Help me study the paper at https://arxiv.org/abs/1706.03762

Claude will automatically trigger the study workflow and:

  1. Parse the PDF and extract metadata
  2. Analyze paper complexity and type
  3. Generate adaptive learning materials
  4. Create code demonstrations (if applicable)
  5. Extract and include original code (if available)
  6. Extract key figures and images
  7. Update the global search index
  8. Launch the web viewer automatically

Launch Web Viewer

/claude-paper:webui

Opens the interactive web interface at http://localhost:5815 where you can:

  • Browse all studied papers
  • View generated materials with math rendering
  • Access code demonstrations and notebooks
  • Search through your paper library

Paper Storage Structure

Papers are organized in ~/claude-papers/papers/{paper-slug}/:

~/claude-papers/
β”œβ”€β”€ papers/
β”‚   └── {paper-slug}/
β”‚       β”œβ”€β”€ paper.pdf                     # Original PDF file
β”‚       β”œβ”€β”€ meta.json                     # Paper metadata (title, authors, etc.)
β”‚       β”œβ”€β”€ README.md                     # Quick navigation and overview
β”‚       β”œβ”€β”€ summary.md                    # Detailed summary
β”‚       β”œβ”€β”€ insights.md                   # Key insights (most important!)
β”‚       β”œβ”€β”€ method.md                     # Methodology (if complex)
β”‚       β”œβ”€β”€ mental-model.md              # Paper categorization (if needed)
β”‚       β”œβ”€β”€ reflection.md                # Future directions (if needed)
β”‚       β”œβ”€β”€ qa.md                         # Learning questions
β”‚       β”œβ”€β”€ index.html                    # Interactive HTML explorer
β”‚       β”œβ”€β”€ images/                       # Extracted figures and tables
β”‚       β”‚   β”œβ”€β”€ fig1.png
β”‚       β”‚   └── fig2.png
β”‚       └── code/                         # Code demonstrations
β”‚           β”œβ”€β”€ core-demo.py              # Clean reference implementation
β”‚           └── concept-demo.ipynb        # Interactive Jupyter notebook
β”‚
└── index.json                           # Global search index

Architecture

Plugin Structure

claude-paper/
β”œβ”€β”€ .claude-plugin/
β”‚   └── marketplace.json              # Marketplace catalog entry
β”œβ”€β”€ plugin/
β”‚   β”œβ”€β”€ .claude-plugin/
β”‚   β”‚   └── plugin.json              # Plugin manifest
β”‚   β”œβ”€β”€ skills/
β”‚   β”‚   └── study/
β”‚   β”‚       β”œβ”€β”€ SKILL.md             # Study workflow definition
β”‚   β”‚       └── scripts/
β”‚   β”‚           β”œβ”€β”€ parse-pdf.js    # PDF parsing utility
β”‚   β”‚           └── extract-images.py  # Image extraction
β”‚   β”œβ”€β”€ commands/
β”‚   β”‚   └── webui.md                # /webui command
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ hooks.json              # Session lifecycle hooks
β”‚   β”‚   └── check-install.sh        # Installation verification
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── web/                    # Nuxt.js web viewer
β”‚   β”‚       β”œβ”€β”€ components/         # Vue components
β”‚   β”‚       β”œβ”€β”€ composables/        # Vue composables
β”‚   β”‚       β”œβ”€β”€ server/             # API endpoints
β”‚   β”‚       └── package.json
β”‚   └── package.json
└── README.md

Key Components

  1. Study Skill - Main workflow agent that orchestrates paper processing
  2. PDF Parser - Extracts text, metadata, and code links using pdf-parse
  3. Image Extractor - Python script for PDF figure extraction
  4. Web Viewer - Nuxt.js application with Nitro API server
  5. Hooks System - Automatic dependency installation and setup

Development

Running Tests

# Test PDF parsing
node plugin/skills/study/scripts/parse-pdf.js /path/to/paper.pdf

# Test web viewer
cd plugin/src/web
npm run dev

# Test full workflow
cd /path/to/claude-paper
claude --plugin-dir ./plugin
/claude-paper:study /path/to/paper.pdf

Building for Production

# Build web viewer
cd plugin/src/web
npm run build

# The built viewer will be in .output/

Configuration

Environment Variables

No configuration required! The plugin uses sensible defaults:

  • Papers directory: ~/claude-papers/
  • Web viewer port: 5815
  • Content limit: 50,000 characters (with intelligent truncation)

Advanced Customization

You can modify behavior by editing the skill file at: plugin/skills/study/SKILL.md


Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes (git commit -m 'add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

About

πŸ“š Claude Code plugin that automates research papers study with automatic material generation, code demonstrations, and interactive web viewer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors