/powerskills-tool:potpourrifrom powerskills-tool
Guides through AC/DC and multi-period optimal power flow using potpourri on pandapower distribution networks. Covers curtailment, loss minimization, battery scheduling, hosting capacity studies, and infeasibility diagnosis.
Ships in powerskills-tool. 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.
Read when SKILL.md points to them; scripts run unread.
potpourri builds Pyomo AC/DC OPF models over pandapower networks. There is no PowerMCP server for it, so drive it through its Python API using the bundled scripts. Establish a credible network and base case before optimising, and a credible single period before a multi-period horizon.
scripts/inspect_case.py --case <simbench:CODE|path.json> — load, validate,
and solve the pandapower base case. Do not skip this: an OPF that fails later
is usually a data problem, and this is where data problems are cheap to find.scripts/solve_opf.py --list-solvers — confirm what is installed. AC needs an
NLP solver (IPOPT); DC needs an LP/MIP solver (GLPK, CBC, HiGHS).scripts/solve_opf.py --formulation dc --objective ext_grid_import — linear
screening for congestion and active-power headroom.scripts/solve_opf.py --formulation ac --objective <objective> — the real
answer whenever voltage, reactive power, losses, or inverter capability matters.scripts/solve_opf.py --horizon <N> --battery-penetration <pct> --seed <n> —
multi-period, only once a single period is credible.Both scripts print an engineering summary, take --json for a machine-readable
payload, and exit non-zero on genuine failure (1 = solved but not optimal,
2 = bad input, 3 = no compatible solver).
net.res_* without checking termination. The model constructor
runs pp.runpp, so net.res_* is always populated; when a solve is not
optimal potpourri skips its result mapping and those tables still hold the
base case. solve_opf.py reports no results at all in that situation.solve(to_net=True) writes nothing. It only logs that it
did. Map each step with
pyo_to_net_multi_period.pyo_sol_to_net_res(net, model, t).net.res_bus.vm_pu is a flat
1.0 placeholder. DC feasibility never establishes AC feasibility, least of all
in distribution networks where voltage and reactive power are the binding
physics.vm_pu,
element and loading_percent against its rating, MW/Mvar/MWh, and the solver's
own termination condition.Read the file that matches what you are doing; do not load them all.
references/API_REFERENCE.md — verified classes, add_OPF options, objectives,
devices, result extraction, and what is not supported.references/FORMULATION_GUIDE.md — AC vs DC, snapshot vs multi-period,
LP/NLP/MINLP consequences, and single- vs multi-period model differences.references/SOLVER_GUIDE.md — solver compatibility, termination
interpretation, and the ordered infeasibility diagnosis.references/VALIDATION_GUIDE.md — power balance, constraint checks, binding
constraints, cross-validation against pandapower, and the reporting checklist.scripts/inspect_case.py — load, validate, base power flow.scripts/solve_opf.py — build, solve, validate, and escalate.scripts/test_scripts.py — smoke tests; skips cleanly without solvers.requirements.txt — including the pandapower<3.5 pin potpourri needs.Quote the element, value, unit, and configured limit that tripped each row.
solve_opf.py emits these in its escalation payload.
| Observation | Escalate to |
|---|---|
Bus vm_pu outside the configured [min_vm_pu, max_vm_pu] band (AC only) | voltage-violation-mitigation |
res_line / res_trafo loading_percent above its configured max_loading_percent | thermal-overload-mitigation |
termination_condition is infeasible or unbounded, or curtailment exceeds 5 % of available renewable energy | operations-planning-mitigation |
Solve ends in any other non-optimal condition (other, maxIterations, maxTimeLimit), or the base pp.runpp fails | convergence-failure-mitigation |
| Net export through the external grid, or PV-driven voltage rise on a distribution feeder | der-hosting-capacity-mitigation |
| A newly added generator, storage unit, or large load causes any of the above | interconnection-impact-mitigation |
references/API_REFERENCE.md (opens in a new tab)references/FORMULATION_GUIDE.md (opens in a new tab)references/SOLVER_GUIDE.md (opens in a new tab)references/VALIDATION_GUIDE.md (opens in a new tab)requirements.txt (opens in a new tab)scripts/inspect_case.py (opens in a new tab)scripts/solve_opf.py (opens in a new tab)scripts/test_scripts.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/andesProgressive-disclosure workflow for ANDES dynamic studies. Use whenever the user wants to run ANDES through PowerMCP for power flow, small-signal / eigenvalue analysis, or time-domain simulation — even when they just say "check the damping", "is this stable", "run a fault", or "look at the oscillation modes". Exposes a solved base case before eigenvalue screening and time-domain runs. Reach for this instead of answering ANDES dynamics questions unaided./egretProgressive-disclosure workflow for Egret market and operations optimization. Use whenever the user wants to run DC-OPF, AC-OPF, or unit commitment through PowerMCP — even when they just say "what's the cheapest dispatch", "commit the units", "check for congestion", or "is this schedule feasible". Exposes the simplest credible optimization (DC-OPF) before escalating to AC-OPF or full unit commitment. Reach for this instead of answering Egret optimization questions unaided./ltspiceProgressive-disclosure workflow for LTSpice / PyLTSpice circuit simulation. Use whenever the user wants to create a netlist, run a SPICE transient or AC simulation, inspect traces, or debug LTSpice convergence through PowerMCP — even when they just say "simulate this circuit", "why won't this converge", or "plot the output". Exposes session creation and batch simulation before plotting or GUI steps. Reach for this instead of answering LTSpice questions unaided./opendssProgressive-disclosure workflow for OpenDSS distribution-feeder studies. Use whenever the user wants to compile a DSS model, solve a distribution circuit, inspect feeder bus voltages or power, sweep load multipliers, or run daily / harmonic studies through PowerMCP — even when they just say "solve this feeder", "check the voltages", or "run a daily profile". Exposes a solved base feeder before advanced scenarios. Reach for this instead of answering OpenDSS feeder questions unaided./pandapowerProgressive-disclosure workflow for pandapower power-system studies. Use whenever the user wants to load, build, or inspect a pandapower network, run AC power flow, check bus voltages or line and transformer loading, or screen N-1 contingencies — even when they just say "run a load flow", "check this case", "is anything overloaded", or name a case file like case39.json. Exposes a clean base-case solve before advanced outage studies. Reach for this instead of answering pandapower grid questions unaided./powerworldProgressive-disclosure workflow for PowerWorld Simulator studies through PowerMCP. Use whenever the user wants to open a PowerWorld case, solve the base power flow, inspect flows or voltages, change model data, run contingency analysis, or pull sensitivity matrices (PTDF, LODF, Jacobian, Ybus) — even when they just say "solve this case", "run contingencies", or "give me the PTDF". Exposes base-case operations before contingencies and matrix analytics. Reach for this instead of answering PowerWorld questions unaided.npx claudepluginhub power-agent/powerskills --plugin powerskills-toolOther plugins' skills for the same job