Ghost Font Decoder is an open-source Python tool and cross-agent plugin that reads text hidden inside random-dot videos. It measures the counter-motion that defines each letter, reconstructs a clean reveal, optionally runs OCR, and returns both the recovered text and visual evidence.
A paused ghost-font frame is designed to look like uniform noise. But the secret is not in any single frame — the message is the motion. Dense optical flow turns that motion into a measurable signal, so an agent can reveal, inspect, and state the hidden text with evidence.
The dots inside the glyphs move against the background. The decoder compares consecutive frames, removes the shared motion, aligns the drifting glyph region, and accumulates what remains until the phrase becomes visible.
The decoder treats the clip as a motion field, not a pile of images. Each stage isolates more of the coherent counter-motion that forms the hidden message.
Load consecutive grayscale frames from MP4, MOV, AVI, or WebM input. A stride and frame limit keep long or high-frame-rate clips practical.
Compute pixel-level optical flow using DIS or Farnebäck, capturing direction and magnitude across the entire random-dot field.
Subtract the median flow vector so shared camera or dot-field movement falls away and counter-moving glyph pixels become the useful signal.
Phase correlation aligns the drifting glyph region before opposition scores are accumulated across time, preventing the letters from smearing.
Otsu thresholding produces the strong mask; a conservative faint-glyph pass recovers lower-energy characters, followed by morphological cleanup.
Optional Tesseract OCR proposes text, while the agent visually checks revealed.png and the heatmap before stating the recovered message in chat.
The same motion-recovery engine works as a plain Python CLI, a Codex skill, and a Claude Code plugin.
Run python decode.py VIDEO and receive a cleaned reveal, a diagnostic heatmap, and OCR text when available.
Attach a clip and ask what it says. The skill runs the decoder, inspects both outputs, renders the reveal, and states the text.
Install from the bundled marketplace and call /ghost-decode, or simply ask Claude to decode the supplied video.
A build script packages the decoder workflow as an uploadable skill zip for use with attached videos in Claude.ai.
Every successful agent run must display the reconstructed image and name the recovered text — never return paths alone.
Switch flow methods, skip frames, cap long inputs, or continue with visual inspection when Tesseract is unavailable.
The plugin makes the technical pipeline disappear behind one natural-language request while keeping the evidence visible.

The interesting engineering is not only revealing pixels — it is making the result dependable enough for an agent to answer clearly.