Paper Highlight
Use this skill as a paper-reading workflow: understand first, then mark reusable information with stable semantics. Tune density with the highlight level, but keep each color meaning consistent.
Setup
This skill needs a one-time setup after installation. Prefer uv so the dependency stays isolated and reproducible:
CODEBLOCK0
If the environment already exists, refresh it with:
CODEBLOCK1
Workflow
- 1. Read
references/highlight-rules.md before annotating. - Do a preflight inspection before any model-heavy reading. Surface the PDF page count, extracted text volume, rough word count, and a rough token estimate to the user.
- Explicitly warn that full-paper pre-reading can consume a large number of tokens, especially on long PDFs or dense two-column papers. Do not continue until the user clearly agrees.
- Inspect the PDF structure once the user agrees. Prefer abstract, introduction, method overview, main results, and conclusion before touching fine details.
- Build a mental highlight plan across the core reading chain: goal -> motivation -> method -> results. Add contribution, setup, or limitation colors only when they are independently reusable.
- Run the bundled PyMuPDF script to annotate the PDF with semantic colors. Use
light opacity by default; it now uses soft pastel colors at 0.5 opacity so the marks stay visible without fully covering the text. Switch to dark only when the source PDF is faint or image-heavy. - Add the optional explanation layer when needed: a paper-level
TLDR paragraph and concise section flow summaries. Do not quote the original paper text inside notes; rewrite it as clear, compact summaries. - Review the output and remove noisy marks if the page looks busy. Prefer under-highlighting over over-highlighting.
Preflight Gate
Before executing the full highlighting workflow, report at least:
- - page count
- extracted character count
- extracted word count
- rough token estimate
Use those numbers to tell the user that the paper may be expensive to process. If the user does not explicitly confirm, stop after the inspection step.
Selection Rules
- - Highlight only sentences that remain useful when revisiting the paper later for writing, reviewing, rebuttal, or method comparison.
- Favor self-contained sentences that summarize a paragraph, state a claim, define a setup, or express a takeaway.
- Skip transitions, generic field background, implementation trivia, decorative prose, and sentences that only feel important in the moment.
- Keep one semantic meaning per color. Do not reuse a color for a neighboring but different category.
- Stay useful even at higher density. Use the level presets to control how aggressive the pass should be, then trim obvious noise if a page becomes crowded.
Highlight Levels
Use --highlight-level to control annotation density:
- -
low: fixed baseline - INLINECODE9 : target about
1.25x the low count - INLINECODE12 : target about
1.5x the low count - INLINECODE15 : target up to
2x the low count
Manual flags such as --max-per-page, --max-total, and --min-score still override the level preset when needed.
Note Modes
Use --note-mode to control the explanation layer:
- -
default: add a title TLDR paragraph and concise section flow summaries - INLINECODE25 : disable all note annotations
Color Policy
Use the required 5-color core by default:
- - Yellow: research goal or problem definition
- Orange: motivation, gap, challenge, or prior limitation
- Blue: main method or core mechanism
- Pink: contributions or novelty claims
- Green: main results or conclusions
Enable optional colors only when they clearly add value:
- - Purple: definitions, assumptions, notation, or evaluation setup
- Gray: limitations, caveats, failure cases, or future work
Commands
Set up the local environment:
CODEBLOCK2
Run the highlighter:
CODEBLOCK3
Ask the script for its exact CLI when needed:
CODEBLOCK4
Resources
- -
references/highlight-rules.md: color legend, density targets, and sentence-level filters - INLINECODE27 : bundled PyMuPDF annotator for the final PDF pass
论文高亮
使用此技能作为论文阅读工作流:先理解,再用稳定语义标记可复用的信息。通过高亮级别调节密度,但保持每种颜色含义一致。
设置
此技能在安装后需要一次性设置。推荐使用 uv 以保持依赖隔离且可复现:
bash
cd /Users/yo/.codex/skills/paper-highlight
uv venv .venv
source .venv/bin/activate
uv pip install pymupdf
如果环境已存在,通过以下命令刷新:
bash
cd /Users/yo/.codex/skills/paper-highlight
source .venv/bin/activate
uv pip install --upgrade pymupdf
工作流
- 1. 在标注前阅读 references/highlight-rules.md。
- 在进行任何模型密集型阅读前进行预检。向用户展示PDF页数、提取文本量、粗略词数和粗略token估算。
- 明确警告全文预读可能消耗大量token,尤其是在长PDF或密集双栏论文上。在用户明确同意前不要继续。
- 用户同意后检查PDF结构。在接触细节前优先阅读摘要、引言、方法概述、主要结果和结论。
- 在核心阅读链上构建心理高亮计划:目标 -> 动机 -> 方法 -> 结果。仅在贡献、设置或局限性颜色可独立复用时添加。
- 运行捆绑的PyMuPDF脚本,用语义颜色标注PDF。默认使用 light 透明度;现在使用 0.5 透明度的柔和粉彩颜色,使标记保持可见而不完全覆盖文本。仅在源PDF颜色浅淡或图像密集时切换到 dark。
- 在需要时添加可选的解释层:论文级别的 TLDR 段落和简洁的章节 flow 摘要。不要在笔记中引用原始论文文本;将其改写为清晰紧凑的摘要。
- 检查输出,如果页面显得拥挤则移除杂乱的标记。优先少高亮而非过度高亮。
预检关卡
在执行完整高亮工作流前,至少报告:
使用这些数字告知用户论文处理可能成本较高。如果用户未明确确认,在检查步骤后停止。
选择规则
- - 仅高亮那些在后续写作、审稿、反驳或方法比较中再次查阅论文时仍然有用的句子。
- 优先选择自包含的句子,这些句子总结段落、陈述主张、定义设置或表达要点。
- 跳过过渡句、通用领域背景、实现细节、装饰性文字以及那些仅在当下感觉重要的句子。
- 每种颜色保持一种语义含义。不要为相邻但不同的类别重复使用颜色。
- 即使在较高密度下也要保持有用。使用级别预设控制筛选的激进程度,然后如果页面变得拥挤则修剪明显的噪音。
高亮级别
使用 --highlight-level 控制标注密度:
- - low:固定基线
- medium:目标约为 low 数量的 1.25 倍
- high:目标约为 low 数量的 1.5 倍
- extreme:目标最高为 low 数量的 2 倍
在需要时,手动标志如 --max-per-page、--max-total 和 --min-score 仍可覆盖级别预设。
笔记模式
使用 --note-mode 控制解释层:
- - default:添加标题 TLDR 段落和简洁的章节 flow 摘要
- none:禁用所有笔记标注
颜色策略
默认使用必需的5种核心颜色:
- - 黄色:研究目标或问题定义
- 橙色:动机、差距、挑战或先前局限性
- 蓝色:主要方法或核心机制
- 粉色:贡献或新颖性声明
- 绿色:主要结果或结论
仅在明确增加价值时启用可选颜色:
- - 紫色:定义、假设、符号或评估设置
- 灰色:局限性、注意事项、失败案例或未来工作
命令
设置本地环境:
bash
cd /Users/yo/.codex/skills/paper-highlight
uv venv .venv
source .venv/bin/activate
uv pip install pymupdf
运行高亮器:
bash
cd /Users/yo/.codex/skills/paper-highlight
source .venv/bin/activate
python3 scripts/highlight_paper.py input.pdf
python3 scripts/highlight_paper.py input.pdf --highlight-level medium
python3 scripts/highlight_paper.py input.pdf --highlight-level high --include-optional
python3 scripts/highlight_paper.py input.pdf --note-mode flow
python3 scripts/highlight_paper.py input.pdf --note-mode hightlight
python3 scripts/highlight_paper.py input.pdf --note-mode full
python3 scripts/highlight_paper.py input.pdf --highlight-level exteme --opacity dark
python3 scripts/highlight_paper.py input.pdf --disable-optional definitions
在需要时查询脚本的确切CLI:
bash
cd /Users/yo/.codex/skills/paper-highlight
source .venv/bin/activate
python3 scripts/highlight_paper.py --help
资源