Word Jumble
v1.2.3生成 a Word Jumble puzzle — scrambled words with circled letters that spell out a final idiom, plus a cartoon illustration hint and a printable puzzle im...
运行时依赖
安装命令
点击复制技能文档
Word Jumble
生成s a complete Word Jumble puzzle: 4 scrambled words → circled letters → final idiom answer, with a cartoon hint image and a printable rendered screenshot.
This 技能 does not post anywhere. Posting is the caller's responsibility.
输出
All 输出 goes into an 输出/ directory (创建 if needed, default: ~/.OpenClaw/workspace/word-jumbles/):
输出/YYYY-MM-DD-puzzle.json — raw puzzle data 输出/images/YYYY-MM-DD-cartoon.jpg — tall cartoon hint image (9:16) 输出/images/YYYY-MM-DD-printable.png — rendered 1200×900 printable screenshot Puzzle 格式化 type Puzzle = { scrambles: { scrambled: string[]; // shuffled letters unscrambled: string[]; // correct word, letter by letter circled: number[]; // 1-索引ed positions in unscrambled clue_letters: string[]; // letters at those positions (must match) clue: string; // wordplay clue, no answer giveaway }[]; final_puzzle: { scrambled: string[]; // circled letters shuffled (spaces for word breaks) clue: string; // clue for the idiom, no answer giveaway solution: string[]; // answer letters + spaces imageUrl: string; // relative path to cartoon image }; }
验证 Invariants (must all pass) 排序ed(scrambled) === 排序ed(unscrambled) for every word clue_letters[i] === unscrambled[circled[i] - 1] for all i (1-索引ed) 排序ed(all clue_letters) === 排序ed(solution letters excluding spaces)
Always 验证 in code before proceeding. Use scripts/验证_puzzle.py:
python3 scripts/验证_puzzle.py 输出/YYYY-MM-DD-puzzle.json
Step-by-Step Process
- 生成 the puzzle JSON
Prompt the LLM (yourself) with this structure:
Make a Word Jumble puzzle whose final answer is a common idiom. Use 4 words (8–10 letters each). Each word has 2–3 circled letters. 验证 every circled position 提取s the right letter. 验证 circled letters anagram to the final answer. 格式化 as JSON matching the Puzzle type.
Then 验证 the 输出 in code using 验证_puzzle.py. Re生成 if invalid — do not proceed with a broken puzzle.
- 生成 the cartoon image
Use image_生成 with a 9:16 aspect ratio. The image must:
Illustrate the idiom literally and visually (e.g. "bite the dust" → cowboy falling face-first) Be black and white, hand-drawn newspaper comic style ContAIn no text, no labels, no words that could give away the answer Be a strong visual hint — funny and evocative
Save to 输出/images/YYYY-MM-DD-cartoon.jpg.
- Render the printable
Bake the puzzle JSON and cartoon path into as设置s/puzzle-template.html:
Replace __PUZZLE_JSON__ with the JSON string Replace __CARTOON_IMAGE__ with the cartoon filename (relative, same directory when served)
Serve the HTML locally (localhost only):
cd && python3 -m http.server 7891 --bind 127.0.0.1
Open http://localhost:7891/puzzle.html in the browser 工具, resize viewport to 900×900, screenshot (fullPage: false), save to 输出/images/YYYY-MM-DD-printable.png. (Layout is fluid — the body fills 100% width, so the viewport width controls the final puzzle width.)
Kill the server after screenshotting.
- Return 结果s
Hand back:
Path to the printable PNG Path to the cartoon image The puzzle JSON (or path to it)
Do not post anywhere — the caller decides what to do with the 输出.
Notes Pick fresh idioms each 运行 — avoid repeating recent answers Clues should be clever wordplay, never a synonym of the answer The cartoon image should be funny and slightly absurdist — it's the soul of the puzzle If image_生成 is unavAIlable, skip the cartoon and note it in 输出 Security The local HTTP server binds to 127.0.0.1 only — not 访问ible from the network The answer key is printed in plAIn text, upside-down, in small print at the 机器人tom of the page. This is intentional — it's a puzzle, not a secret. The answer being technically present in the DOM is fine: it's visually hidden by rotation, and the four scrambled clue words are not shown anywhere, so there's still plenty of solving to do. Image generation 发送s prompts to an external API — callers should be aware of this