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 nimabahrami/pypsa-skills-kit --skill pypsa-solve-and-debuggit clone --depth 1 https://github.com/nimabahrami/pypsa-skills-kitWrote 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/nimabahrami/pypsa-skills-kit/pypsa-solve-and-debug)<a href="https://agentmods.dev/skills/nimabahrami/pypsa-skills-kit/pypsa-solve-and-debug"><img src="https://agentmods.dev/badge/skills/nimabahrami/pypsa-skills-kit/pypsa-solve-and-debug/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/nimabahrami/pypsa-skills-kit/pypsa-solve-and-debug"><img src="https://agentmods.dev/badge/skills/nimabahrami/pypsa-skills-kit/pypsa-solve-and-debug.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.00128 | $0.00745 |
| Opus 5 | $0.00064 | $0.00373 |
| Sonnet 5 | $0.00026 | $0.00149 |
| Haiku 4.5 | $0.00013 | $0.00075 |
Grade A, and why
pypsa-solve-and-debug 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 10d 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 — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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/solve_network_* + solver log first; solver config under
solving:; re-run one rule w/snakemake -call <target>(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_cost<=0 | neg marginal_cost w/o p_nom limit | efficiency>1 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 fix_optimal_capacities / p_nom_set | stochastic set_scenarios + CVaR | IIS (Gurobi) | transmission_losses | linearized UC (LP prices) | UC gotchas (snapshots-not-hours, up_time_before=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.
What ships with it
5 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.
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.
- 10d ago First seen · 33 lines · 0 tokens per session scan A a703931e5a35
pypsa-solve-and-debug is a skill published in the GitHub repository nimabahrami/pypsa-skills-kit (23 stars, last pushed 2mo ago), licensed MIT. It adds 128 tokens to every session and 745 once invoked, about $0.0006 per session on Opus 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.
Other skills, from other repositories
trace
Evidence-driven tracing lane that orchestrates competing tracer hypotheses in Claude built-in team mode.
smiles-validation
Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.
social-physics-filter
Unified boundary enforcement, interpersonal diagnostic, and relational audit engine. Absorbs 40 psychology + 2 social protocols and all relationship case studies.
cnsplots
Create, revise, and troubleshoot publication-ready scientific plots in Python with cnsplots, including distribution, regression, heatmap, genomics, survival, set, flow, and multi-panel figures. Use when a user asks for cnsplots code, Cell/Nature/Science-style visualization, precise physical figure dimensions…
relax-dev-debug
Develop and debug the Relax reinforcement learning project. Use this skill whenever modifying code in the relax/ directory, or running remote training jobs on a Ray cluster for validation. Also use it when the user mentions training, debugging training runs, submitting Ray jobs, or fixing training errors.
anomaly-characterization
SOP: Describe and classify anomalous phenomena that existing theory cannot explain.