/paper — Academic Paper Workflow
Default Config
Edit this section to customize for your project.
output_dir: "./papers"
# Obsidian vault users: set paper_output_dir in your project's CLAUDE.md
# Drive/OneDrive: use the appropriate MCP, then set path (e.g. "gdrive://My Drive/Papers")
venues: [CHI, ACL, EMNLP, NAACL, NeurIPS, ICML, ICLR, EDM, LAK, AIED, ITS, CSCW, SIGIR, CIKM]
keywords:
- cognitive load
- adaptive learning
- intelligent tutoring
- conversational learning
- LLM tutoring
- learning analytics
- behavioral signals
- educational dialogue
min_citations: 5 # /paper find: filter out papers with fewer citations
daily_max: 10 # /paper digest: max papers per run
annotation_lang: zh # zh = Chinese annotations | en = English; override with --lang
openalex_email: "" # Optional. Add email to join OpenAlex Polite Pool (higher rate limits).
semantic_scholar_api_key: "" # Optional. Free key: semanticscholar.org/product/api
Override any config value in your project's CLAUDE.md using keys: paper_output_dir, paper_venues, paper_keywords, paper_annotation_lang.
Subcommands
| Command |
Usage |
Description |
find |
/paper find "cognitive load LLM" |
Search papers → Digest HTML with top N cards |
read |
/paper read /path/to/file.pdf |
Annotate a single PDF → full dual-column HTML |
digest |
/paper digest |
Daily new papers from arxiv (used by cron) |
cite |
/paper cite [[note-name]] |
Generate APA + BibTeX citation from existing annotation |
Flags:
--context "ML课第3周" — override project context
--questions "Q1:... Q2:..." — switch to Question mode (Mode A)
--questions — interactive question mode (Claude asks you)
--output /path/ — override output directory for this run
--top N — return N results (default: 5 for find, daily_max for digest); also accepts bare number after query
--lang en — override annotation language for this run
--source arxiv — search only arxiv (latest preprints, no citation filter)
--source venues — search only papers from config venues list (citation-weighted ranking)
--local /path/ — read local PDFs from folder (no API calls); or --local a.pdf b.pdf for specific files
Flags can be written with or without --. Claude accepts natural language equivalents (e.g. top 5, source venues, local /path/, questions "...").
Context Resolution (in priority order)
--context flag in command
- Current directory's
CLAUDE.md (auto-loaded by Claude Code)
- No context → use Mode B directly (zero-config, logic analysis mode)
Data Sources
Primary: OpenAlex
Free, no API key required, 10 req/s rate limit.
https://api.openalex.org/works?search={query}
&select=title,authorships,publication_year,cited_by_count,primary_location,doi
&per-page=20
[&mailto={openalex_email} ← add if configured]
After fetching: immediately extract and keep only — title, first author, year, cited_by_count, venue name (primary_location.source.display_name), DOI. Discard all other fields from the response before further processing.
Secondary: Semantic Scholar (only if semantic_scholar_api_key is set)
https://api.semanticscholar.org/graph/v1/paper/search?query={topic}
&fields=title,authors,year,citationCount,venue,externalIds&limit=20
Header: x-api-key: {semantic_scholar_api_key}
Tertiary: arxiv (fallback + digest source)
https://export.arxiv.org/api/query?search_query=(cat:cs.CL+OR+cat:cs.HC+OR+cat:cs.AI+OR+cat:cs.LG)
+AND+({keywords})&sortBy=submittedDate&sortOrder=descending&max_results=30
Note: arxiv papers have no citation count. Label as preprint.
Rate Limit Handling
If a source returns 429: check Retry-After header → wait that many seconds. If no header: wait 2s → 5s → 10s (3 retries). After 3 failures → skip source, move to next in priority. Note which source was skipped in output.
Subcommand: find
Parse flags: topic query, --top N (default: 5), --lang, --source (default: mixed), --local (path or file list)
--top N also accepts a bare number immediately after the query string (e.g. /paper find "query" 10 → top 10)
Resolve source strategy:
--source / flag |
API calls |
Ranking formula |
| (default, mixed) |
Single OpenAlex call sort=cited_by_count:desc; arxiv fallback if <3 results |
0.5 × relevance_rank + 0.3 × log(cited_by_count+1) + 0.2 × recency_score |
arxiv |
arxiv API only (sortBy=submittedDate); no min_citations filter |
0.5 × relevance_rank + 0.5 × recency_score |
venues |
Single OpenAlex call; keep only papers where venue name matches any entry in config venues list (case-insensitive partial match on primary_location.source.display_name) |
0.5 × relevance_rank + 0.5 × log(cited_by_count+1) |
--local /path/ or --local a.pdf b.pdf |
No API calls — read local PDFs only |
Take first --top N files (alphabetical order) |
--local and --source are mutually exclusive. If both are given, return an error.
If --local flag present — execute local PDF steps instead of steps 3–6:
- Scan the given folder for all
.pdf files, or use the explicitly listed files directly
- If file count >
--top N, take first N (alphabetical order)
- For each PDF, extract: title, authors, year, abstract (first 300 words), conclusion paragraph (last 300 words)
- Generate a Digest Card per PDF (same 4-sentence format: 研究问题 / 核心方法 / 关键发现 / 相关性)
- Citation badge: fixed as
📄 Local PDF (no OpenAlex lookup)
- Card bottom link:
/paper read /absolute/path/to/file.pdf 精读 (use absolute path)
- Save to:
{output_dir}/FindResults/find-local-YYYY-MM-DD-HHmm-{folder-slug}.html
- Print summary and exit — skip steps 4–8 below
3b. Fetch papers (online mode):
- Add
&filter=cited_by_count:>{min_citations} for default/venues mode (skip for arxiv)
- After fetch: immediately discard all fields except title, first author, year, cited_by_count, venue name, DOI
- On any source failure → follow Rate Limit Handling
Deduplicate against existing files:
- Check
{output_dir}/FindResults/ and {output_dir}/ root for [FirstAuthor-YYYY-slug].html
- Mark existing papers as
[已有], include in summary with their path, skip card generation
Rank top N using the formula for the active source strategy
Generate Digest HTML — a single self-contained HTML file containing N paper cards.
Digest Card format (one card per paper):
[Title] — [First Author] et al., [Year] — [Venue or arXiv]
[Citation badge] [Source tag]
研究问题: [1 sentence — what problem does this paper solve?]
核心方法: [1 sentence — what approach do they use?]
关键发现: [1 sentence — what is the main result?]
相关性: [1 sentence — why this matters for your research, based on CLAUDE.md context]
[DOI link if available] · → /paper read <doi_or_path> 精读
- Citation badge uses tier logic from Paper Quality Bar section
- Annotation language for cards follows
annotation_lang config (or --lang flag)
- HTML structure: simple cards layout, embed
references/template.css in <style>
Save Digest HTML to: {output_dir}/FindResults/find-YYYY-MM-DD-HHmm-{query-slug}.html
- Create subdirectory automatically if it doesn't exist
Print summary:
Found N papers via {source}. Digest saved:
→ 30_Research/FindResults/find-2026-03-14-1430-cognitive-load-llm.html
Papers included:
- Jin-2025-llm-teachable-agent [⭐ 47 citations · CHI]
- Cai-2025-intrinsic-load [📄 preprint · arXiv]
- Klepsch-2017-two-types-icl [已有 → 30_Research/FindResults/...]
Subcommand: read
- Read the PDF at provided path
- Extract: title, authors, year, venue/journal, abstract, full text
- Resolve mode:
- No
--questions → Mode B (logic analysis)
--questions "..." → Mode A (inline). Parse questions using these rules:
--questions (no argument) → Mode A (interactive):
Output exactly: 请输入你的阅读问题(每行一个,或逗号分隔,最多6个):
Wait for user input, then parse using the same rules above, then proceed with Mode A
- Resolve annotation language:
--lang flag > annotation_lang config
- Generate full dual-column HTML annotation (see HTML Template section)
- Paper Quality Bar: omit (no citation data from local PDF unless found in text)
- Save to
{output_dir}/[FirstAuthorLastName-YYYY-keyword].html
- Write directly to path; do not ls the directory beforehand
- Output: file path + brief summary of key arguments found
Subcommand: digest
- Check cache: if
{output_dir}/PaperDigests/YYYY-MM-DD-digest.html exists today → skip fetch, output cached path
- Fetch arxiv: same URL as Data Sources section above
- Filter: keep top
daily_max most relevant to config keywords (semantic match on title+abstract)
- Deduplicate: skip arxiv IDs seen in previous 7 days' digests
- Annotate: for each paper, run Mode B annotation (brief version); annotation language follows config
- Combine: all annotations → single HTML digest file; each paper has a compact Paper Quality Bar
- Save:
{output_dir}/PaperDigests/YYYY-MM-DD-digest.html
- Update daily note: append to
10_Daily/YYYY-MM-DD.md:## Paper Digest
→ [[30_Research/PaperDigests/YYYY-MM-DD-digest|Today's Paper Digest]] (N papers)
Subcommand: cite
- Parse note name from user input (e.g.,
[[Klepsch-2017-annotation]] or file path)
- Find HTML or MD file in
{output_dir}/ or vault root
- Extract metadata: title, authors, year, venue, DOI/URL
- Output directly (no file saved):
- APA 7th:
Author, A., & Author, B. (Year). Title. *Venue*, *vol*(issue), pages. https://doi.org/...
- BibTeX:
@article{key,
author = {...}, title = {...}, journal = {...}, year = {...}, doi = {...}
}
HTML Annotation Template
Paper Quality Bar (find/digest only — between navbar and section-nav)
Shows: {source_icon} {source} | {venue} | {year} | {citation_badge} | {venue_type_tag}
Citation tiers:
| Condition |
Badge |
CSS class |
| cited_by_count ≥ 100 |
🔥 高引 N citations |
badge-high |
| 20–99 |
⭐ N citations |
badge-important |
| 5–19 |
✓ N citations |
badge-valid |
| < 5 or no data |
📄 Preprint |
badge-preprint |
Venue type tag: A* 会议 (top venues: CHI/NeurIPS/ACL/EMNLP/ICML/ICLR/SIGIR/CSCW) | 会议/期刊 (other config venues) | Workshop | Preprint
Source icon: 🔍 OpenAlex | 📚 Semantic Scholar | 📄 arXiv
CSS: see references/template.css (.quality-bar, .badge-*, .qb-* classes).
Mode B: Logic Analysis (Default)
Generate a complete, self-contained HTML file. CSS: embed references/template.css as <style> in <head>. Google Fonts: import Lora + IBM Plex Sans.
5-Color Highlight System:
| Color |
Class |
Represents |
🟡 Yellow #fef08a |
thesis |
Core thesis / main claim |
🔴 Red #fecaca |
concept |
Key concepts / terminology |
🔵 Blue #bfdbfe |
evidence |
Empirical evidence / data |
🟢 Green #bbf7d0 |
concession |
Concessions / counterargument handling |
🟣 Purple #e9d5ff |
methodology |
Methodology description |
Document structure:
1. TOP NAVBAR
- Paper title
- Context label (or "General Reading" if none)
- Color legend: 5 colored chips with dimension labels
2. PAPER QUALITY BAR (find/digest only — omit for /paper read)
3. STICKY SECTION NAV
- Links: Abstract | Introduction | Related Work | Methods | Results | Discussion | Conclusion
- Highlight active section on scroll
4. DUAL-COLUMN BODY — one <div class="paragraph-group"> per paragraph
Left column — original text (ALWAYS IN ORIGINAL LANGUAGE — never translate):
- Copy verbatim from PDF; annotation_lang ONLY controls the right column
- Highlight key phrases: <mark class="thesis">...</mark> etc.
Right column — annotation cards (language follows annotation_lang):
[Colored left border matching paragraph's dominant highlight]
① 段落功能 / Paragraph Function:...
② 逻辑角色 / Logical Role:...
③ 论证技巧或潜在漏洞 / Rhetorical Technique or Logical Gap:...
5. BACK-TO-TOP BUTTON
<button id="back-to-top" title="返回顶部">↑</button>
<script>
const btn = document.getElementById('back-to-top');
window.addEventListener('scroll', () => { btn.style.display = window.scrollY > 300 ? 'flex' : 'none'; });
btn.addEventListener('click', () => window.scrollTo({ top: 0, behavior: 'smooth' }));
</script>
6. BOTTOM — Argument Structure Overview (language follows annotation_lang)
zh labels: 问题 / 论点 / 证据 / 反驳处理 / 结论
en labels: Problem / Argument / Evidence / Concession / Conclusion
- Author's core claim (1 sentence)
- 最强论证 / Strongest argument
- 最弱论证 / Weakest argument
- APA Citation (auto-formatted) + copy button:
<button class="copy-btn" data-label="复制 APA" '{apa_string}')">复制 APA</button>
- BibTeX block + copy button:
<button class="copy-btn" data-label="复制 BibTeX" '{bibtex_string}')">复制 BibTeX</button>
Add this script alongside the back-to-top script:
<script>
function copyText(btn, text) {
navigator.clipboard.writeText(text);
btn.textContent = '✓ 已复制'; btn.classList.add('copied');
setTimeout(() => { btn.textContent = btn.dataset.label; btn.classList.remove('copied'); }, 1500);
}
</script>
Mode A: Question-Driven (triggered by --questions)
Same structure as Mode B, with these differences:
- Color legend: per-question colors Q1–Q6 (cycling through a distinct palette)
- Left highlights:
<mark class="q1">, <mark class="q2">, etc.
- Right annotation cards: labeled
【Q2 核心论点】 / [Q2 Core Argument]:
① Paragraph Function ② Argument Logic ③ Which question/layer this paragraph answers
- Bottom: Q&A Worksheet (replaces Argument Structure Overview):
One card per question — Core argument + Key evidence + Potential counter/limitation
CSS
All CSS is in references/template.css (adjacent to this SKILL.md). When generating any HTML output, embed the file contents as a <style> block in <head>. Only load when generating HTML — /paper cite does not need it.
Error Handling
- PDF unreadable: output error with path, suggest checking permissions
- No results from any source: output "No papers found — try broader keywords"
- OpenAlex 429: retry with backoff (2s→5s→10s); after 3 failures fall back to arxiv
- Semantic Scholar 429: retry with backoff; fall back to OpenAlex/arxiv
- Missing output_dir: create directory automatically before saving
- Malformed --questions: re-prompt user for correct format
- Source fallback notice: always state which source(s) were used, e.g. "⚠️ OpenAlex unavailable — results from arXiv only (no citation counts)"
Notes for Open-Source Use
Set output_dir in your project's CLAUDE.md:
paper_output_dir: 30_Research
Override keywords/venues/language:
paper_venues: [CHI, AIED, EDM, LAK]
paper_keywords: [your, topic, keywords]
paper_annotation_lang: en
Optional — OpenAlex Polite Pool (higher rate limits, no account needed):
openalex_email: yourname@example.com
Optional — Semantic Scholar secondary source (free key):
semantic_scholar_api_key: your_key_here
Source: sjqsgg/Paperwise — distributed by TomeVault.
1---2name: paper3description: Academic paper workflow — find, read/annotate (HTML), daily digest, cite. Use when user invokes /paper, needs paper annotation, literature search, citation generation, or daily paper discovery. Use when this capability is needed.4---5# /paper — Academic Paper Workflow67## Default Config8Edit this section to customize for your project.910```yaml11output_dir: "./papers"12# Obsidian vault users: set paper_output_dir in your project's CLAUDE.md13# Drive/OneDrive: use the appropriate MCP, then set path (e.g. "gdrive://My Drive/Papers")1415venues: [CHI, ACL, EMNLP, NAACL, NeurIPS, ICML, ICLR, EDM, LAK, AIED, ITS, CSCW, SIGIR, CIKM]1617keywords:18 - cognitive load19 - adaptive learning20 - intelligent tutoring21 - conversational learning22 - LLM tutoring23 - learning analytics24 - behavioral signals25 - educational dialogue2627min_citations: 5 # /paper find: filter out papers with fewer citations28daily_max: 10 # /paper digest: max papers per run2930annotation_lang: zh # zh = Chinese annotations | en = English; override with --lang3132openalex_email: "" # Optional. Add email to join OpenAlex Polite Pool (higher rate limits).33semantic_scholar_api_key: "" # Optional. Free key: semanticscholar.org/product/api34```3536Override any config value in your project's `CLAUDE.md` using keys: `paper_output_dir`, `paper_venues`, `paper_keywords`, `paper_annotation_lang`.3738---3940## Subcommands4142| Command | Usage | Description |43|---------|-------|-------------|44| `find` | `/paper find "cognitive load LLM"` | Search papers → Digest HTML with top N cards |45| `read` | `/paper read /path/to/file.pdf` | Annotate a single PDF → full dual-column HTML |46| `digest` | `/paper digest` | Daily new papers from arxiv (used by cron) |47| `cite` | `/paper cite [[note-name]]` | Generate APA + BibTeX citation from existing annotation |4849**Flags:**50- `--context "ML课第3周"` — override project context51- `--questions "Q1:... Q2:..."` — switch to Question mode (Mode A)52- `--questions` — interactive question mode (Claude asks you)53- `--output /path/` — override output directory for this run54- `--top N` — return N results (default: 5 for find, daily_max for digest); also accepts bare number after query55- `--lang en` — override annotation language for this run56- `--source arxiv` — search only arxiv (latest preprints, no citation filter)57- `--source venues` — search only papers from config `venues` list (citation-weighted ranking)58- `--local /path/` — read local PDFs from folder (no API calls); or `--local a.pdf b.pdf` for specific files5960> *Flags can be written with or without `--`. Claude accepts natural language equivalents (e.g. `top 5`, `source venues`, `local /path/`, `questions "..."`).*6162---6364## Context Resolution (in priority order)65661. `--context` flag in command672. Current directory's `CLAUDE.md` (auto-loaded by Claude Code)683. No context → use Mode B directly (zero-config, logic analysis mode)6970---7172## Data Sources7374### Primary: OpenAlex75Free, no API key required, 10 req/s rate limit.7677```78https://api.openalex.org/works?search={query}79 &select=title,authorships,publication_year,cited_by_count,primary_location,doi80 &per-page=2081 [&mailto={openalex_email} ← add if configured]82```8384**After fetching:** immediately extract and keep only — title, first author, year, cited_by_count, venue name (`primary_location.source.display_name`), DOI. Discard all other fields from the response before further processing.8586### Secondary: Semantic Scholar (only if `semantic_scholar_api_key` is set)87```88https://api.semanticscholar.org/graph/v1/paper/search?query={topic}89 &fields=title,authors,year,citationCount,venue,externalIds&limit=2090```91Header: `x-api-key: {semantic_scholar_api_key}`9293### Tertiary: arxiv (fallback + digest source)94```95https://export.arxiv.org/api/query?search_query=(cat:cs.CL+OR+cat:cs.HC+OR+cat:cs.AI+OR+cat:cs.LG)96 +AND+({keywords})&sortBy=submittedDate&sortOrder=descending&max_results=3097```98Note: arxiv papers have no citation count. Label as `preprint`.99100### Rate Limit Handling101If a source returns 429: check `Retry-After` header → wait that many seconds. If no header: wait 2s → 5s → 10s (3 retries). After 3 failures → skip source, move to next in priority. Note which source was skipped in output.102103---104105## Subcommand: find1061071. **Parse flags:** topic query, `--top N` (default: 5), `--lang`, `--source` (default: mixed), `--local` (path or file list)108 - `--top N` also accepts a bare number immediately after the query string (e.g. `/paper find "query" 10` → top 10)1091102. **Resolve source strategy:**111112 | `--source` / flag | API calls | Ranking formula |113 |-------------------|-----------|----------------|114 | *(default, mixed)* | Single OpenAlex call `sort=cited_by_count:desc`; arxiv fallback if <3 results | `0.5 × relevance_rank + 0.3 × log(cited_by_count+1) + 0.2 × recency_score` |115 | `arxiv` | arxiv API only (`sortBy=submittedDate`); no `min_citations` filter | `0.5 × relevance_rank + 0.5 × recency_score` |116 | `venues` | Single OpenAlex call; keep only papers where venue name matches any entry in config `venues` list (case-insensitive partial match on `primary_location.source.display_name`) | `0.5 × relevance_rank + 0.5 × log(cited_by_count+1)` |117 | `--local /path/` or `--local a.pdf b.pdf` | No API calls — read local PDFs only | Take first `--top N` files (alphabetical order) |118119 **`--local` and `--source` are mutually exclusive.** If both are given, return an error.1201213. **If `--local` flag present — execute local PDF steps instead of steps 3–6:**122 1. Scan the given folder for all `.pdf` files, or use the explicitly listed files directly123 2. If file count > `--top N`, take first N (alphabetical order)124 3. For each PDF, extract: title, authors, year, abstract (first 300 words), conclusion paragraph (last 300 words)125 4. Generate a Digest Card per PDF (same 4-sentence format: 研究问题 / 核心方法 / 关键发现 / 相关性)126 5. Citation badge: fixed as `📄 Local PDF` (no OpenAlex lookup)127 6. Card bottom link: `/paper read /absolute/path/to/file.pdf 精读` (use absolute path)128 7. Save to: `{output_dir}/FindResults/find-local-YYYY-MM-DD-HHmm-{folder-slug}.html`129 8. Print summary and exit — skip steps 4–8 below1301313b. **Fetch papers (online mode):**132 - Add `&filter=cited_by_count:>{min_citations}` for default/venues mode (skip for arxiv)133 - After fetch: immediately discard all fields except title, first author, year, cited_by_count, venue name, DOI134 - On any source failure → follow Rate Limit Handling1351364. **Deduplicate against existing files:**137 - Check `{output_dir}/FindResults/` and `{output_dir}/` root for `[FirstAuthor-YYYY-slug].html`138 - Mark existing papers as `[已有]`, include in summary with their path, skip card generation1391405. **Rank top N** using the formula for the active source strategy1411426. **Generate Digest HTML** — a single self-contained HTML file containing N paper cards.143144 **Digest Card format** (one card per paper):145 ```146 [Title] — [First Author] et al., [Year] — [Venue or arXiv]147 [Citation badge] [Source tag]148 研究问题: [1 sentence — what problem does this paper solve?]149 核心方法: [1 sentence — what approach do they use?]150 关键发现: [1 sentence — what is the main result?]151 相关性: [1 sentence — why this matters for your research, based on CLAUDE.md context]152 [DOI link if available] · → /paper read <doi_or_path> 精读153 ```154 - Citation badge uses tier logic from Paper Quality Bar section155 - Annotation language for cards follows `annotation_lang` config (or `--lang` flag)156 - HTML structure: simple cards layout, embed `references/template.css` in `<style>`1571587. **Save** Digest HTML to: `{output_dir}/FindResults/find-YYYY-MM-DD-HHmm-{query-slug}.html`159 - Create subdirectory automatically if it doesn't exist1601618. **Print summary:**162 ```163 Found N papers via {source}. Digest saved:164 → 30_Research/FindResults/find-2026-03-14-1430-cognitive-load-llm.html165166 Papers included:167 - Jin-2025-llm-teachable-agent [⭐ 47 citations · CHI]168 - Cai-2025-intrinsic-load [📄 preprint · arXiv]169 - Klepsch-2017-two-types-icl [已有 → 30_Research/FindResults/...]170 ```171172---173174## Subcommand: read1751761. Read the PDF at provided path1772. Extract: title, authors, year, venue/journal, abstract, full text1783. Resolve mode:179 - No `--questions` → **Mode B** (logic analysis)180 - `--questions "..."` → **Mode A (inline)**. Parse questions using these rules:181 - Strip optional `Q1:` / `Q2:` etc. prefixes (they are decorative, not required)182 - Split on: comma `,` / semicolon `;` / newline / `Q\d+` pattern boundaries183 - Extract up to 6 questions; if more are given, take first 6 and warn the user184 - Accept any of these formats:185 ```186 "Q1: 方法? Q2: 与 baseline 比较?" ← Q-label + colon187 "方法?, 与 baseline 比较?" ← comma-separated188 "方法?; 与 baseline 比较?" ← semicolon-separated189 ```190 - `--questions` (no argument) → **Mode A (interactive)**:191 Output exactly: `请输入你的阅读问题(每行一个,或逗号分隔,最多6个):`192 Wait for user input, then parse using the same rules above, then proceed with Mode A1934. Resolve annotation language: `--lang` flag > `annotation_lang` config1945. Generate full dual-column HTML annotation (see HTML Template section)195 - Paper Quality Bar: omit (no citation data from local PDF unless found in text)1966. Save to `{output_dir}/[FirstAuthorLastName-YYYY-keyword].html`197 - Write directly to path; do not ls the directory beforehand1987. Output: file path + brief summary of key arguments found199200---201202## Subcommand: digest2032041. **Check cache:** if `{output_dir}/PaperDigests/YYYY-MM-DD-digest.html` exists today → skip fetch, output cached path2052. **Fetch arxiv:** same URL as Data Sources section above2063. **Filter:** keep top `daily_max` most relevant to config keywords (semantic match on title+abstract)2074. **Deduplicate:** skip arxiv IDs seen in previous 7 days' digests2085. **Annotate:** for each paper, run Mode B annotation (brief version); annotation language follows config2096. **Combine:** all annotations → single HTML digest file; each paper has a compact Paper Quality Bar2107. **Save:** `{output_dir}/PaperDigests/YYYY-MM-DD-digest.html`2118. **Update daily note:** append to `10_Daily/YYYY-MM-DD.md`:212 ```213 ## Paper Digest214 → [[30_Research/PaperDigests/YYYY-MM-DD-digest|Today's Paper Digest]] (N papers)215 ```216217---218219## Subcommand: cite2202211. Parse note name from user input (e.g., `[[Klepsch-2017-annotation]]` or file path)2222. Find HTML or MD file in `{output_dir}/` or vault root2233. Extract metadata: title, authors, year, venue, DOI/URL2244. Output directly (no file saved):225 - **APA 7th:** `Author, A., & Author, B. (Year). Title. *Venue*, *vol*(issue), pages. https://doi.org/...`226 - **BibTeX:**227 ```bibtex228 @article{key,229 author = {...}, title = {...}, journal = {...}, year = {...}, doi = {...}230 }231 ```232233---234235## HTML Annotation Template236237### Paper Quality Bar (find/digest only — between navbar and section-nav)238239Shows: `{source_icon} {source}` | `{venue}` | `{year}` | `{citation_badge}` | `{venue_type_tag}`240241**Citation tiers:**242| Condition | Badge | CSS class |243|-----------|-------|-----------|244| cited_by_count ≥ 100 | 🔥 高引 N citations | `badge-high` |245| 20–99 | ⭐ N citations | `badge-important` |246| 5–19 | ✓ N citations | `badge-valid` |247| < 5 or no data | 📄 Preprint | `badge-preprint` |248249**Venue type tag:** `A* 会议` (top venues: CHI/NeurIPS/ACL/EMNLP/ICML/ICLR/SIGIR/CSCW) | `会议/期刊` (other config venues) | `Workshop` | `Preprint`250251**Source icon:** 🔍 OpenAlex | 📚 Semantic Scholar | 📄 arXiv252253CSS: see `references/template.css` (`.quality-bar`, `.badge-*`, `.qb-*` classes).254255---256257### Mode B: Logic Analysis (Default)258259Generate a complete, self-contained HTML file. CSS: embed `references/template.css` as `<style>` in `<head>`. Google Fonts: import Lora + IBM Plex Sans.260261**5-Color Highlight System:**262| Color | Class | Represents |263|-------|-------|-----------|264| 🟡 Yellow `#fef08a` | `thesis` | Core thesis / main claim |265| 🔴 Red `#fecaca` | `concept` | Key concepts / terminology |266| 🔵 Blue `#bfdbfe` | `evidence` | Empirical evidence / data |267| 🟢 Green `#bbf7d0` | `concession` | Concessions / counterargument handling |268| 🟣 Purple `#e9d5ff` | `methodology` | Methodology description |269270**Document structure:**271272```2731. TOP NAVBAR274 - Paper title275 - Context label (or "General Reading" if none)276 - Color legend: 5 colored chips with dimension labels2772782. PAPER QUALITY BAR (find/digest only — omit for /paper read)2792803. STICKY SECTION NAV281 - Links: Abstract | Introduction | Related Work | Methods | Results | Discussion | Conclusion282 - Highlight active section on scroll2832844. DUAL-COLUMN BODY — one <div class="paragraph-group"> per paragraph285 Left column — original text (ALWAYS IN ORIGINAL LANGUAGE — never translate):286 - Copy verbatim from PDF; annotation_lang ONLY controls the right column287 - Highlight key phrases: <mark class="thesis">...</mark> etc.288 Right column — annotation cards (language follows annotation_lang):289 [Colored left border matching paragraph's dominant highlight]290 ① 段落功能 / Paragraph Function:...291 ② 逻辑角色 / Logical Role:...292 ③ 论证技巧或潜在漏洞 / Rhetorical Technique or Logical Gap:...2932945. BACK-TO-TOP BUTTON295 <button id="back-to-top" title="返回顶部">↑</button>296 <script>297 const btn = document.getElementById('back-to-top');298 window.addEventListener('scroll', () => { btn.style.display = window.scrollY > 300 ? 'flex' : 'none'; });299 btn.addEventListener('click', () => window.scrollTo({ top: 0, behavior: 'smooth' }));300 </script>3013026. BOTTOM — Argument Structure Overview (language follows annotation_lang)303 zh labels: 问题 / 论点 / 证据 / 反驳处理 / 结论304 en labels: Problem / Argument / Evidence / Concession / Conclusion305 - Author's core claim (1 sentence)306 - 最强论证 / Strongest argument307 - 最弱论证 / Weakest argument308 - APA Citation (auto-formatted) + copy button:309 <button class="copy-btn" data-label="复制 APA" onclick="copyText(this, '{apa_string}')">复制 APA</button>310 - BibTeX block + copy button:311 <button class="copy-btn" data-label="复制 BibTeX" onclick="copyText(this, '{bibtex_string}')">复制 BibTeX</button>312313 Add this script alongside the back-to-top script:314 <script>315 function copyText(btn, text) {316 navigator.clipboard.writeText(text);317 btn.textContent = '✓ 已复制'; btn.classList.add('copied');318 setTimeout(() => { btn.textContent = btn.dataset.label; btn.classList.remove('copied'); }, 1500);319 }320 </script>321```322323---324325### Mode A: Question-Driven (triggered by --questions)326327Same structure as Mode B, with these differences:328- Color legend: per-question colors Q1–Q6 (cycling through a distinct palette)329- Left highlights: `<mark class="q1">`, `<mark class="q2">`, etc.330- Right annotation cards: labeled `【Q2 核心论点】` / `[Q2 Core Argument]`:331 ① Paragraph Function ② Argument Logic ③ Which question/layer this paragraph answers332- Bottom: **Q&A Worksheet** (replaces Argument Structure Overview):333 One card per question — Core argument + Key evidence + Potential counter/limitation334335---336337### CSS338339All CSS is in `references/template.css` (adjacent to this SKILL.md). When generating any HTML output, embed the file contents as a `<style>` block in `<head>`. Only load when generating HTML — `/paper cite` does not need it.340341---342343## Error Handling344345- **PDF unreadable:** output error with path, suggest checking permissions346- **No results from any source:** output "No papers found — try broader keywords"347- **OpenAlex 429:** retry with backoff (2s→5s→10s); after 3 failures fall back to arxiv348- **Semantic Scholar 429:** retry with backoff; fall back to OpenAlex/arxiv349- **Missing output_dir:** create directory automatically before saving350- **Malformed --questions:** re-prompt user for correct format351- **Source fallback notice:** always state which source(s) were used, e.g. "⚠️ OpenAlex unavailable — results from arXiv only (no citation counts)"352353---354355## Notes for Open-Source Use3563571. Set `output_dir` in your project's `CLAUDE.md`:358 ```359 paper_output_dir: 30_Research360 ```3613622. Override keywords/venues/language:363 ```364 paper_venues: [CHI, AIED, EDM, LAK]365 paper_keywords: [your, topic, keywords]366 paper_annotation_lang: en367 ```3683693. Optional — OpenAlex Polite Pool (higher rate limits, no account needed):370 ```371 openalex_email: yourname@example.com372 ```3733744. Optional — Semantic Scholar secondary source (free key):375 ```376 semantic_scholar_api_key: your_key_here377 ```378379---380> Source: [sjqsgg/Paperwise](https://github.com/sjqsgg/Paperwise) — distributed by [TomeVault](https://tomevault.io).381<!-- tomevault:4.0:skill_md:2026-06-17 -->