LEGO MOC
БесплатноЗапускает вложенные скриптыНе проверенRecognise loose LEGO parts from photos into a parts inventory, then design a LEGO model (MOC) as an LDraw file - from the parts the user owns, or as a free…
от garmanwu226 установок в других каталогахОб этом скилле
LEGO parts recognition and MOC design
Two stages:
- Scan. The user photographs loose parts; the server recognises them and keeps the inventory (per user ID).
- Design and verify. You design a model (MOC) and write it as an LDraw file: by default from that inventory, or as a free build with any parts when the user asks for one or has no parts scanned (section 4b). The server checks it physically: on failure it names the offending lines; on a pass it publishes a page with a 3D view and step-by-step building instructions. The server designs nothing: the design is yours.
There are two ways to work. MCP tools (section 2) need no shell commands; use them whenever they are available.
The script scripts/lego.py (section 5) does the same through shell commands and is the fallback.
1. Are the MCP tools available?
Look in your tool list for these names, usually shown under a server prefix such as lego-moc (for example
mcp__lego-moc__scan_photos or lego-moc.scan_photos):
scan_photos, scan_status, inventory, edit_inventory, design_guide, connectors, find_parts,
submit_model, moc_status
- All present: work as in section 2.
- All but
scan_photos: the host uses the remote server endpoint, which cannot read files on this computer. Upload photos with the script (scan), do everything else with the tools. - None present: use the script (section 5) for this task; everything works with it. Then offer the user the one-time setup below, which removes the per-command approvals.
One-time setup (the user does it)
- Run
python3 <this skill folder>/scripts/lego.py mcp-config(Windows:python). It prints a JSON block and makes no network call. - Give the user that JSON and ask them to add the
lego-mocentry to themcpServerssection of the agent's MCP settings (settings page or MCP config file), then restart the agent or reload its MCP servers. Edit the host's configuration yourself only if the user asks you to. - After the restart the agent starts the bridge itself (
lego.py mcp, a local stdio MCP server) and the tools appear. The same~/.lego-parts/folder and user ID are used, so nothing scanned so far is lost.
lego.py mcp-config --remote prints the server's own endpoint instead (type: http, a URL that contains the user
ID; it creates an ID if none exists). Use it only for hosts that cannot run local commands. It has no
scan_photos, and its URL is a credential: never post it anywhere public.
2. MCP flow
Every tool result has a text part for you to read and a structuredContent object with the fields. An error comes
back as a result with isError: true whose text says what happened and what to do next. Do it; don't work around
it with your own HTTP calls.
Scan
scan_photos{"paths": [...]}: absolute paths of photo files, folders or glob patterns on this computer, 1–30 photos per call (JPEG, PNG, WEBP, HEIC, 25 MB each). It returns at once with one task per photo; it does not wait for recognition. Tell the user every entry ofrejectedandnot_uploadedwith its reason. Aduplicate_photoentry means that exact file was uploaded before: it is not recognised again, andpreviousis the first upload's result (its parts are in the inventory already). If the host times the call out, the upload goes on: callscan_statusinstead of uploading again. With many large photos, use several calls of about 8 photos.scan_status{"wait_s": 50}: repeat untilpendingis 0 (recognition takes minutes; the first photo can wait for the GPU to start). Relay every entry ofnotices(pile_photo,no_pieces) to the user verbatim and name the failed photos with theirerror. If it stays pending for a long time, tell the user how many photos are still being processed instead of looping forever.
Show and correct the inventory
inventory: shows the inventory with an overview picture (an image in the result) andinventory_url. Show the user the picture and give them the link; if you have a browser or preview panel, open the link there. Never present a table of bare part numbers: most users cannot tell what3020is. Point out the low-confidence rows (orange frame and?in the picture) and ask the user to check them on the page.designable: falserows have no usable 3D geometry and can never be built with.pending_tasks > 0means the inventory is incomplete: say so. Usefilter: "usable"or"low_confidence"andoffset/limitfor long inventories.edit_inventory{"changes": [...]}, only on the user's word (never to make a design fit):{"op": "set_quantity", "key": "3001|4", "quantity": 3},{"op": "remove", "key": ...},{"op": "confirm", "key": ...}(the user checked a low-confidence row and it is right),{"op": "replace", "key": ..., "ldraw_part": "3002", "ldraw_color": 4}(it is really another par
Установить LEGO MOC в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл LEGO MOC?
Recognise loose LEGO parts from photos into a parts inventory, then design a LEGO model (MOC) as an LDraw file - from the parts the user owns, or as a free build with unlimited parts - and have a server verify it physically - it returns fix notes, or a public page with a 3D preview and step-by-step building instructions. Works through MCP tools (scan_photos, inventory, submit_model and others) or a fallback Python script. Use when the user wants to identify, scan or count LEGO pieces from photos, build, show or correct a parts inventory, design or build a MOC from parts they own or as a free build without an inventory (a car, a house, a description, a picture), check, validate or verify a LEGO model or .ldr file, or get building instructions or a 3D preview for it. Chinese triggers - 乐高零件识别, 识别乐高零件, 拍照识别积木, 乐高零件清单, 零件库存, 用我有的零件设计 MOC, 设计乐高作品, 自由创作, 不限零件设计乐高, 检验 MOC, 检查乐高模型能不能拼, 拼装步骤, 搭建说明, 3D 预览.
Как установить скилл LEGO MOC?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл LEGO MOC запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic