--- name: ghost-decode description: Decode videos that hide text in moving dots or noise using dense optical flow and optional OCR. Use for ghost-font clips, motion-defined text, random-dot kinematograms, TV-static videos with secret messages, text visible only during playback, or requests asking what a ghost-font video says. --- # Ghost-Font Video Decoder Ghost-font videos hide a message as a random-dot field: every frame is uniform noise, but the dots inside the letter shapes move against the background dots. This skill accumulates that motion into **two images** where the letters appear, then reads the message from them. ## Hard rules — ONE run producing TWO images The #1 failure of this skill is over-processing: an agent that doesn't trust the output spawns many diagnostic images, invents new algorithms, and hallucinates a message out of noise. Do not do that. - **Run the decoder exactly once.** The algorithm below is correct and complete. Do not write a second decoder, try another method (temporal variance, phase correlation, sub-pixel warping, weighted accumulation, per-line crops…), or "improve" the pipeline. - **Produce exactly two images: `revealed.png` and `revealed_heatmap.png`.** Create NO other images — no diagnostic maps, crops, or re-thresholded variants. - **Never OCR a raw frame.** Every frame is pure noise; the message exists only in accumulated motion. - **Read the two images, then stop.** Soft, rounded, blobby letters are the normal, correct output. If you can read the word, report it. ## Workflow 1. **Resolve the video** from the user's request, or the most recently modified `.mp4`/`.mov`/`.avi`/`.webm` in the working directory. Ask only if several candidates are plausible. 2. **Check the runtime:** `python -c "import cv2, numpy"`. If imports fail, install `opencv-python-headless` and `numpy` (from `/requirements.txt` when present), asking first only if the environment requires approval. 3. **Decode — run once.** Pick ONE: - If `/decode.py` exists: `python "/decode.py" "