mobile-reading-export
БесплатноЗапускает вложенные скриптыНе проверенTurn a Markdown or structured document into formats that actually read well on a phone — a narrow-screen-first responsive HTML, a phone-ratio PDF for…
от haiyangchenbj313 установок в других каталогахОб этом скилле
mobile-reading-export
Convert documents into mobile-first deliverables. Three outputs, each matched to a delivery channel:
| Output | Use for | Key property |
|---|---|---|
| Responsive HTML | reading it yourself | tables collapse to cards on narrow screens; warm editorial paper layout; dark-mode aware; single file, zero external deps |
| Phone-ratio PDF | sending to others (WeChat / iOS) | page = one phone screen, so "fit width" needs no pinch-zoom |
| Share card PNG | forwarding, group chats, elders | one screen, five key blocks, not the whole document |
When to use
- "有什么更适合在手机上看的格式" / "手机上怎么读" / "能不能弄成手机版"
- User wants to send a document to someone via WeChat
- A table or PDF is described as unreadable, tiny, or needing zoom on a phone
- Any long document destined for phone reading rather than desktop editing
Decide the format before building
Format choice follows the delivery channel, not personal taste:
| Format | Opens in WeChat? | Narrow-screen tables | Searchable | Fits iOS |
|---|---|---|---|---|
.md |
No — needs a reader app | overflows | yes | poor |
| Responsive HTML | save to Files → Safari (2 steps) | collapses to cards | yes | ok |
| Phone-ratio PDF | yes, built-in preview, saves to Books | needs zoom | yes | best |
| A4 PDF | yes | needs pinch-zoom (body text drops to ~8–9px) | yes | poor |
| Long image | yes | no overflow | no | best to forward |
| Cloud doc | yes, native | native | yes | but uploads private content |
Rules of thumb:
- iOS + sharing → phone-ratio PDF is the primary; HTML is the self-read version.
- Android → HTML opens in one step from WeChat, so HTML is fine as primary.
- Do not build a full-document long image. A 200-line document renders 20000px+ tall, gets recompressed by WeChat, and becomes unreadable. A one-screen share card is the correct use of images.
- Never publish private documents to a public URL (GitHub Pages, public site hosting) just to read them on a phone.
Steps
1. Measure the source before designing
Count table rows and their display width (CJK = 2 half-widths). If more than about half the table rows exceed ~40 half-widths, tables will overflow on a phone and must become cards.
2. Generate mobile-first HTML
python scripts/md2mobile.py <in.md> <out.html> ["optional notice line"]
Conversion rules already implemented:
- 4-column pillar-style tables → four vertical cards (hero value in accent colour)
- 2-column tables → label above value
- 3+ column tables → one row-led block: col1 = title, col2 = subtitle, rest = fields; ordinary rows use dividers rather than a stack of identical cards
- Verdict columns (
吉平慎/标注/评级/可用性) → coloured chips - Rows containing
现行/现年→ highlighted with the accent tint - First H1 → a restrained document masthead with a small eyebrow and short accent rule
- H2/H3 → warm brown editorial headings with a quiet highlight underline, not heavy boxed section headers
- Screen body → pale lavender-grey editorial surface + deep indigo serif headings + muted gold micro-labels + fine rules; print reverts to a clean white paper surface
---immediately before a heading is dropped (otherwise the rule and the heading's top border stack into a double line)
The visual reference for the current style is a warm, mobile-first information sheet: rounded paper container, clear section rhythm, a few pale status chips, and selective emphasis. Do not reproduce app marketing copy such as "top decision maker" or treat decorative scores as objective psychological measurements.
Page geometry lives at the top of the script: PAGE_W_MM = 104, PAGE_H_MM = 225, PAGE_PAD_MM = 5. 104mm ≈ 393 CSS px = iPhone viewport width; ratio 1:2.16 matches modern phones. Content width works out to ~355px, matching a phone's ~357px text column.
3. Verify there is no horizontal overflow
python scripts/cap.py <out.html> <out_prefix> [scale]
Prints CW (viewport), SW (scroll width), BW (body width), BAD (count of overflowing elements) and a section position map. BAD=0 is the pass condition. Also writes <prefix>.png (first screen) and <prefix>_full.png (whole page).
4. Build the phone-ratio PDF
python scripts/topdf.py <out.html> <out.pdf>
Confirms the MediaBox in mm. Expected: 104.1 x 225.0 mm.
5. Check pagination
python scripts/pdfinfo.py <out.pdf> [...]
Reports characters per page plus the first/last fragment of each page. Look for pages far below average — those mean something was pushed wholesale to the next page. Note that card-heavy pages hold fewer characters than prose pages at the same visual fullness, so only treat a page as broken when it also looks empty in a rendered crop.
6. Optional share card
python scripts/card.py <templates/share-card.json> "<out_dir>/card_*.html"
python scripts/cap.py "<out_dir>/card_F.html" "<out_dir>/card_F" 2
The bundled card template is tuned for a 命理档案-style structured i
Установить mobile-reading-export в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
WriteBashFAQ
Что делает скилл mobile-reading-export?
Turn a Markdown or structured document into formats that actually read well on a phone — a narrow-screen-first responsive HTML, a phone-ratio PDF for WeChat/iOS sharing, and a one-page share card PNG. Use this whenever the user asks how to read a document on their phone, wants a "手机版 / 手机上看 / 发微信 / 发给别人看" version of a long document, complains that a table or PDF is unreadable on a phone, or asks which format to use for mobile reading. Also covers diagnosing and fixing horizontal overflow on narrow viewports, and the Windows headless-Chrome pitfalls that break phone-viewport screenshots.
Как установить скилл mobile-reading-export?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mobile-reading-export запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic