pandapower
Power systems analysis and optimization library (pandapower v3.4.0). Use when working with electric power networks: building network models (buses, lines, transformers, loads, generators), running AC/DC power flow, optimal power flow (OPF), short circuit calculations (IEC 60909), state estimation, time series simulations, network topology analysis, or visualizing power grids in Python.
Best use case
pandapower is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Power systems analysis and optimization library (pandapower v3.4.0). Use when working with electric power networks: building network models (buses, lines, transformers, loads, generators), running AC/DC power flow, optimal power flow (OPF), short circuit calculations (IEC 60909), state estimation, time series simulations, network topology analysis, or visualizing power grids in Python.
Teams using pandapower should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/pandapower/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How pandapower Compares
| Feature / Agent | pandapower | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Power systems analysis and optimization library (pandapower v3.4.0). Use when working with electric power networks: building network models (buses, lines, transformers, loads, generators), running AC/DC power flow, optimal power flow (OPF), short circuit calculations (IEC 60909), state estimation, time series simulations, network topology analysis, or visualizing power grids in Python.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# pandapower
## Overview
pandapower is an open-source Python library for automated analysis and optimization of power systems. It stores network data as pandas DataFrames, provides Newton-Raphson and other power flow solvers (including C++ backends via lightsim2grid and PowerGridModel), and supports advanced studies including OPF, short circuit (IEC 60909), three-phase unbalanced flow, and state estimation.
**Version:** v3.4.0
**Language:** Python
**License:** BSD 3-Clause
**Authors:** University of Kassel (e2n) and Fraunhofer IEE
## Quick Start
```python
import pandapower as pp
# Create network
net = pp.create_empty_network(f_hz=50.)
# Add buses
b_hv = pp.create_bus(net, vn_kv=110., name="HV Bus")
b_mv = pp.create_bus(net, vn_kv=20., name="MV Bus")
# Add external grid (slack/reference)
pp.create_ext_grid(net, bus=b_hv, vm_pu=1.02)
# Add transformer (uses built-in standard type library)
pp.create_transformer(net, hv_bus=b_hv, lv_bus=b_mv, std_type="25 MVA 110/20 kV")
# Add load
pp.create_load(net, bus=b_mv, p_mw=10.0, q_mvar=2.0)
# Run AC power flow
pp.runpp(net)
# Inspect results (stored in net.res_* DataFrames)
print(net.res_bus[["vm_pu", "va_degree"]])
print(net.res_trafo[["loading_percent"]])
print(f"Converged: {net.converged}")
```
## Core Concepts
- **Network as DataFrames:** All elements stored as pandas DataFrames (`net.bus`, `net.line`, `net.load`, etc.); results in `net.res_*` tables after power flow.
- **Consumer sign convention:** Positive `p_mw` means consumption for loads; positive `p_mw` means generation for generators/sgens.
- **Standard types:** Built-in library of line and transformer types; custom types supported via `create_std_type()`.
- **Per-unit system:** Voltages in per unit (p.u.) with `sn_mva` as base; power in MW/Mvar; impedances in ohm/km.
- **In-place results:** `runpp()` and other solvers write results to `net.res_*` tables; check `net.converged` after each run.
- **Modular subpackages:** `pandapower.topology`, `pandapower.plotting`, `pandapower.shortcircuit`, `pandapower.estimation`, `pandapower.timeseries`, `pandapower.control` are separate namespaces.
## API Reference
| Domain | File | Description |
|--------|------|-------------|
| Network Creation | [api-network.md](references/api-network.md) | Buses, lines, transformers, loads, generators, switches, standard types, predefined networks |
| Power Flow | [api-powerflow.md](references/api-powerflow.md) | AC/DC power flow, OPF, 3-phase flow, short circuit, state estimation, result tables |
| Topology | [api-topology.md](references/api-topology.md) | Graph creation, connectivity, distance, island detection |
| Plotting | [api-plotting.md](references/api-plotting.md) | Matplotlib simple plot, custom collections, Plotly interactive, geodata |
| Toolbox | [api-toolbox.md](references/api-toolbox.md) | Element selection, network modification, file I/O, comparison, time series |
| Workflows | [workflows.md](references/workflows.md) | Complete working examples for common studies |
## Common Workflows
- **Build network from scratch:** See [api-network.md](references/api-network.md), then [workflows.md](references/workflows.md#quick-start)
- **AC power flow:** `pp.runpp(net)` — See [api-powerflow.md](references/api-powerflow.md#ac-power-flow)
- **Optimal power flow:** add cost functions + limits, then `pp.runopp(net)` — See [workflows.md](references/workflows.md#optimal-power-flow-workflow)
- **Short circuit:** `pp.shortcircuit.calc_sc(net, fault="3ph")` — See [api-powerflow.md](references/api-powerflow.md#short-circuit-calculation)
- **Plot network:** `pp.plotting.simple_plot(net)` — See [api-plotting.md](references/api-plotting.md)
- **Use benchmark network:** `pp.networks.case14()`, `pp.networks.mv_oberrhein()` — See [api-network.md](references/api-network.md#predefined-networks)
- **Time series simulation:** See [api-toolbox.md](references/api-toolbox.md#time-series) and [workflows.md](references/workflows.md#time-series-analysis)
- **N-1 contingency analysis:** See [workflows.md](references/workflows.md#contingency-analysis)
## Key Considerations
- **Convergence:** Always check `net.converged` after running power flow. Non-convergence often indicates voltage angle issues — try `init="dc"` or `algorithm="iwamoto_nr"`.
- **Geodata format:** Networks created before v2.7 use legacy `bus_geodata`/`line_geodata` DataFrames; run `pp.plotting.geo.convert_geodata_to_geojson(net)` to upgrade.
- **OPF requires cost functions:** `runopp()` will fail without at least one cost function (`create_poly_cost` or `create_pwl_cost`); all controlled elements need `min_p_mw`/`max_p_mw` limits.
- **Solver backends:** Install `lightsim2grid` or `power-grid-model` for 10-100x speedup on large networks; pandapower uses them automatically when available (`pip install pandapower[pgm]`).
- **Three-phase flow:** `runpp_3ph()` is available at the top level (`pp.runpp_3ph(net)`) since it is imported from `pandapower.pf.runpp_3ph` in `__init__.py`.
- **Short circuit:** `calc_sc()` lives in `pandapower.shortcircuit`; single-phase faults require transformer zero-sequence parameters (`vk0_percent`, `vkr0_percent`).Related Skills
rocm
AMD ROCm GPU computing stack for HIP kernel development and GPU-accelerated library usage. Use when: writing HIP kernels (.hip files), using rocBLAS/rocFFT/rocRAND/rocSOLVER/rocSPARSE/hipBLAS/hipBLASLt/hipTensor/hipSPARSELt/rocALUTION compute libraries, profiling with rocProfiler or rocprof, porting CUDA code to HIP, building CMake/Makefile projects targeting AMD GPUs, using HIP Graphs for low-overhead kernel replay, or debugging GPU code with rocGDB.
powergridmodel
Python library for steady-state distribution power system analysis (power flow, state estimation, short-circuit calculations). Use when working with the power-grid-model library to: (1) perform load flow or Newton-Raphson/iterative calculations on electrical grids, (2) run state estimation with sensor data, (3) compute IEC 60909 short-circuit currents, (4) execute batch/time-series or N-1 contingency simulations, or (5) work with grid component types (node, line, transformer, source, sym_load, etc.) and numpy structured arrays.
opencl
OpenCL SDK (Khronos Group) for cross-platform GPU/CPU parallel computing in C and C++. Use when writing OpenCL kernels, managing devices/contexts/queues, allocating and transferring buffers or images, building and executing programs, or using the C++ wrapper (opencl.hpp / cl::CommandQueue, cl::Buffer, cl::KernelFunctor). Covers OpenCL C API, C++ bindings, and SDK utility libraries (OpenCLUtils, OpenCLSDK).
ollama
Run and manage local LLMs via Ollama REST API — text generation, chat completions, embeddings, tool calling, structured output, and model management. Use when code imports ollama, references localhost:11434, or user asks about local LLM inference.
llamacpp
Complete llama.cpp C/C++ API reference covering model loading, inference, text generation, embeddings, chat, tokenization, sampling, batching, KV cache, LoRA adapters, and state management. Triggers on: llama.cpp questions, LLM inference code, GGUF models, local AI/ML inference, C/C++ LLM integration, "how do I use llama.cpp", API function lookups, implementation questions, troubleshooting llama.cpp issues, and any llama-cpp or ggerganov/llama.cpp mentions.
greycat
Build, run, and edit GreyCat projects. GreyCat is a statically-typed language plus runtime for graph-persistent, time-series-aware applications. Use when reading or writing `.gcl` source, when the user mentions GreyCat / project.gcl / nodeTime / nodeList / nodeIndex / nodeGeo / @expose / @library, or when the task involves running `greycat <command>`, deploying a project, or reasoning about gcdata/, lib/, files/, webroot/.
greycat-c
GreyCat C API and GCL Standard Library reference. Use for: (1) Native C development with gc_machine_t context, tensors, objects, memory management, crypto, I/O; (2) GCL Standard Library modules - std::core (Date/Time/Tuple/geospatial types), std::runtime (Scheduler/Task/Logger/User/Security/System/OpenAPI/MCP), std::io (CSV/JSON/XML/HTTP/Email/FileWalker), std::util (Queue/Stack/SlidingWindow/Gaussian/Histogram/Quantizers/Random/Plot); (3) Plugin development patterns - lifecycle hooks, type configuration, nativegen, module-level and type-level function linking, global state, thread safety, conditional logging. Keywords: GreyCat, GCL, native functions, tensors, task automation, scheduler, plugin development.
ggml
C tensor computation library for ML inference and training. Use when working with ggml graphs, GGUF model files, backend scheduling, quantization, or implementing low-level ML ops in C/C++.
cuda
NVIDIA CUDA parallel computing platform — use when writing .cu kernels, using cuBLAS/cuDNN/cuFFT/cuSPARSE/cuRAND/cuSolver, Thrust, or Cooperative Groups for GPU-accelerated computing
blas_lapack
Complete CBLAS and LAPACKE C API reference (LAPACK v3.12.1) covering 1284 functions for numerical linear algebra: BLAS Level 1/2/3 vector and matrix operations, linear system solvers (LU, Cholesky, LDL), eigenvalue/eigenvector computation, singular value decomposition, least squares, QR/LQ factorizations, and auxiliary routines. Triggers on: BLAS/LAPACK questions, CBLAS/LAPACKE code, linear algebra in C/C++, matrix operations, numerical computing, scientific computing, HPC, linking BLAS/LAPACK.
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
swe-cli-skills
Senior engineer CLI expertise for AI agents — workflows, safety guardrails, gotchas, and anti-patterns across cloud, IaC, containers, databases, dev tools, and platforms