menu-translate
Skill1 starsChanged 4 months agoMITView on GitHub
Use this skill whenever the user wants to read, translate, or decode a restaurant menu — from a photo/image/PDF, or by looking a restaurant up online by name or address. Produces a structured bilingual (English + 中文) menu with dish names, romanization/pinyin, descriptions, prices (original + optional converted), and dietary/spice/allergen tags. Photo-mode triggers — "translate this menu", "what does this menu say", "read this menu photo/PDF", "菜单翻译", "decode this menu", "what's on this menu", "prices on this menu", "is this dish vegetarian/spicy". Discovery-mode triggers — "find the menu for <restaurant>", "look up <restaurant>'s menu", "menu for the place at <address>", "what does <restaurant> serve", "translate <restaurant>'s menu near <place>". Handles source languages in any script (Chinese, Japanese, Korean, Thai, Vietnamese, French, Italian, Spanish, Arabic, etc.) and outputs English + 中文 by default.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Read/translate restaurant menus and emit a structured bilingual (English + 中文) table.
- Very specific: line 41
Read references/output-schema.md (the schema you must produce) and references/translation-guide.md (romanization + tagging + currency …
- Distinctive: line 45
ALWAYS output English + 中文 (Simplified).
- Distinctive: line 46
Keep the original text AND its romanization/pinyin.
- Distinctive: line 47
NEVER invent dishes, descriptions, or prices.
- Very specific: line 50
Use tags from the controlled vocabulary in references/translation-guide.md only — do not coin new tags.
- Distinctive: line 71
Verify it is the right restaurant (name + location match).
- Distinctive: line 78
STOP and ask the user when:
- Very specific: line 82
No online menu can be found — but first confirm you were actually ABLE to look.
- Distinctive: line 90
Always state the detected source language and currency.
- Distinctive: line 93
If you could only read part of the menu, say so plainly — which parts are missing and why.
- Very specific: line 105
Test the renderer against examples/sample_menu.json.
- Distinctive: line 112
If WebFetch is blocked in a sandboxed/cloud session, that is a network-policy denial, NOT "no menu online" — the fix is an environment with …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
menu-translate Skill
Read/translate restaurant menus and emit a structured bilingual (English + 中文) table. KEY PRINCIPLE: Claude reads the image/PDF/web page and does the translation itself; the helper scripts do ONLY deterministic work — validate the structured menu JSON and render it as a bilingual markdown table. Scripts NEVER do OCR or translation.
Two entry points
| Input type | Workflow doc |
| Photo / image / PDF of a menu | references/photo-workflow.md |
| Restaurant name or address | references/discovery-workflow.md |
Photo mode: read the file NATIVELY with the Read tool (no OCR library).
Discovery mode: find the menu with built-in WebSearch + WebFetch (NO API key);
browser automation is a FALLBACK only — claude-in-chrome locally, headless
Chromium/Playwright in a cloud sandbox (where claude-in-chrome is unavailable).
Pipeline (both modes)
- Obtain the source — Read tool for images/PDFs; WebFetch for web pages.
- Build a structured menu JSON per
references/output-schema.md. - Render it:
python3 scripts/render_menu.py menu.jsonOutput is a chat markdown table only — no HTML, no saved files.
Building the menu JSON
Read references/output-schema.md (the schema you must produce) and
references/translation-guide.md (romanization + tagging + currency rules)
before building JSON. Hard rules:
- ALWAYS output English + 中文 (Simplified).
- Keep the original text AND its romanization/pinyin.
- NEVER invent dishes, descriptions, or prices. If a field is unreadable, omit it or mark it — do not guess.
- Lower the
confidencevalue when unsure. - Use tags from the controlled vocabulary in
references/translation-guide.mdonly — do not coin new tags.
Rendering output
python3 scripts/render_menu.py <menu.json> [--convert-to USD] [--rate 0.14 | --rates-file rates.json] [--sections-only]The final answer is a chat markdown table only. Use --convert-to (with --rate
or --rates-file) to add an approximate converted-price column. --sections-only
renders section headers without rows.
Discovery rules (summary)
- Clarify FIRST when ambiguous (chain with many locations, missing city).
- WebSearch → official site or a reputable listing (Google Maps / Yelp / delivery apps).
- WebFetch the menu page — or download the menu PDF and Read it.
- Browser automation only as a fallback when WebFetch cannot retrieve it —
claude-in-chromelocally, Playwright/Chromium in a cloud sandbox. - Verify it is the right restaurant (name + location match).
- Cite the source URL.
Full steps: references/discovery-workflow.md.
Verification & clarification
STOP and ask the user when:
- The restaurant is a chain with many locations, or the city/address is missing.
- A photo is too blurry/cropped to read reliably.
- No online menu can be found — but first confirm you were actually ABLE to
look. If fetches are being refused by the environment rather than by the
sites, report that instead; it is not a fact about the restaurant. See
references/network-setup.md. - The currency is unknown or ambiguous (before doing any conversion).
Reporting
Always state the detected source language and currency. Label allergen/dietary tags as best-effort and converted prices as approximate.
If you could only read part of the menu, say so plainly — which parts are missing and why. Never present a partial or search-snippet-derived menu as if it were the full card.
Scripts
| Script | Purpose | Usage |
scripts/check_env.py | Quick environment probe (Python version, optional Pillow, poppler/pdftoppm for PDF menus, and whether a network policy proxy may block discovery). Makes no network request. Run first if unsure. | python3 scripts/check_env.py |
scripts/render_menu.py | Menu JSON → bilingual markdown table. | python3 scripts/render_menu.py <menu.json> [--convert-to USD] [--rate 0.14 | --rates-file rates.json] [--sections-only] |
scripts/preprocess_image.py | OPTIONAL (needs Pillow): clean up a low-quality photo. | python3 scripts/preprocess_image.py --in <img> --out <img> [--grayscale --autocontrast --sharpen --tile --max-dim N] |
Test the renderer against examples/sample_menu.json.
Failure modes
Blurry photos, no online menu, unknown currency, and other recovery recipes:
references/failure-modes.md. Reference index: references/README.md.
If WebFetch is blocked in a sandboxed/cloud session, that is a network-policy
denial, NOT "no menu online" — the fix is an environment with Full network
access. See references/network-setup.md for setup and for telling a policy
block apart from a site's own anti-bot.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

