Hermes
Add hierarchical bookmarks/outline (章->节->小节) to PDF files. Auto-detects text-based vs scanned PDFs, uses OCR for scanned ones. Supports both Chinese and English heading patterns. Use when user asks to add bookmarks, outline, table of contents, or navigation structure to a PDF. Triggers on "add bookmarks", "add outline", "为PDF添加书签", "PDF大纲", "PDF目录", "PDF navigation", or providing a PDF path and asking for bookmarks.From its SKILL.md
npx -y skills add StarryCode-Lang/pdf-add-bookmarks --skill hermesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.8 KB, 331 tokens by cl100k_base, as published. Nobody here has run it
PDF Add Bookmarks
Run the script on the user's PDF. It auto-detects everything and outputs a new file with bookmarks.
Quick Start
pip install pymupdf pytesseract pillow
python scripts/add_bookmarks.py "file.pdf"
Output: file_with_bookmarks.pdf
Modes
Auto-detect (default): Script detects if PDF is text-based or scanned. Supports heading patterns:
第X章/X 标题/X.X 标题/X.X.X 标题(Chinese)X. Title/Chapter X/Part X(English)A.1. Subsection(Appendix)
TOC file mode: Import bookmarks from a text table of contents:
python scripts/add_bookmarks.py "file.pdf" --toc toc.txt [--offset N]
TOC format — one entry per line, indentation for hierarchy:
第1章 概述 1
1.1 背景 2
1.1.1 研究现状 3
1.2 目标 10
Force OCR: --force-ocr flag for PDFs with watermarks confusing text detection.
Dependencies
See references/dependencies.md for cross-platform tesseract + Chinese language data setup.
Required: pymupdf pytesseract pillow + tesseract-ocr system tool.
What ships with it: 2 files
2.7 KB alongside SKILL.md
- config.yaml1.1 KB
- README.md1.5 KB
Gives 0 of the 12 instructions most pdf office docs skills give in 331 tokens
Counted across 636 of the 690 authors here whose files we hold, read 2026-08-07
- Extract text or tables using pdfplumber or pdftotextin 89 of 636, across 23 files
- Create new PDFs using reportlabin 83 of 636, across 16 files
- Read forms.md before filling out PDF formsin 80 of 636, across 13 files
- OCR scanned PDFs using pytesseract and pdf2imagein 77 of 636, across 10 files
- Use qpdf to merge or split PDFs or large filesin 70 of 636, across 3 files
- Use Excel formulas instead of hardcoded calculated values or Python calculationsin 68 of 636, across 13 files
- Unpack, edit, and repack XML for existing documents or presentationsin 63 of 636, across 8 files
- Document sources for all hardcoded valuesin 61 of 636, across 9 files
- Write minimal, concise Python code without unnecessary commentsin 59 of 636, across 7 files
- Run the recalculation script (recalc.py) after adding or modifying formulasin 59 of 636, across 7 files
- Fix all identified formula errors and recalculate before finishingin 58 of 636, across 6 files
- Format years as text stringsin 57 of 636, across 5 files
Said here and by no other author read
- run the script on the user's PDF
- import bookmarks from a text file if provided
- apply a page offset if provided
- force OCR if watermarks confuse detection
- output a new bookmarked PDF file
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.