Skip to main content Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill electrical-engineering명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| name | electrical-engineering |
| description | Electrical engineering fundamentals including circuit analysis, power systems, electronics, signal processing, and electromagnetic theory |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"engineers","category":"engineering"} |
What I do
- Design and analyze electrical circuits
- Calculate power distribution and loads
- Specify electronic components and subsystems
- Analyze electromagnetic fields and interference
- Design digital and analog electronic systems
- Calculate thermal management for power electronics
- Create wiring diagrams and circuit schematics
When to use me
When designing electronic circuits, calculating power requirements, analyzing signal integrity, or specifying electrical components for systems.
Core Concepts
- Ohm's law and Kirchhoff's laws
- AC/DC circuit analysis
- Semiconductor devices and circuit design
- Power calculation and distribution
- Electromagnetic field theory
- Signal integrity and EMC/EMI
- Digital logic and embedded systems
- Analog filter design
- Power electronics and motor drives
- Printed circuit board design
Code Examples
Circuit Analysis Tools
import numpy as np
from dataclasses import dataclass
from typing import List, Tuple
import cmath
@dataclass
class Component:
value: float
unit: str
@dataclass
class Resistor(Component):
def impedance(self, frequency: float = 0) -> complex:
return self.value
@dataclass
class Capacitor(Component):
def impedance(self, frequency: float) -> complex:
if frequency == 0:
return complex(float('inf'))
return -1j / (2 * np.pi * frequency * self.value)
@dataclass
class Inductor(Component):
def impedance(self, frequency: ) -> :
frequency == :
* * np.pi * frequency * .value
() -> np.ndarray:
np.linalg.solve(conductances, current_sources)
() -> [, , ]:
V_load = V_th * R_load / (R_th + R_load)
P_load = V_load** / R_load
V_load, P_load, V_load / R_load
() -> [, ]:
theta1 = np.arccos(current_power_factor)
theta2 = np.arccos(target_power_factor)
Q1 = apparent_power * np.sin(theta1)
Q2 = apparent_power * np.sin(theta2)
Qc = Q1 - Q2
Qc, Qc / ( * np.pi * )
S =
pf_current =
pf_target =
Qc, C = power_factor_correction(S, pf_current, pf_target)
()
()
Semiconductor Calculations
from dataclasses import dataclass
@dataclass
class MOSFETParameters:
Vds_max: float
Id_max: float
Rds_on: float
Vgs_th: float
Qg: float
trr: float
@dataclass
class DiodeParameters:
Vr_max: float
If_max: float
Vf: float
trr: float
Ir: float
def mosfet_conduction_loss(
Id: float,
Rds_on: float,
D: float
) -> float:
"""Calculate MOSFET conduction loss."""
return Id**2 * Rds_on * D
def mosfet_switching_loss(
Vds: float,
Ids: float,
tr: float,
tf: float,
fs: float
) -> float:
"""Calculate MOSFET switching loss."""
return 0.5 * Vds * Ids * (tr + tf) * fs
() -> :
* Vr * Irr * trr * fs
() -> :
(Vin - Vout) * D / (L * fs)
() -> :
D = Vout / Vin
Iripple_max = Io * ripple_percent
L = (Vin - Vout) * D / (Iripple_max * fs)
Ic = Iripple_max /
{
: D,
: L * ,
: Iripple_max,
: Ic
}
design = buck_converter_design(, , , )
()
()
()
PCB Design Calculations
def trace_current_capacity(
width: float,
thickness: float,
temp_rise: float
) -> float:
"""Calculate PCB trace current carrying capacity using IPC-2221."""
if temp_rise <= 10:
return 0.048 * width**0.44 * thickness**0.725
else:
return 0.024 * width**0.44 * thickness**0.725 * (temp_rise / 10)**0.44
def microstrip_impedance(
w: float,
h: float,
Er: float
) -> float:
"""Calculate microstrip trace impedance."""
if w / h <= 1:
return (87 / (Er + 1.41)**0.5) * np.log(5.98 * h / (0.8 * w + t))
else:
return (87 / (Er + 1.41)**0.5) * np.log(5.98 * h / (0.8 * w + t))
def via_inductance() -> :
* length * np.log( * length / diameter)
() -> :
C = Cload * allowed_ripple / Vsupply
Z = / ( * np.pi * frequency * C)
(C, Vsupply / (target_impedance * * np.pi * frequency * Vsupply))
trace_width =
copper_thickness =
temp_rise =
current = trace_current_capacity(trace_width, copper_thickness, temp_rise)
()
Power System Calculations
def three_phase_power(
Vll: float,
I: float,
pf: float
) -> float:
"""Calculate three-phase power."""
return np.sqrt(3) * Vll * I * pf
def short_circuit_current(
S_sc: float,
V: float,
Z_percent: float
) -> float:
"""Calculate short-circuit current."""
return (S_sc * 1000) / (np.sqrt(3) * V * Z_percent / 100)
def voltage_drop_calculation(
I: float,
R: float,
X: float,
pf: float
) -> float:
"""Calculate voltage drop in percent."""
return I * (R * pf + X * np.sin(np.arccos(pf))) / 10
def cable_sizing_current(
I_load: float,
derating_factor: float = 0.8,
correction_factor: float = 1.0
) -> float:
"""Calculate required cable ampacity."""
return I_load / (derating_factor * correction_factor)
def transformer_sizing() -> :
S_kVA / (efficiency * load_factor)
load_current =
voltage =
pf =
power = three_phase_power(voltage, load_current, pf)
()
Best Practices
- Use proper grounding techniques to minimize noise and ensure safety
- Include appropriate margins in component ratings for reliability
- Perform thermal analysis for power electronic components
- Consider EMI/EMC requirements early in the design process
- Use decoupling capacitors near IC power pins for noise suppression
- Follow IPC standards for PCB design and manufacturing
- Calculate worst-case conditions including temperature extremes
- Include proper fusing and overcurrent protection in designs
- Use appropriate wire gauges based on current carrying requirements
- Document schematics with clear component values and tolerances
float
complex
if
0
return
0
return
1j
2
self
def
nodal_analysis
conductances: np.ndarray,
current_sources: np.ndarray
"""Solve nodal analysis using modified nodal analysis."""
return
def
thevenin_equivalent
V_th: float,
R_th: float,
R_load: float
Tuple
float
float
float
"""Calculate Thevenin equivalent circuit parameters."""
2
return
def
power_factor_correction
apparent_power: float,
current_power_factor: float,
target_power_factor: float
Tuple
float
float
"""Calculate required capacitor for power factor correction."""
return
2
60
100e3
0.8
0.95
print
f"Required reactive power compensation: {Qc/1000:.1f} kVAR"
print
f"Required capacitance: {C*1e6:.1f} µF"
def
diode_reverse_recovery_loss
Irr: float,
trr: float,
Vr: float,
fs: float
float
"""Calculate diode reverse recovery loss."""
return
0.5
def
calculate_ripple_current
Vin: float,
Vout: float,
L: float,
fs: float,
D: float
float
"""Calculate inductor ripple current for buck converter."""
return
def
buck_converter_design
Vin: float,
Vout: float,
Io: float,
fs: float,
ripple_percent: float = 0.3
dict
"""Design basic buck converter parameters."""
2
return
"duty_cycle"
"inductance_mH"
1000
"ripple_current"
"capacitor_ripple"
12
5
2
100e3
print
f"Duty cycle: {design['duty_cycle']:.3f}"
print
f"Required inductance: {design['inductance_mH']:.2f} mH"
print
f"Ripple current: {design['ripple_current']:.3f} A"
length: float,
diameter: float
float
"""Estimate via inductance."""
return
0.2
4
def
decoupling_capacitor_selection
Cload: float,
Vsupply: float,
allowed_ripple: float,
target_impedance: float,
frequency: float
float
"""Calculate required decoupling capacitance."""
1
2
return
max
2
50
1
20
print
f"Current capacity: {current:.2f} A"
S_kVA: float,
efficiency: float = 0.97,
load_factor: float = 0.8
float
"""Calculate transformer kVA rating."""
return
150
480
0.85
print
f"Three-phase power: {power/1000:.1f} kW"