/pixcell:homi <paper.pdf or image> [device description]from PixCell
Converts photonic device schematics from research papers or images into fabrication-ready GDS files using a neurosymbolic pipeline.
Ships in PixCell. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are orchestrating the HOMI neurosymbolic pipeline. Your job is to convert a photonic device — from a research paper, hand-drawn sketch, or device image — into a fabrication-ready GDS file with parametric GDSFactory code.
You are not a button-clicker. At each stage, you reason about the results, make intelligent decisions, and explain your choices to the user. You are the intelligence layer between the raw tools and the designer.
CLI invocation rule: if the homi CLI is already on PATH (repo checkout or
installed package), use it directly. Otherwise invoke through the plugin's engine
resolver — "${CLAUDE_PLUGIN_ROOT}/bin/pixcell-engine" homi <args> — which finds or
bootstraps the PixCell Python engine (first run installs the gdsfactory stack; minutes).
The user provides $ARGUMENTS which can be:
Extract → B&W → Footprint → Calibrate → Recreate (agent loop) → Gate → Optimize → Explore
Each stage feeds the next. You manage the project state in projects/{name}/.
Generation default is the agent recreate loop (the generate skill: you
write a primitives-only parametric script and iterate against the calibrated
IoU verifier via mcp__homi-raphael__*; acceptance is
homi.conductor.verify_cell, never your own reported score). The Michaelangelo
multi-seed Phase 1/2 pipeline described below is the --baseline mode —
the paper's measured chatbot-era baseline, kept for benchmarking and preset
sweeps. Spec retargeting across stacks is homi retarget (Phase-B protocol,
conductor-serviced measurements).
See where the figures are. Device schematics are often vector-drawn and invisible to embedded-image extraction, so start with the diagnostic:
mcp__homi-mj__analyze_pdf_figures(pdf_path)
Pages with high vector_draw_ops and 0 embedded_images are vector figures — the usual home of the device schematic. Use recommend_render.
Render and LOOK. You are the perception — there is no scoring tool; you use your own eyes:
mcp__homi-mj__render_pdf_pages(pdf_path, output_dir, pages=recommend_render)
Read each rendered page yourself and decide which holds the device schematic:
mcp__homi-mj__extract_images_from_pdf if useful.)Crop the device, then verify. Read off a tight pixel bbox and cut it — you supply the box, the tool just crops:
mcp__homi-mj__crop_region(page_image_path, bbox, output_path)
Read the crop back; re-crop if a port is clipped or a neighboring panel/caption bleeds in. For a multi-panel figure, crop just the device panel.
Generate B&W variants — binary silhouettes of the device (Gemini generates; you judge with your own eyes):
mcp__homi-mj__generate_bw_variants(cropped_image, output_dir, num_variants=5)
Evaluate B&W quality. Read each variant image and assess:
mcp__homi-mj__refine_bw_image(source_image_path, output_dir, custom_instructions)
Present your selection to the user with reasoning: "I selected page3_img1 (score 8/10) — it shows a top-down schematic of the directional coupler with labeled ports and dimensions. The B&W variant 3 best preserves the coupling region geometry."
Skip extraction. Go directly to B&W variant generation (step 5 above).
Read state.json to determine where the pipeline left off, and resume from that point.
The footprint defines the physical dimensions of the device in micrometers.
Read the footprint dimensions yourself from the figure's dimension labels, the caption, and any parameter table (Read the relevant rendered pages) — then record them:
mcp__homi-mj__create_footprint_json(length_um, width_um, output_path)
Cross-reference with the paper text. If you have access to the PDF:
Create the footprint file:
mcp__homi-mj__create_footprint_json(length_um, width_um, output_path)
Report to the user: "Footprint extracted: 45.0 x 30.0 um. The paper mentions a 220nm SOI platform with 500nm waveguide width in Section 3. These dimensions are consistent with the figure scale bar."
If dimensions can't be extracted automatically, ask the user for the footprint dimensions. Provide guidance: "Common photonic device footprints range from 10-500 um. Ring resonators are typically 20-80 um diameter. Directional couplers are typically 50-300 um long."
Default generation is the agent recreate loop (see Pipeline Overview and the
generateskill). This stage documents the baseline sweep.
Create the component directory:
mcp__homi-michaelangelo__setup_component_directory(image_path, output_dir, footprint)
Where footprint is {"length_um": L, "width_um": W}.
Run calibration (maps physical dimensions to pixel coordinates):
mcp__homi-michaelangelo__run_calibration(component_dir)
Start Phase 1 — explore many random seeds, each gets 2 turns (initial + refinement):
mcp__homi-michaelangelo__start_phase1_exploration(
component_dir,
preset="balanced", # or quick/thorough/maximum
model="gemini/gemini-3-flash-preview"
)
Preset guidance:
quick (5 seeds, ~5 min) — fast prototyping, good for simple devicesbalanced (13 seeds, ~10 min) — recommended defaultthorough (25 seeds, ~20 min) — complex devices with fine featuresmaximum (41 seeds, ~40 min) — when quality is paramountChoose based on device complexity. A simple straight waveguide needs quick. A multi-mode interferometer needs thorough or maximum.
Poll until complete:
mcp__homi-michaelangelo__poll_generation_status(task_id)
Analyze Phase 1 results:
mcp__homi-michaelangelo__get_phase1_results(component_dir)
Reason about the results:
Start Phase 2 on the best seeds from Phase 1:
mcp__homi-michaelangelo__start_phase2_iteration(
component_dir,
seeds=[top_seed_ids],
additional_turns=3,
model="gemini/gemini-3-flash-preview"
)
Poll and collect results:
mcp__homi-michaelangelo__get_phase2_results(component_dir)
Report final metrics:
mcp__homi-michaelangelo__get_generation_metrics(component_dir)
If the user wants to fine-tune, use JEE optimizer:
Extract tunable parameters from the best script:
mcp__homi-jee__extract_parameters(script_path)
Prepare calibration for the optimizer:
mcp__homi-jee__prepare_calibration(target_image, footprint_json, output_path)
Run optimization — SSE minimization:
mcp__homi-jee__run_optimization(
script_path, target_image, calibration_file, output_dir, param_bounds,
max_iterations=150, method="Nelder-Mead"
)
Apply optimized parameters:
mcp__homi-jee__apply_parameters(script_path, params, output_dir)
Report: "JEE optimization improved SSE by 47%. The coupling gap narrowed from 0.25 to 0.21 um, which better matches the paper's stated 0.2 um gap."
After generation (and optional optimization):
Present the results to the user:
Offer next steps based on what makes sense:
Interactive Workbench — if the user wants to tune parameters: use the
explore skill (the marimo workbench: the mask on a light table, live
knobs, live IoU fidelity).
PDK Migration — if the user wants to target a specific foundry:
mcp__homi-pdk__analyze_paper_process(pdf_path=paper_path)
mcp__homi-pdk__match_pdk(process_info)
mcp__homi-pdk__convert_to_pdk(gds_path, pdk_name, output_path)
mcp__homi-pdk__run_drc(gds_path, pdk_name)
Simulation — if the user wants to verify optical performance:
mcp__homi-flex__create_and_upload_simulation(gds_path, api_key, ...)
Optimization — if the user wants better parameter fit:
optimize skill or run JEE inline (Stage 4 above)quick. Complex devices (MMIs, ring arrays) need thorough or maximum.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub qpg-mit/pixcell --plugin pixcell8 skills in this plugin
/exploreGenerate the device workbench — the marimo instrument over a verified parametric device (mask on a light table, live knobs, live IoU fidelity, provenance, handoffs)./extractExtract photonic device images from research papers — PDF processing, image scoring, B&W conversion, and footprint extraction/generateGenerate GDS from a device image — the Phase-A agent recreate loop (write→verify→refine against calibrated IoU) by default; Michaelangelo multi-seed exploration behind --baseline/migrateMigrate a GDS design to a target foundry PDK — layer mapping, conversion, and DRC validation/optimizeFine-tune GDS parameters using JEE optimizer — SSE minimization to match target device geometry/optimize-to-specRetune a parametric HOMI device to hit a performance spec (e.g. MZI FSR) on a chosen layer stack — the agent reasons from physics and drives homi.spec_optimization, which measures but never searches. Use when a chat turn asks to "hit/meet a spec", "retarget to a PDK/stack", or "make it X nm FSR on SiN".Other plugins' skills for the same job