Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks mesh and solver sensitivity, and compares predicted voltage curves with…

MITAuto-check passedResearch & Science

Install Pybamm

skills CLI
$ npx skills add K-Dense-AI/scientific-agent-skills --skill pybamm -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install K-Dense-AI/scientific-agent-skills pybamm --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pybamm .claude/skills/pybamm && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pybamm
GitHub stars
48k
Used in
1 other repo
Token cost
~1.8k tokens
SKILL.md length
733 words
Files
4 (incl. scripts, references, assets)
Skills in repo
153
Repo updated
First seen
Licence
MIT

At a glance

Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks mesh and solver sensitivity, and compares predicted voltage curves with…

  • Works in 6 steps: Establish the cell chemistry, geometry,… → Convert the requested protocol to the… → Choose SPM when its reduced transport… → …
  • DFN electrochemical battery modeling
  • SKILL.md covers When to use, Runtime and tested case, Workflow and Run and inspect, plus 1 more section
  • Runs Python scripts from its folder; calls uv and python

What it does

Pybamm is an agent skill from K-Dense-AI/scientific-agent-skills. Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks mesh and solver sensitivity, and compares predicted voltage curves with measured cycling data. Use for SPM or DFN electrochemical battery modeling, C-rate protocols, voltage cutoffs, parameter studies and numerical validation of battery simulations.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts, reference files and assets (for example `assets/chen2020-protocol.json`, `references/protocol-and-comparison.md` and `scripts/simulate_battery.py`). Compatibility notes: Requires Python 3.12 with PyBaMM 26.9.0.0 and pybammsolvers 0.10.0 (IDAKLU). NumPy and CasADi are supplied by PyBaMM. Network is needed for installation and…

It sits in Research & Science. The repository describes itself as: Turn any AI agent into an AI Scientist. The 1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific… The licence is MIT.

When your agent uses it

  • DFN electrochemical battery modeling
  • C-rate protocols
  • Voltage cutoffs
  • Parameter studies and numerical validation of battery simulations

Example prompts

  • “Use the pybamm skill to simulate lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks…”
  • “/pybamm”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires Python 3.12 with PyBaMM 26.9.0.0 and pybammsolvers 0.10.0 (IDAKLU). NumPy and CasADi are supplied by PyBaMM. Network is needed for installation and optional upstream dataset retrieval; bundled simulations and CSV comparisons run locally without credentials.

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Establish the cell chemistry, geometry, nominal capacity, initial state, temperature and
  2. Convert the requested protocol to the JSON contract in
  3. Choose SPM when its reduced transport assumptions are adequate; use DFN when resolving
  4. Run the helper. It validates protocol fields, rejects unknown or overridden-by-protocol
  5. Read the two numerical comparisons separately: baseline versus tighter tolerances isolates
  6. If measurements are available, check current, time origin, temperature, SOC and capacity

What it can do on your machine

Read from SKILL.md and the folder at commit 92ace75. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.pybamm.org
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Python 3.12 with PyBaMM 26.9.0.0 and pybammsolvers 0.10.0 (IDAKLU). NumPy and CasADi are supplied by PyBaMM. Network is needed for installation and optional upstream dataset retrieval; bundled simulations and CSV comparisons run locally without credentials.

    From compatibility in the SKILL.md frontmatter.

Context cost

Pybamm loads about 1.8k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 733 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from K-Dense-AI/scientific-agent-skills at commit 92ace75, republished under its MIT licence (© K-Dense-AI). 733 words, ~1,822 tokens.

Download SKILL.mdSave it as .claude/skills/pybamm/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
pybamm
description
Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks mesh and solver sensitivity, and compares predicted voltage curves with measured cycling data. Use for SPM or DFN electrochemical battery modeling, C-rate protocols, voltage cutoffs, parameter studies and numerical validation of battery simulations.
compatibility
Requires Python 3.12 with PyBaMM 26.9.0.0 and pybammsolvers 0.10.0 (IDAKLU). NumPy and CasADi are supplied by PyBaMM. Network is needed for installation and optional upstream dataset retrieval; bundled simulations and CSV comparisons run locally without credentials.
license
MIT
metadata.version
1.1
metadata.skill-author
K-Dense Inc.
metadata.upstream-version
26.9.0.0
metadata.last-reviewed
2026-10-01

PyBaMM battery experiments

When to use

Use this skill to model single-cell constant-current charge/discharge and rest, examine voltage and charge trajectories, or compare SPM/DFN predictions to cycling measurements. The helper runs real PyBaMM experiments and three numerical resolutions; it does not control a battery cycler or establish an operating envelope for hardware.

Runtime and tested case

bash
uv venv --python 3.12 battery-env
uv pip install --python battery-env/bin/python pybamm==26.9.0.0 pybammsolvers==0.10.0

This release requires pybammsolvers>=0.10.0, NumPy 2 or newer, and CasADi 3.8.1. The tested environment used Python 3.12.10, NumPy 2.5.3 and SciPy 1.18.1. IDAKLU is the recommended solver; CasadiSolver and ScipySolver are deprecated in this release. Refer to the 26.9.0.0 manual below, since latest can describe unreleased APIs.

The included assets/chen2020-protocol.json is a synthetic isothermal 298.15-K SPM case: 80% initial SOC, discharge at 0.5C for 600 s, rest for 120 s, charge at 0.5C for 600 s. Chen2020 supplies an LG M50 parameterization with 5-Ah nominal capacity; here 0.5C means 2.5 A. This is an executable reference example, not a claim that an arbitrary user's cell has those parameters. The helper disables PyBaMM usage telemetry unless the caller has already explicitly configured that variable.

Workflow

  1. Establish the cell chemistry, geometry, nominal capacity, initial state, temperature and current-sign convention. Use an appropriate parameter set and explain its source. Distinguish a paper's fitted parameters from measurements of this particular cell. Do not transplant degradation parameters without checking their meaning and applicable conditions.
  2. Convert the requested protocol to the JSON contract in references/protocol-and-comparison.md. Positive simulation current discharges; negative current charges. Every step has a finite duration. A specified voltage cutoff can end it earlier; the report records actual termination times. C-rates use the selected set's nominal capacity. A change in that capacity changes current.
  3. Choose SPM when its reduced transport assumptions are adequate; use DFN when resolving electrolyte/electrode transport matters. The helper's tested models are isothermal and exclude aging, mechanics, plating and pack control. Increasing rate can invalidate SPM predictions even if numerical convergence is excellent.
  4. Run the helper. It validates protocol fields, rejects unknown or overridden-by-protocol parameter inputs, uses IDAKLU, and snapshots the base parameters after SOC initialization. Keep the protocol with that snapshot: experiment steps supply their own currents. Infeasible or skipped steps are errors, rather than silently presenting a partial protocol as complete.
  5. Read the two numerical comparisons separately: baseline versus tighter tolerances isolates solver error; tight tolerances on the original versus doubled mesh isolates discretization. Compare voltage differences and event-time differences against the accuracy the question needs. Refine again when these are too large; one doubling does not prove convergence.
  6. If measurements are available, check current, time origin, temperature, SOC and capacity before interpreting residuals. Supply matching seconds, volts and amps. The helper reports voltage RMSE/MAE/bias and current RMSE, preserving residuals. A small voltage error under a mismatched input current does not validate the model. This workflow compares curves; it does not claim to identify unique kinetic parameters from voltage alone.
Show full SKILL.md (250 more words)Show less

Run and inspect

From the skill directory, point battery-env/bin/python at the environment created above:

bash
battery-env/bin/python scripts/simulate_battery.py assets/chen2020-protocol.json \
  --output battery-reference

# measured.csv is user data with time_s,voltage_V,current_A columns.
battery-env/bin/python scripts/simulate_battery.py protocol.json \
  --measured measured.csv --mesh-points 30 --output battery-comparison

The first command was executed as written with an external output location. The second uses illustrative user filenames; the measurement path was exercised against a frozen synthetic reference curve in the tests. Output directories must be new.

ArtifactInterpretation
curve.csvBaseline time, step, voltage, current and net discharge capacity
tight-tolerance.csvSame mesh, tighter solver
refined-mesh.csvDoubled mesh with tighter solver
parameters.jsonBase parameters after SOC initialization; step currents remain in the protocol
report.jsonProtocol/checksum, package versions, parameter source, numerical comparisons and terminations
measurement-residuals.csvPrediction minus measurement and current mismatch, when measurements were supplied

The reference case conserved integrated charge: 600 s at 2.5 A yielded 0.4166667 Ah, then equal charge returned net discharge capacity to zero. Voltage stayed within the Chen2020 limits in this case. Tightening tolerances changed voltage by about 1 microvolt; doubling mesh from 20 to 40 points changed it by about 2.17 mV, so claiming sub-millivolt mesh accuracy would be unjustified. A separate real DFN test stopped at the requested 3.9-V event and verified its charge integral. Native tests also exercise charge cutoff, infeasible discharge, capacity-to-current conversion, and replay of the exported SOC-adjusted parameters without reinitializing SOC. The frozen reference is numerical regression evidence, not measured-cell validation.

Primary references

The linked release manuals, bundled helper, parameter serialization and optional DataLoader recipe in the reference were verified against PyBaMM 26.9.0.0.

© K-Dense-AI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references, assets) in skills/pybamm of K-Dense-AI/scientific-agent-skills.

  • SKILL.md
  • assets/chen2020-protocol.json
  • references/protocol-and-comparison.md
  • scripts/simulate_battery.py

Open the folder on GitHubat commit 92ace75

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in K-Dense-AI/scientific-agent-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Pybamm next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pybamm compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pybamm this skillK-Dense-AI/scientific-agent-skills48k1 repos~1.8kAutomated safety check: PassMIT
Hypothesis Generationspacering-net/codeg3.9k14 repos~3.6kAutomated safety check: NotesMIT
GitHub Deep Researchbytedance/deer-flow84k4 repos~1.3kAutomated safety check: PassMIT
Nature Paper CardYuan1z0825/nature-skills47k2 repos~2.1kAutomated safety check: PassApache-2.0
Content Research Writerweapp-tailwindcss/weapp-tailwindcss1.9k25 repos~3.5kAutomated safety check: PassMIT
Last30daysmvanhorn/last30days-skill64k—~7.9kAutomated safety check: NotesMIT

Similar skills

  • Hypothesis Generation

    spacering-net/codeg

    Structured hypothesis formulation from observations. An agent skill from spacering-net/codeg.

    3.9k GitHub starsUsed in 14 repos~3.6k tokens
    Research & ScienceAuto-check: notes
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    84k GitHub starsUsed in 4 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Nature Paper Card

    Yuan1z0825/nature-skills

    Builds a structured deep-reading card for one scientific paper, covering methods, how experiments support claims, limitations and research ideas, with a script to prepare the source.

    47k GitHub starsUsed in 2 repos~2.1k tokens
    Research & ScienceAuto-check passed
  • Content Research Writer

    weapp-tailwindcss/weapp-tailwindcss

    Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section.

    1.9k GitHub starsUsed in 25 repos~3.5k tokens
    Research & ScienceAuto-check passed
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.9k tokensUpdated yesterday
    Research & ScienceAuto-check: notes
  • Peer Review

    spacering-net/codeg

    Structured manuscript/grant review with checklist-based evaluation.

    3.9k GitHub starsUsed in 17 repos~5.9k tokens
    Research & ScienceAuto-check: notes

More from K-Dense-AI/scientific-agent-skills

