소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 19일 15:30
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill gdsfactory-component-designer명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | gdsfactory-component-designer |
| description | > Use when this capability is needed. |
This skill lets an LLM agent generate, visualize, and iteratively modify photonic-IC components using the gdsfactory Python library.
Activate this skill when the user:
The examples below use bare python, but you must adapt the invocation to
whatever Python environment the user has set up. Common alternatives:
| Setup | Command |
|---|---|
| System / venv / conda | python |
| uv project | uv run python |
| pipx-installed gdsfactory | pipx run --spec gdsfactory python |
| Nix shell | nix develop -c python |
Probe the environment first (e.g. check for a pyproject.toml with
[tool.uv], or an active virtualenv) and pick the appropriate command. When
in doubt, try python -c "import gdsfactory" — if it fails, fall back to
uv run python or ask the user.
Before generating any component, make sure the PDK is activated. The generic PDK ships with gdsfactory and is always available:
import gdsfactory as gf
# Activate the built-in generic PDK (always available)
gf.gpdk.PDK.activate()
If the user specifies a third-party PDK (e.g. cspdk, ubcpdk,
sky130, gf45spclo), import and activate it instead.
Always clear the cell cache between independent component generations to avoid
stale state: gf.clear_cache().
gdsfactory ships with 300+ parametric component factory functions under
gf.components. To instantiate a component, call its factory function:
import gdsfactory as gf
gf.gpdk.PDK.activate()
# Example: 1×2 MMI splitter
c = gf.components.mmi1x2(width_mmi=5.0, length_mmi=25.0, gap_mmi=0.25)
Every component factory function is a standard Python callable with typed
parameters. Use help() or inspect.signature() to discover the parameters.
Visualization is essential: render and inspect the component after creating or modifying it to verify the result.
Use the helper script bundled with this skill for reliable headless rendering. From a bash tool or Python subprocess:
python .agents/skills/gdsfactory-component-designer/scripts/visualize_component.py \
"gf.components.mmi1x2(width_mmi=5.0, length_mmi=25.0)" \
/tmp/mmi1x2.png
After saving, always import the image into context so you and the user can see it.
The simplest modification is changing the factory-function arguments. Always
call gf.clear_cache() before regenerating to avoid stale data.
Build a custom component by placing and connecting sub-components. Use the
@gf.cell decorator for proper naming and caching.
# Write to GDS file
gdspath = c.write_gds("/tmp/my_component.gds")
When the user asks for a component, follow this streamlined loop:
| Component | Factory function | Key parameters |
|---|---|---|
| Straight waveguide | gf.components.straight | length, width |
| Euler bend | gf.components.bend_euler | radius, angle |
| 1×2 MMI | gf.components.mmi1x2 | width_mmi, length_mmi |
| Ring resonator | gf.components.ring_single | gap, radius |
| Grating coupler | gf.components.grating_coupler_te | period, n_periods |
The full gdsfactory docs are at https://gdsfactory.github.io/gdsfactory/.
Browse tutorial notebooks under docs/notebooks/ or over 100 sample Python
scripts under gdsfactory/samples/ for worked examples.
Don't guess – search the repo for examples first.
DCplxTransgdsfactory's geometry backend is kfactory, built on KLayout's Python db module. Full API docs: https://www.klayout.de/doc-qt5/code/module_db.html
DCplxTrans constructorklayout.db.DCplxTrans represents a rotation + mirror + translation on µm-unit coordinates. Positional and keyword arguments are both supported:
import klayout.db as kdb
# positional: DCplxTrans(mag, angle, mirror, u)
t = kdb.DCplxTrans(1.0, 45.0, True, kdb.DVector(10.0, 5.0))
# keyword (preferred for clarity):
t = kdb.DCplxTrans(mag=1.0, angle=45.0, mirror=True, u=kdb.DVector(10.0, 5.0))
Parameters (application order: mirror → rotate → translate):
| Parameter | Type | Description |
|---|---|---|
mag | float | Scaling factor — always 1.0; see warning below |
angle | float | CCW rotation in degrees |
mirror | bool | Mirror about x-axis before rotation |
u | DVector | Translation in µm |
⚠️ Never set
mag != 1.0. No foundry accepts scaled instances. Use component factory parameters to create differently-sized variants.
ℹ️
ComponentReference.dcplx_transsnaps to the manufacturing grid viaICplxTrans, so off-grid placements are silently adjusted.
ComponentReference.dcplx_transimport gdsfactory as gf
import klayout.db as kdb
circuit = gf.Component("circuit")
ref = circuit.add_ref(gf.components.mmi1x2())
# rotate 45°, mirror, translate to (10, 5) µm
ref.dcplx_trans = kdb.DCplxTrans(mag=1.0, angle=45.0, mirror=True, u=kdb.DVector(10.0, 5.0))
DCplxTrans objects compose with * (right-hand operand applied first):
rotate = kdb.DCplxTrans(angle=90.0)
translation = kdb.DCplxTrans(u=kdb.DVector(20.0, 0.0))
ref.dcplx_trans = translation * rotate # rotate first, then translate
| Goal | Example |
|---|---|
| Translate | kdb.DCplxTrans(u=kdb.DVector(dx, dy)) |
| Rotate 90° CCW | kdb.DCplxTrans(angle=90.0) |
| Mirror about x-axis | kdb.DCplxTrans(mirror=True) |
| Rotate then translate | translation * rotate |
| Read / modify in place | ref.dcplx_trans / ref.dcplx_trans = t * ref.dcplx_trans |
Source: gdsfactory/gdsfactory — distributed by TomeVault.