Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Power-Agent/PowerSkills --skill pypsagit clone --depth 1 https://github.com/Power-Agent/PowerSkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/power-agent/powerskills/pypsa)<a href="https://agentmods.dev/skills/power-agent/powerskills/pypsa"><img src="https://agentmods.dev/badge/skills/power-agent/powerskills/pypsa/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/power-agent/powerskills/pypsa"><img src="https://agentmods.dev/badge/skills/power-agent/powerskills/pypsa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00118 | $0.00780 |
| Opus 5.5 | $0.00047 | $0.00312 |
| Sonnet 5.5 | $0.00024 | $0.00156 |
| Haiku 4.5 | $0.00012 | $0.00078 |
Grade A, and why
pypsa scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PyPSA workflow
Start by creating or loading a named network handle. Use network inspection before optimization, and use operational optimization before investment optimization.
Default tool ladder
load_network(file_path)orcreate_network(...)to create the active network handle.get_network_info(network_name)andget_component_details(...)to understand topology, assets, and time series.run_power_flow(network_name, linear=False)for feasibility checks.optimize_network(network_name, ...)for dispatch or operational studies.optimize_investment(network_name, ...)for expansion questions.import_from_csv_folder(...)orexport_to_csv_folder(...)once the network state is worth moving.
Example sequence
Using the case39.nc network shipped with this skill:
load_network("case39.nc") -> network "case39" active, 39 buses
get_network_info("case39") -> 10 generators, 46 branches, 19 loads
run_power_flow("case39", linear=False) -> converged, max branch loading 87%
optimize_network("case39", solver_name="highs") -> feasible dispatch, hourly cost reported
Feasibility first, then dispatch. Only move to optimize_investment once a dispatch
study cannot answer the question.
Working rules
- Do not jump straight into expansion optimization when a dispatch study can answer the question.
- Use AC or DC power flow to sanity-check a network before relying on optimization outputs.
- Treat PyPSA as a planning and scheduling engine, not the final authority on detailed reactive mitigation.
Escalation triggers
Quote the numbers that tripped each row (bus + v_mag_pu, element + loading, infeasibility cause) rather than saying "it failed".
| Observation | Escalate to |
|---|---|
Bus v_mag_pu < 0.95 or > 1.05 on an AC power flow |
voltage-violation-mitigation |
Line or transformer loaded > 100% of s_nom |
thermal-overload-mitigation |
run_contingency_analysis N-1 overload or post-outage islanding |
contingency-mitigation |
optimize_network / optimize_investment infeasible, reserve-short, or heavily curtailed |
operations-planning-mitigation |
run_power_flow fails to converge |
convergence-failure-mitigation |
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- case39.nc 54 KB
- references/API_REFERENCE.md 9.2 KB
- references/EXAMPLES.md 17 KB
- requirements.txt 670 B
- scripts/build_case39.py 4.6 KB runs code
- scripts/contingency_analysis.py 16 KB runs code
- scripts/expansion_analysis.py 13 KB runs code
- scripts/network_analysis.py 9.4 KB runs code
- scripts/optimization_analysis.py 12 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 56 lines · 118 tokens per session scan A b68ff038069c
pypsa is a skill published in the GitHub repository Power-Agent/PowerSkills (88 stars, last pushed 1mo ago), licensed MIT. It adds 118 tokens to every session and 780 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
pypsa compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pypsaPower-Agent/PowerSkills | Skill | 88 | 1mo ago | MIT | A | 118 | Claude Code |
| jupyter-notebookNousResearch/hermes-agent | Skill | 268k | today | MIT | A | 18 | Claude Code, Codex |
| matlabK-Dense-AI/scientific-agent-skills | Skill | 59k | 2d ago | MIT | A | 44 | Claude Code |
| pennylaneK-Dense-AI/scientific-agent-skills | Skill | 59k | 2d ago | MIT | A | 74 | Claude Code |
| cuequivariance-jaxNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 38 | Claude Code, Codex |
| cuequivariance-torchNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 37 | Claude Code, Codex |
| cuopt-numerical-optimization-apiNVIDIA/skills | Skill | 4.3k | today | Apache-2.0 | A | 51 | Claude Code, Codex |