{
  "schema_version": 1,
  "type": "skill",
  "slug": "library-creator",
  "title": "Library Creator",
  "brief": "Orchestrate creating a complete library component — schematic symbol, PCB footprint, and 3D model — by calling the three existing creator skills (symbol-creator, footprint-creator, 3dcomponent-creator",
  "version": "1.0.1",
  "tags": [],
  "license": "MIT",
  "discovery_triggers": [
    "full library component",
    "symbol and footprint and 3d",
    "complete library entry",
    "library review",
    "all three views",
    "symbol footprint 3d model",
    "full kicad library",
    "create all three"
  ],
  "discovery_pitch": "I can build the whole library entry — symbol, footprint, and 3D model together — with a unified LibView review where hovering a pin cross-highlights all three. One shot, consistent pin numbering across all three artifacts.",
  "source_path": "SKILL.md",
  "readme": "---\nname: library-creator\ndescription: Use when the user asks to \"create a complete library component\", \"create symbol + footprint + 3D\", \"make a full KiCad library entry\", \"library review\", \"show all three views\", \"library creator\", or wants to create and review all three artifacts (symbol, footprint, 3D model) for a component together.\n---\n\n# Library Creator\n\nOrchestrate creating a complete library component — schematic symbol, PCB footprint, and 3D model — by calling the three existing creator skills (symbol-creator, footprint-creator, 3dcomponent-creator) in sequence, then display all three artifacts in **LibView** (the unified Library Review viewer) for cross-validation with interactive pin-pad-mesh highlighting.\n\n## Workflow Overview\n\n```\n1. Research part  →  2. Create symbol  →  3. Create footprint  →  4. Generate 3D  →  5. Library Review  →  6. Iterate\n```\n\n## Step 1: Research the Part\n\nBefore creating anything, research the component thoroughly:\n\n1. **Find the datasheet** — search Mouser, DigiKey, or JLCPCB using the MCP tools\n2. **Extract key specs**: pin count, package type (QFN, TSSOP, BGA, etc.), body dimensions, pin pitch\n3. **Build a complete pinout table**: pin number, pin name, electrical type, description\n4. **Note the package name** for the footprint (e.g., \"TSSOP-14\", \"QFN-24 4x4mm\")\n\n## Step 2: Create the Symbol\n\nRead and follow the symbol-creator guide:\n\n```\nRead ~/.claude/skills/adom/guides/symbol-creator.md\n```\n\nFollow that guide's full workflow to produce:\n- A `.kicad_sym` file\n- SymView HTML (`PART_NAME-viewer.html`)\n- Symbol SVG preview\n- Pin metadata (names, numbers, electrical types)\n\n**Save the SymView HTML path** — you'll need it for step 5.\n\n## Step 3: Create the Footprint\n\nRead and follow the footprint-creator guide:\n\n```\nRead ~/.claude/skills/adom/guides/footprint-creator.md\n```\n\nFollow that guide's full workflow to produce:\n- A `.kicad_mod` file\n- FpView HTML (`PART_NAME-fp-viewer.html`)\n- A `-fp-metadata.json` file (pad descriptions, body size, symbol pin map)\n- Footprint SVG preview\n\n**Save the FpView HTML path and metadata** — you'll need them for steps 4 and 5.\n\n## Step 4: Generate the 3D Model\n\nRead and follow the 3d-component-creator guide:\n\n```\nRead ~/.claude/skills/adom/guides/3d-component-creator.md\n```\n\nFollow that guide's workflow to produce:\n- A `.glb` file for preview\n- A `.step` file for CAD delivery\n\n**Save the GLB path** — you'll need it for step 5.\n\n## Step 5: LibView — Library Review (unified 3-pane view)\n\nAfter all three artifacts exist, display them together in **LibView** using the `gv_library_review` MCP tool. LibView shows all three views (SymView + FpView + 3dView) simultaneously with cross-highlighting — hovering a pin in the symbol highlights the corresponding pad in the footprint and the mesh in the 3D model, and vice versa.\n\n### Build the maps\n\nFrom the symbol and footprint metadata, construct these maps:\n\n**`pin_pad_map`** — Maps symbol pin names to footprint pad numbers:\n```json\n{ \"SDA\": \"4\", \"SCL\": \"5\", \"VCC\": \"1\", \"GND\": \"8\" }\n```\nBuild this from the footprint metadata's `symbolPinMap` (which maps pad number → pin name) by inverting it.\n\n**`pad_mesh_map`** — Maps pad numbers to 3D mesh names. Can be left empty (`{}`) — the 3D viewer auto-generates synthetic `_lr_pad_N` mesh names from `footprint_pads` when no explicit map is provided. If you need to map to specific GLB mesh names (e.g., `part_0`, `part_1`), provide them:\n```json\n{ \"1\": \"part_0\", \"2\": \"part_1\", \"3\": \"part_2\" }\n```\n\n**`footprint_pads`** — Pad positions from the `.kicad_mod` for 3D pad overlay and cross-highlighting. Read from the baked `const pads = [...]` in the FpView HTML or parse from the `.kicad_mod` directly:\n```json\n[\n  { \"number\": \"1\", \"x\": -0.75, \"y\": -0.5, \"width\": 0.6, \"height\": 0.3 },\n  { \"number\": \"2\", \"x\": -0.75, \"y\": 0.0, \"width\": 0.6, \"height\": 0.3 }\n]\n```\n\n### Call the MCP tool\n\nLibView uses the existing **SymView** and **FpView** HTML files (pre-generated by the symbol-creator and footprint-creator services). All pin descriptions, pad descriptions, and metadata are already baked into those viewer files — you do NOT pass them again here.\n\n```\ngv_library_review({\n  sym_view_path: \"/path/to/PART_NAME-viewer.html\",\n  fp_view_path: \"/path/to/PART_NAME-fp-viewer.html\",\n  glb_path: \"/path/to/PART_NAME.glb\",\n  pin_pad_map: { \"SDA\": \"4\", \"SCL\": \"5\", ... },\n  pad_mesh_map: { \"1\": \"part_0\", \"2\": \"part_1\", ... },\n  footprint_pads: [{ number: \"1\", x: -0.75, y: -0.5, w: 0.6, h: 0.3 }, ...],\n  title: \"PART_NAME Library Review\"\n})\n```\n\nThe `sym_view_path` points to the SymView HTML from the symbol folder (e.g. `symbols/NE555/NE555-viewer.html`). The `fp_view_path` points to the FpView HTML from the footprint folder (e.g. `footprints/NE555/NE555-fp-viewer.html`).\n\n### What to check in LibView\n\nTell the user to hover over pins/pads to verify:\n\n- **Every pin** in the symbol has a corresponding pad in the footprint (no unmapped pins)\n- **Every pad** in the footprint has a corresponding mesh in the 3D model\n- **Pin names** in the symbol match the signal names on footprint pads\n- **3D model pads** are in the same positions as the footprint pads\n- **Electrical types** are correct (power, I/O, passive, etc.)\n\n**3D pane interaction**: When hovering over pad discs in the 3D pane, the cursor changes to a hand pointer and the pad turns teal. A floating callout shows \"Pad N — PinName\". Cross-highlighting updates the symbol and footprint panes simultaneously.\n\n**3D toolbar toggles**: When a real GLB model is loaded, the 3D toolbar provides toggle buttons for:\n- **FR4 board** — show/hide the green PCB substrate\n- **Board pads** — show/hide KiCad's native pads from the GLB\n- **Footprint pads** — show/hide the custom copper-colored overlay pads used for cross-highlighting (visible by default, can be toggled off for a clean model view)\n- **Axes** — show/hide XYZ origin axes\n\n### GLB serving\n\nThe viewer server serves GLB files from `/tmp/gv-3d/` via the `/glb/` route. Copy the GLB there before referencing it:\n```bash\ncp /path/to/PART.glb /tmp/gv-3d/PART.glb\n```\nThen use `glb_path` pointing to the original file — the MCP tool copies it to the serve dir automatically.\n\n### Debug commands\n\nUse the server API to send debug commands to the 3D pane:\n```bash\n# Show XYZ origin axes (red=X, green=Y, blue=Z)\ncurl -X POST http://127.0.0.1:8771/api/action -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"show_origin\",\"visible\":true}'\n\n# Set camera to a named view (front, back, left, right, top, bottom, isometric)\ncurl -X POST http://127.0.0.1:8771/api/action -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"set_view\",\"view\":\"front\"}'\n\n# Toggle footprint pad overlays in 3D\ncurl -X POST http://127.0.0.1:8771/api/action -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"toggle_fp_pads\"}'\n```\n\n## Step 6: Iterate\n\nIf the user spots issues in LibView:\n\n1. Identify which artifact has the problem (symbol, footprint, or 3D)\n2. Go back to the relevant creator skill to fix it\n3. Re-generate the GLB if the footprint changed\n4. Call `gv_library_review` again with the updated paths\n\n## Troubleshooting\n\n### \"No pad mapping\" shown in tooltip\nThe `pin_pad_map` is missing an entry for that pin. Check that all symbol pins have corresponding entries.\n\n### Footprint pads don't align with 3D pads\nThe `footprint_pads` array positions may be wrong. Re-read the `.kicad_mod` file and extract the pad `(at x y)` and `(size w h)` values.\n\n### 3D mesh names don't match\nAfter generating the GLB, the mesh names depend on the order KiCad processes them. If highlighting doesn't work, you may need to inspect the GLB mesh names by loading it in 3dView first and checking what mesh names are reported on hover.\n\n### Footprint SVG hit zones are offset\nThe coordinate mapping uses the courtyard center as an anchor. If the footprint has no courtyard layer (`F.CrtYd`), the offset calculation falls back to the SVG center, which may be less accurate.\n",
  "author": {
    "name": "Kyle Bergstedt",
    "email": "kyle@adom.inc"
  },
  "visibility": {
    "public": true
  },
  "hero": null,
  "sample_prompts": [],
  "metadata": {},
  "created_at": "2026-05-28T05:30:10.270Z",
  "updated_at": "2026-05-28T05:30:10.270Z",
  "sub_skills": [],
  "parent_app": null,
  "org": "adom"
}