read-line-messages
Two-phase reader that gets accurate LINE message text. Plain "read the screen" OCR garbles Thai (wrong tone marks, swapped บ/น/ช/จ, hallucinated words) and LINE — a Qt app — exposes no accessibility text, no clipboard copy, and an encrypted local store, so AX/clipboard extraction is a dead end. This skill instead captures clean per-window screenshots and transcribes them with a dedicated, verbatim-constrained vision pass.
How it works
- Capture. The
codex-computer-useskill is used only to drive the GUI — focus LINE, open the conversation, and scroll up between frames. The actual screenshots are taken by this skill's own process withscreencapture -x -o -l<windowid>, saved toscreenshots/line-01.png,line-02.png, … (line-01= newest view; higher = older). The split is necessary because thecodex execseatbelt sandbox strips macOS Screen Recording, soscreencapturefails inside it — but it works from this skill's shell. Per-window capture (-l<id>) works even though full-display capture is TCC-blocked for the terminal. Scrolling stops early (dedup by image bytes /AT_TOP) once the conversation top is reached. - Transcribe (a fresh
codex exec -i …). The PNGs are attached to a second, non-interactive codex that transcribes every message verbatim and cites each message back to its source screenshot filename. It is told never to "correct"/normalize Thai and to mark ambiguous glyphs/URL characters as 〔?〕.
Usage
# Default: 3 screenshots (current view + 2 scrolls up), transcript to screenshots/transcript.md
bun .agents/skills/read-line-messages/scripts/run.ts
# More history, open a specific chat first
bun .agents/skills/read-line-messages/scripts/run.ts --shots 5 --conversation "Small Sam"
# See the planned commands/prompts without running anything
bun .agents/skills/read-line-messages/scripts/run.ts --dry-run
Options: -n/--shots N, --scroll-pages P, -c/--conversation <name>,
-o/--out <file>, -m/--model <model>, --keep (don't wipe old shots),
--dry-run, -h/--help.
Output
screenshots/line-NN.png— the captured frames (newest =line-01).screenshots/transcript.md— verbatim transcript, one section per screenshot, plus a "Low-confidence" section for any 〔?〕 spots.
Both stay under this skill folder and are gitignored (screenshots/); they are
machine-local artifacts, not part of the system definition.
Requirements
- LINE desktop app running and logged in (the script aborts if no on-screen LINE window is found).
codexCLI on PATH (orCODEX_BIN),bun, andpython3(used via Quartz to locate the LINE window id).- The Computer Use phase brings LINE to the foreground and scrolls it; expect visible focus changes. It is read-only — it never sends or modifies anything.
Safety
Read-only by design. The capture sub-agent is instructed not to send, reply, react, delete, or change settings; the transcribe pass only reads local PNGs. Treat the transcript as OCR output — exact where legible, with 〔?〕 marking genuine ambiguity.