All 153 skills in this repo
  • 13C Metabolic Flux Analysis

    K-Dense-AI/scientific-agent-skills

    Estimates reaction fluxes inside cells from steady-state carbon-13 labeling data with a bundled mfapy-based solver, and reports which fluxes the data pin down.

    48k GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed
  • Analytical Method Validation Planner

    K-Dense-AI/scientific-agent-skills

    Plans, runs, and documents analytical method validation, verification, or transfer studies under ICH Q2(R2)/Q14, USP, ICH M10, CLSI EP, or ISO/IEC 17025.

    48k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check: notes
  • Cantera Ignition Delay

    K-Dense-AI/scientific-agent-skills

    Runs Cantera constant-volume or constant-pressure ignition simulations and reports temperature-based ignition delay with mechanism provenance and checks.

    48k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • DiffDock Molecular Docking

    K-Dense-AI/scientific-agent-skills

    Predicts how small molecules bind to a protein with DiffDock, covering batch docking, pose ranking by confidence and checks on the results; not for binding affinity.

    48k GitHub starsUsed in 1 repo~3k tokens
    Auto-check: notes
  • HypoGeniC Hypothesis Generation

    K-Dense-AI/scientific-agent-skills

    Plans and audits runs of the HypoGeniC and HypoRefine packages, which propose hypotheses from labeled text datasets, with local checks before any model call.

    48k GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • ISO Standards Readiness Evidence

    K-Dense-AI/scientific-agent-skills

    Organizes scope, controlled documents, risk files and traceability into draft evidence for human review against ISO 13485, 14971, 17025 and 15189.

    48k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check: notes

Questions about Pybamm

What does Pybamm do?

Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks mesh and solver sensitivity, and compares predicted voltage curves with…. Pybamm is an agent skill from K-Dense-AI/scientific-agent-skills. Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks mesh and solver sensitivity, and compares predicted voltage curves with measured cycling data.

When should I use Pybamm?

Pybamm fits situations like: DFN electrochemical battery modeling; C-rate protocols; voltage cutoffs; parameter studies and numerical validation of battery simulations.

How do I install Pybamm in Claude Code?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill pybamm -a claude-code`. Or copy the skill folder (skills/pybamm in K-Dense-AI/scientific-agent-skills) into .claude/skills/pybamm in your project. Claude Code loads it when a task matches its description.

How do I install Pybamm in Codex?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill pybamm -a codex`. Or copy the skill folder (skills/pybamm in K-Dense-AI/scientific-agent-skills) into .agents/skills/pybamm in your project. Codex loads it when a task matches its description.

Can I use Pybamm in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add K-Dense-AI/scientific-agent-skills --skill pybamm -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pybamm, .gemini/skills/pybamm, .github/skills/pybamm and .opencode/skills/pybamm in your project.

What does Pybamm need to run?

Going by SKILL.md and its folder, Pybamm needs Python for the scripts in its folder and the command-line tools its instructions call (uv and python). Our summary lists: Python 3. Compatibility (from SKILL.md): Requires Python 3.12 with PyBaMM 26.9.0.0 and pybammsolvers 0.10.0 (IDAKLU). NumPy and CasADi are supplied by PyBaMM. Network is needed for installation and optional upstream dataset retrieval; bundled simulations and CSV comparisons run locally without credentials..

Does Pybamm access the network?

SKILL.md names 2 domains. As links in the text: docs.pybamm.org and github.com. This is read from the text; nothing was executed.

Is Pybamm safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Pybamm use?

Pybamm is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pybamm use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Pybamm?

Skills that share tags, products or a category with Pybamm: Hypothesis Generation (spacering-net/codeg, 3.9k stars), GitHub Deep Research (bytedance/deer-flow, 84k stars), Nature Paper Card (Yuan1z0825/nature-skills, 47k stars) and Content Research Writer (weapp-tailwindcss/weapp-tailwindcss, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pybamm?

K-Dense-AI (a GitHub organization) maintains it in K-Dense-AI/scientific-agent-skills, which has 48,215 GitHub stars. The repository holds 153 skills in this directory. The repository was last updated on October 5, 2026.

Source: K-Dense-AI/scientific-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.