Skill 详情
study
Helps deeply study research papers, but is limited to PDF-paper workflows.
使用前先检查
自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。
SKILL.md
这段内容是审核时保存的快照。外部来源才是完整且最新的版本。
---
name: study
description: Use this skill when the user wants to read, study, analyze, or deeply understand a research paper (PDF).
disable-model-invocation: false
allowed-tools: Bash, Write, Edit, Read
---
# Paper Study Workflow
Invoke this skill with a paper PDF path.
**Language Detection**: Detect the user's language from their input and generate ALL materials in that language.
- Example: User says "我们学习一下这篇论文吧" → Generate materials in Chinese
- Example: User says "Let's study this paper" → Generate materials in English
---
# Core Philosophy
Primary Objective:
Facilitate deep conceptual understanding and research-level thinking.
Secondary Objective:
Create a structured, reusable paper knowledge system.
This workflow is not just for summarizing — it builds a learning environment around the paper.
---
# Step 0: Check Dependencies (First Run Only)
```bash
if [ ! -f "${CLAUDE_PLUGIN_ROOT}/.installed" ]; then
echo "First run - installing dependencies..."
cd "${CLAUDE_PLUGIN_ROOT}"
npm install || exit 1
# Install Python dependencies for image extraction
python3 -m pip install pymupdf --user 2>/dev/null || pip3 install pymupdf --user 2>/dev/null || echo "Warning: Failed to install pymupdf"
touch "${CLAUDE_PLUGIN_ROOT}/.installed"
echo "Dependencies installed!"
fi
```
Recommended:
* Node >= 18
* Python 3 with pip (for image extraction)
---
# Step 1: Download and Parse PDF
Supports multiple input formats:
* **Local path**: `~/Downloads/paper.pdf`
* **Direct PDF URL**: `https://arxiv.org/pdf/1706.03762.pdf`
* **arXiv URL**: `https://arxiv.org/abs/1706.03762`
## Step 1a: Check input type and download if URL
```bash
USER_INPUT="<user-input>"
# Check if input is a URL (starts with http:// or https://)
if [[ "$USER_INPUT" =~ ^https?:// ]]; then
# Download PDF from URL
INPUT_PATH=$(node ${CLAUDE_PLUGIN_ROOT}/skills/study/scripts/download-pdf.cjs "$USER_INPUT")
else
# Use local path directly
INPUT_PATH="$USER_INPUT"
fi
```
For URLs, the download script will:
* Download PDFs to `/tmp/claude-paper-downloads/`
* Convert arXiv `/abs/` URLs to PDF URLs automatically
* Validate that URLs point to PDF files
* Return the local file path for processing
For local paths, use the path directly without downloading.
## Step 1b: Parse PDF
Extract structured information:
```bash
node ${CLAUDE_PLUGIN_ROOT}/skills/study/scripts/parse-pdf.js "$INPUT_PATH"
```
Output includes:
* title
* authors
* abstract
* full content
* githubLinks
* codeLinks
* tags (generated in Step 2.5)
Save to:
```
~/claude-papers/papers/{paper-slug}/meta.json
```
Copy original PDF:
```bash
cp <pdf-path> ~/claude-papers/papers/{paper-slug}/paper.pdf
```
Fallback:
If structured parsing fails, extract raw text and continue with degraded structure.
---
# Step 2: Assess Paper Before Generating Materials
Before generating any files, evaluate:
1. Difficulty Level
* Beginner
* Intermediate
* Advanced
* Highly Theoretical
2. Paper Nature
* Theoretical
* Architecture-based
* Empirical-heavy
* System design
* Survey
3. Methodological Complexity
* Simple pipeline
* Multi-stage training
* Novel architecture
* Heavy mathematical derivation
This assessment determines:
* Whether to create method.md
* Whether to create .ipynb
* Explanation depth
* Code demo complexity
---
# Step 2.5: Generate Exactly 2 Semantic Tags (Mandatory)
Before generating files, infer exactly 2 tags from semantic understanding of the paper.
Rules:
* Generate exactly 2 tags, no more and no less
* Tags must be distinct
* Each tag should be short (1-3 words)
* Avoid generic tags: `paper`, `research`, `ai`, `ml`
* Prefer one tag for problem/domain and one for method/core idea
Examples:
* `machine translation`, `self-attention`
* `3d detection`, `bev transformer`
* `protein folding`, `structure prediction`
Persist these 2 tags in both locations:
* `~/claude-papers/papers/{paper-slug}/meta.json` as `tags`
* `~/claude-p在 GitHub 阅读完整来源 (打开外部页面)