Foreword

In the DeepSeek Harness (DSH) plugin ecosystem, building scenario-specific Agents is key to improving efficiency. For researchers whose native language is Chinese, reading English papers directly often comes with challenges in terminology, mathematical derivations, and layout. The dsh-paper-tutor plugin is a preset plugin designed for this purpose. It provides a dedicated workflow and toolset for close paper reading, aiming to lower the barrier to reading English literature.

Plugin Introduction

This plugin is maintained by ASAKAFENG and is released under the MIT license. It is an English paper close-reading Agent preset for Chinese readers. Its core value lies in using an automated toolchain and a Chinese instructional persona to help users complete the entire process from asset inventory to content extraction and in-depth explanation.

The plugin provides the following core components:

  1. paper-tutor Agent preset: This is a preconfigured session preset that includes Chinese instructional prompts and the paper-reading skill. After startup, it is automatically installed to $DSH_HOME/.agent-presets/paper-tutor/.
  2. paper_scan tool: Used to inventory paper assets in the workspace, including PDF files, LaTeX sources, figure and chart images, companion code, and datasets.
  3. pdf_extract tool: Implemented in pure JS with no npm dependencies, this tool extracts the full text from PDFs. It can extract page by page, preserve layout and two-column reading order, and automatically extract embedded figures with automatic caption matching.
  4. tex_structure tool: Parses the structure of LaTeX sources and outputs the section outline, floating figures and tables, formulas, theorems, citation keys, and \input inclusion relationships.
  5. paper_figure tool: Extracts figures and charts from PDF pages (supports PNG/JPEG) and uses heuristic matching to associate figure captions with images. If a vision endpoint is configured, it can further interpret the content of the figures.

Installation and Activation

The plugin supports two installation methods: remote one-click installation and local development installation. After installation, restart DSH to make the preset take effect.

Use the official installation script to automatically download the latest version and set it up in the DSH environment:

curl -fsSL https://raw.githubusercontent.com/ASAKAFENG/dsh-paper-tutor/main/scripts/install.sh | bash -s -- --github

The script automatically handles installing the preset to $DSH_HOME/.agent-presets/paper-tutor/.

Method 2: Local Installation

If you need to modify the source code or install offline, you can clone the repository and then run the local setup:

git clone https://github.com/ASAKAFENG/dsh-paper-tutor.git
bash dsh-paper-tutor/scripts/install.sh

Method 3: Profile Bundle

To install it as a profile bundle, build it in the plugin directory, then manually edit the profile’s package.json, add the dependencies and bundles list, and finally restart DSH.

Usage

The core workflow for using the plugin is as follows:

  1. Start a session: Create a new session in DSH and select “Paper Close Reading · Paper Tutor” in the preset selector.
  2. Prepare files: Place the paper PDF to be read (or the LaTeX source and companion code) into the current workspace.
  3. Issue instructions: Send natural language instructions to the Agent, for example:
    • “Close read this paper”
    • “Help me review xxx.pdf and clearly explain the methods section”
  4. Agent workflow:
    • paper_scan scans and inventories workspace assets.
    • pdf_extract extracts PDF content and creates reading cards.
    • The Agent explains the paper section by section in Chinese.
    • paper_figure reads figure and chart content, if a vision endpoint is configured.
    • The Agent cross-references workspace code for traceability explanation.
    • The Agent outputs close-reading notes.

It is recommended to place the companion code for the paper in the same workspace or a subdirectory so that the Agent can analyze the paper and code side by side.

Configuration

The plugin supports several configuration options, mainly used to control PDF processing quality and vision model calls.

Config Item Default Value Description
installPreset false Whether to install the preset with the package.
pdftotext "auto" auto/on/off. Whether to prioritize the system poppler-utils (pdftotext) to improve extraction quality.
imageDir ".paper-figures" Output directory for extracted figures and charts, relative to the workspace.
maxPdfBytes 200MB Maximum PDF size for a single parsing operation.
visionBaseURL "" OpenAI-compatible vision endpoint URL.
visionApiKey "" Vision API key. Has higher priority than environment variables.
visionApiKeyEnv "VISION_API_KEY" Environment variable name used to store the API key.
visionModel "gpt-4o-mini" Vision model name.

If no vision endpoint is configured, paper_figure will return the image paths so users can view them manually or use them with other multimodal models.

Environment and Dependencies

The plugin has specific requirements for the runtime environment:

  • Node.js: Node.js ≥ 22 is required.
  • DeepSeek Harness: Depends on the DSH 0.1.x rc series.
  • System tools:
    • The installation script requires bash ≥ 3.2 on Linux/macOS, or PowerShell 5.1+ on Windows.
    • Installing poppler-utils (pdftotext) is recommended for better layout extraction. If it is not available, the plugin automatically falls back to the built-in pure JS engine.

Notes

  1. Target users: The plugin is designed for Chinese-native users and supports four levels of depth: quick review, close reading, traceability against code, and critical analysis.
  2. Runtime permissions: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installation.
  3. Idempotency: The installation script is idempotent. Older versions are automatically backed up as .bak-<timestamp>, so repeated execution is safe.

Conclusion

By integrating paper asset inventory, structural parsing, and figure-and-text extraction, dsh-paper-tutor provides Chinese users with a complete assistance solution from “understanding” to “mastering” a paper. When paired with an optional vision endpoint, it can further reduce manual effort and help users focus on organizing the paper’s logic.