Install
$ agentstack add skill-nimabahrami-pypsa-skills-kit-pypsa-solve-and-debug ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
PyPSA Solve & Debug
Solver selection
- HiGHS = open-source default. LPs to ~1e7 nonzeros OK | MILP weaker.
- Gurobi/CPLEX/COPT = licensed. USE: barrier (method=2) + crossover=0 for big planning LPs. ! barrier duals w/o crossover valid but less clean -> price analysis: enable crossover.
- MILP (committable units | discrete expansion) -> orders-of-magnitude slowdown. SET: mip gap consciously. ! 1e-3 default gap hides real money in big objectives. ! MILP = no duals/prices -> fixed-commitment LP pricing run: pypsa-market-design.
Failure triage, in order
- PyPSA-Eur/Snakemake project -> READ logs/solvenetwork* + solver log first; solver config under
solving:; re-run one rule w/snakemake -call(pypsa-network-modeling/references/framework-workflows.md). - RUN:
n.consistency_check()+ pypsa-physical-realism validator FIRST. Most "solver problems" = data problems. - infeasible -> references/infeasibility.md + scripts/diagnose_infeasibility.py.
- unbounded -> free profitable machine: extendable w/ capital_cost1 loop. RUN: realism validator (catches all 3).
- numerical trouble (barrier stalls | "numerical difficulties") -> scale model. SET: cost coefficients within ~1e-2..1e6 of each other. ! avoid 1e9 "bigM" capacities -> use 'inf'-free explicit caps. Gurobi: NumericFocus=3, Aggregate=0.
- slow -> references/performance.md (clustering | rolling horizon | aggregation).
Native optimize() levers
! READ references/optimize-levers.md BEFORE hand-rolling any of: rolling horizon (3 traps) | two-stage via fixoptimalcapacities / pnomset | stochastic setscenarios + CVaR | IIS (Gurobi) | transmissionlosses | linearized UC (LP prices) | UC gotchas (snapshots-not-hours, uptimebefore=1) | MGA near-optimal | N-1 SCLOPF.
Result interpretation
READ: references/interpreting-results.md = n.statistics | energy balances | duals/shadow prices | curtailment | sanity battery. RUN: sanity battery on EVERY solved model before reporting numbers.
Reproducibility
- SET: pin solver version + options in result metadata.
- ! barrier deterministic-ish | concurrent methods not -> degenerate optima flip dispatch between runs w/ identical objectives.
- USE: tie-breaking cost noise (1e-3 jitter) -> stabilizes plots.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: nimabahrami
- Source: nimabahrami/pypsa-skills-kit
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.