/pixcell:optimize <project_dir or script_path> [method]from PixCell
Fine-tunes GDS layout parameters using the JEE optimizer to minimize SSE between generated and target device geometry. Useful after generation when topology is correct but dimensions are slightly off.
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 running the JEE parameter optimization stage. Your goal: take a generated GDSFactory script and fine-tune its numeric parameters to minimize the geometric difference (SSE) between the generated layout and the target device image.
$ARGUMENTS — either:
output/best.py and component/ with target image)nelder-mead or powell)generate skill when IoU is good (>0.80) but not excellent (<0.95)Don't use this when:
mcp__homi-jee__extract_parameters(script_path)
This parses the GDSFactory script and identifies numeric parameters with suggested bounds. Review the output — some parameters matter more than others:
mcp__homi-jee__prepare_calibration(
target_image="component/component.png",
footprint_json="component/footprint.json",
output_path="output/jee_calibration.json"
)
Single optimization (fast, good for fine-tuning):
mcp__homi-jee__run_optimization(
script_path, target_image, calibration_file, output_dir, param_bounds,
max_iterations=150,
method="Nelder-Mead"
)
Exploration (thorough, good for finding global optimum):
mcp__homi-jee__run_exploration(
script_path, target_image, calibration_file, output_dir,
grid_points_per_param=5,
top_n_for_optimization=3,
max_iterations_per_method=100
)
Exploration does a grid search first, then runs both Powell and Nelder-Mead from the best grid points. Use this when you're not sure which parameter region is optimal.
mcp__homi-jee__poll_optimization(task_id)
# or
mcp__homi-jee__poll_exploration(task_id)
mcp__homi-jee__get_optimization_result(task_id)
# or
mcp__homi-jee__get_exploration_result(task_id)
mcp__homi-jee__apply_parameters(script_path, optimized_params, output_dir)
This generates a new GDS file with the optimized parameters.
Report:
For common photonic devices:
| Device | Most Sensitive Parameter | Typical Range |
|---|---|---|
| Directional coupler | coupling gap | 0.1-0.5 um |
| Ring resonator | ring radius, coupling gap | 5-50 um, 0.1-0.5 um |
| MMI | MMI width, MMI length | 2-10 um, 5-50 um |
| Y-branch | taper length, branch angle | 5-20 um, 1-10 deg |
| Grating coupler | period, fill factor | 0.5-1.0 um, 0.3-0.7 |
What SKILL.md sets; muted values are Claude Code's defaults
8 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/homiFull paper-to-GDS pipeline — extracts photonic devices from research papers and generates fabrication-ready GDS files/migrateMigrate a GDS design to a target foundry PDK — layer mapping, conversion, and DRC validation/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".npx claudepluginhub qpg-mit/pixcell --plugin pixcellOther plugins' skills for the same job