Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

garmanwuот garmanwu226 установок в других каталогах

Об этом скилле

LEGO parts recognition and MOC design

Two stages:

  1. Scan. The user photographs loose parts; the server recognises them and keeps the inventory (per user ID).
  2. 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)

  1. Run python3 <this skill folder>/scripts/lego.py mcp-config (Windows: python). It prints a JSON block and makes no network call.
  2. Give the user that JSON and ask them to add the lego-moc entry to the mcpServers section 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.
  3. 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

  1. 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 of rejected and not_uploaded with its reason. A duplicate_photo entry means that exact file was uploaded before: it is not recognised again, and previous is the first upload's result (its parts are in the inventory already). If the host times the call out, the upload goes on: call scan_status instead of uploading again. With many large photos, use several calls of about 8 photos.
  2. scan_status {"wait_s": 50}: repeat until pending is 0 (recognition takes minutes; the first photo can wait for the GPU to start). Relay every entry of notices (pile_photo, no_pieces) to the user verbatim and name the failed photos with their error. 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

  1. inventory: shows the inventory with an overview picture (an image in the result) and inventory_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 what 3020 is. Point out the low-confidence rows (orange frame and ? in the picture) and ask the user to check them on the page. designable: false rows have no usable 3D geometry and can never be built with. pending_tasks > 0 means the inventory is incomplete: say so. Use filter: "usable" or "low_confidence" and offset/limit for long inventories.
  2. 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
Полный SKILL.md на ClawHub

Установить 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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить LEGO MOC с