Potpourri logo

Potpourri

Organization
Power-Agent
potpourri

Progressive-disclosure workflow for potpourri (opf-potpourri) AC/DC and multi-period optimal power flow on pandapower distribution networks, including storage and flexible resources. Use whenever the user wants to optimise rather than just simulate a pandapower or SimBench grid — curtail or redispatch PV, minimise voltage deviation, losses, reactive power or grid import, run a DC screening OPF, build a multi-period or 96-step OPF with batteries, study hosting capacity, or diagnose an infeasible OPF — even when they just say "optimise this feeder", "minimise losses", "schedule the batteries", or "why is my OPF infeasible". Reach for this instead of answering potpourri or Pyomo OPF questions unaided. For a plain load flow with no optimisation, use the pandapower skill instead.

Overview

PublisherPower-Agent
RepositoryPowerSkills
Skill namepotpourri
Stars
77
Forks
23
Bundled files
8
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Power-Agent on GitHub. Read the source before you install it.

Installation

Install the Potpourri AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Power-Agent/PowerSkills/tree/main/powerskills-tool/skills/potpourri
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Power-Agent/PowerSkills.git /tmp/PowerSkills
mkdir -p .claude/skills
cp -r /tmp/PowerSkills/powerskills-tool/skills/potpourri .claude/skills/potpourri
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Potpourri in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Potpourri on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Potpourri is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

potpourri workflow

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.

Default ladder

  1. 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.
  2. 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).
  3. scripts/solve_opf.py --formulation dc --objective ext_grid_import — linear screening for congestion and active-power headroom.
  4. scripts/solve_opf.py --formulation ac --objective <objective> — the real answer whenever voltage, reactive power, losses, or inverter capability matters.
  5. 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).

Working rules

  • Never read 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.
  • Multi-period 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).
  • DC gives no voltage answer. After a DC OPF 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.
  • A local NLP optimum is not a global one. IPOPT on a nonconvex AC OPF gives a locally optimal point; say "locally optimal", and never claim global optimality without a global solver reporting it.
  • Quote numbers, units, and the limit that was configured — bus and vm_pu, element and loading_percent against its rating, MW/Mvar/MWh, and the solver's own termination condition.
  • Match the objective to the question and state its side effects: voltage- deviation minimisation puts no value on energy, so where curtailment is free it will curtail everything. Check the reported curtailment before accepting a dispatch.

Reference material

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.

Local assets in this skill

  • 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.

Escalation triggers

Quote the element, value, unit, and configured limit that tripped each row. solve_opf.py emits these in its escalation payload.

ObservationEscalate 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_percentthermal-overload-mitigation
termination_condition is infeasible or unbounded, or curtailment exceeds 5 % of available renewable energyoperations-planning-mitigation
Solve ends in any other non-optimal condition (other, maxIterations, maxTimeLimit), or the base pp.runpp failsconvergence-failure-mitigation
Net export through the external grid, or PV-driven voltage rise on a distribution feederder-hosting-capacity-mitigation
A newly added generator, storage unit, or large load causes any of the aboveinterconnection-impact-mitigation

Deliver

  • Network source and size, study type and formulation, horizon and resolution.
  • Objective, what it means in units, and the solver plus its termination condition.
  • Power balance, voltage extrema with buses, worst line and transformer loading, dispatch by group, curtailment, and storage SOC extrema where relevant.
  • Binding constraints, and limitations (local optimum, DC assumptions, storage modelling caveats).
  • Any justified escalation, with the numbers behind it.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Potpourri AI skill do?

Progressive-disclosure workflow for potpourri (opf-potpourri) AC/DC and multi-period optimal power flow on pandapower distribution networks, including storage and flexible resources. Use whenever the user wants to optimise rather than just simulate a pandapower or SimBench grid — curtail or redispatch PV, minimise voltage deviation, losses, reactive power or grid import, run a DC screening OPF, build a multi-period or 96-step OPF with batteries, study hosting capacity, or diagnose an infeasible OPF — even when they just say "optimise this feeder", "minimise losses", "schedule the batteries"...

Why use Potpourri on TypingMind?

Because you install it once and use it with any model. Potpourri is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Potpourri in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Power-Agent/PowerSkills/tree/main/powerskills-tool/skills/potpourri. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Potpourri?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Potpourri?

As many as you like. As long as a model supports skills, you can use Potpourri with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Potpourri AI skill free?

Yes. It is published on GitHub by Power-Agent under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