Install the "mat-pourbaix-diagram" agent skill from https://github.com/learningmatter-mit/AtomisticSkills/tree/main/skills/mat-pourbaix-diagram into .claude/skills/mat-pourbaix-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mat-pourbaix-diagram", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "mat-pourbaix-diagram" agent skill from https://github.com/learningmatter-mit/AtomisticSkills/tree/main/skills/mat-pourbaix-diagram into .agents/skills/mat-pourbaix-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mat-pourbaix-diagram", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "mat-pourbaix-diagram" agent skill from https://github.com/learningmatter-mit/AtomisticSkills/tree/main/skills/mat-pourbaix-diagram into .cursor/skills/mat-pourbaix-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mat-pourbaix-diagram", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "mat-pourbaix-diagram" agent skill from https://github.com/learningmatter-mit/AtomisticSkills/tree/main/skills/mat-pourbaix-diagram into .gemini/skills/mat-pourbaix-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mat-pourbaix-diagram", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "mat-pourbaix-diagram" agent skill from https://github.com/learningmatter-mit/AtomisticSkills/tree/main/skills/mat-pourbaix-diagram into .github/skills/mat-pourbaix-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mat-pourbaix-diagram", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "mat-pourbaix-diagram" agent skill from https://github.com/learningmatter-mit/AtomisticSkills/tree/main/skills/mat-pourbaix-diagram into .opencode/skills/mat-pourbaix-diagram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mat-pourbaix-diagram", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
mat-pourbaix-diagram
GitHub stars
176
Token cost
~2.6k tokens
SKILL.md length
1,057 words
Files
13 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT
At a glance
Calculate Pourbaix (pH-voltage) diagrams for aqueous electrochemical stability using water-corrected MLIP energies and pymatgen.
Works in 2 steps: Automated Referencing → Interpret Results
Tasks that involve Diagrams
SKILL.md covers Goal, Features, Background and Resources, plus 4 more sections
Runs Python scripts from its folder; needs MP_API_KEY
What it does
Mat Pourbaix Diagram is an agent skill from learningmatter-mit/AtomisticSkills. Calculate Pourbaix (pH-voltage) diagrams for aqueous electrochemical stability using water-corrected MLIP energies and pymatgen.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including scripts (for example `examples/README.md`, `resources/README.md` and `resources/example_chemsys.json`).
It sits in Development, covering Diagrams and Physical and earth sciences. It works with Model Context Protocol. The repository describes itself as: Integrating AtomisticSkills into Agentic IDEs (Cursor, Claude Code, Codex, Google Antigravity, Hermes Agent, etc). The licence is MIT.
When your agent uses it
Tasks that involve Diagrams
Tasks that involve Physical and earth sciences
Example prompts
“/mat-pourbaix-diagram”
Requirements
Python 3
A credential in MP_API_KEY
Workflow steps
2 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 6257444. 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 3 files in scripts/ (Python), which the agent can run.
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):
doi.org
arxiv.org
pymatgen.org
github.com
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names these keys or tokens, usually read from environment variables:
MP_API_KEY
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Mat Pourbaix Diagram loads about 2.6k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 1,057 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~37
When it runs· the whole SKILL.md, loaded when a task matches
~2.6k
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.
Download SKILL.mdSave it as .claude/skills/mat-pourbaix-diagram/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
mat-pourbaix-diagram
description
Calculate Pourbaix (pH-voltage) diagrams for aqueous electrochemical stability using water-corrected MLIP energies and pymatgen.
metadata.category
materials
metadata.venv
cpu, fairchem
Pourbaix Diagram
<!-- mcp-tools-note -->
[!NOTE]
Steps written server.tool are MCP tool calls: fairchem.load_model is the load_model
tool of the fairchem server (mcp__fairchem__load_model, or
mcp__plugin_atomistic-skills_fairchem__load_model when installed as a plugin).
Without a connected server, run the same tools from the shell. Tools named in
one command share a process, so a model loaded by load_model stays loaded:
To calculate thermodynamically consistent Pourbaix (pH-voltage) diagrams for assessing the aqueous electrochemical stability of materials. This skill uses Machine Learning Interatomic Potentials (MLIPs) for solid phase energies combined with Materials Project data for aqueous species, following the rigorous methodology of Persson et al. (2012)¹.
Automated Referenced: Fetches elemental energies from elemental-energies skill to fill missing terminal entries (e.g., if you relaxed LiCoO2 but forgot Li metal, it will be auto-loaded).
H2O Reference: Checks resources/h2o_energies.json values matching the MLIP checkpoint. If found, uses this pre-calculated energy. If not found, falls back to look for H2O relaxation in the --relaxed_solids directory.
MP2020 Compatibility: Automatically detects if compatibility corrections are needed via gga-ggau-mixed-mlips.yaml.
Background
Pourbaix Diagrams
A Pourbaix diagram shows the thermodynamically stable phases as a function of pH and electrochemical potential (voltage vs. SHE). The diagram maps stability domains for solids and dissolved ions in aqueous environments.
Critical: Thermodynamic Consistency
The Challenge: Mixing computational (MLIP/DFT) solid energies with experimental aqueous ion data creates energy scale mismatch.
The Solution (Persson et al. 2012)¹: Water correction that aligns MLIP water formation energy with experimental Gibbs free energy.
We use a robust cycle that fixes the hydrogen reference to the Standard Hydrogen Electrode (SHE) scale.
3. Automated Referencing
The script calculate_pourbaix.py automatically:
Fetches per-atom elemental energies from the elemental-energies skill.
Applies thermodynamic corrections for H₂ gas ($S^\circ$, $\Delta H$) to deriving $\mu_H$.
Uses a locally relaxed H₂O structure to derive $\mu_O$, ensuring correct water formation energy.
H2O Reference: Checks resources/h2o_energies.json values matching the MLIP checkpoint. If found, uses this pre-calculated energy. If not found, falls back to look for H2O relaxation in the --relaxed_solids directory.
Is calculate_water_correction.py still needed?No. The correction logic is now internal to calculate_pourbaix.py to simplify the workflow.
Resources
resources/h2o_energies.json: A dictionary mapping MLIP checkpoint names (e.g., MACE-MP-medium, uma-s-1_omat) to the relaxed energy of H2O per atom. This avoids the need for manual H2O relaxation when using supported MLIPs.
Methods: MLIP vs. Pure Materials Project
There are two ways to generate Pourbaix diagrams using this skill. Prioritize Method 1 (Pure MP) if the target chemical system's energies are likely present and accurate in the Materials Project database. Use Method 2 (MLIP) when investigating novel materials, specific polymorphs not in MP, or when high-fidelity MLIP energies are preferred.
Method 1: Pure Materials Project (Recommended for existing materials)
Use calculate_pourbaix_mp.py to fetch entries directly from Materials Project. This requires no local relaxation and uses MP's internal DFT energies.
bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/calculate_pourbaix_mp.py \
--comp_dict "Li=1,Fe=1" \
--output ./output_dir
Use this workflow to calculate stability using specific MLIP models. This involves fetching structures, relaxing them, and then generating the diagram.
1. Get Structures from Materials Project
Query all relevant solid phases and reference molecules:
bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/get_pourbaix_structures.py \
--chemsys "Zn" \
--output_dir ./structures/
This retrieves:
All solid phases in the chemical system (e.g., Zn, ZnO, ZnO2, etc.)
Reference molecule: H₂O (Required for water correction)
2. Select Foundation Potential
Choose an appropriate MLIP based on your system (see ${CLAUDE_SKILL_DIR}/../ml-foundation-potentials/SKILL.md).
[!IMPORTANT]
Recommended for Pourbaix diagrams: MatPES-r2SCAN
To ensure energy scale compatibility with Materials Project aqueous ions (which are often based on r2SCAN or compatible corrections), prioritize using r2SCAN-trained MLIPs.
MatGL: CHGNet-PES-MatPES-r2SCAN-1M-2026.9
MACE: MACE-MH-1 with matpes_r2scan head.
Show full SKILL.md (455 more words)Show less
3. Relax Reference H₂O
The script get_pourbaix_structures.py automatically copies H₂O into the references/ subdirectory.
Relax it using the same MLIP model to allow internal calibration:
python
# Example with FairChem UMA-small (recommended)
fairchem.load_model(model_name="uma-s-1p1")
# Relax H2O reference
fairchem.relax_structure(
structure_data="./structures/references/H2O.cif",
fmax=0.02,
steps=500,
relax_cell=True,
output_dir="./relaxed_solids/" # SAVE TO SAME DIR AS SOLIDS
)
Critical: Use fmax ≤ 0.02 eV/Å for reliable energies.
Note: H₂ and O₂ references are NOT required to be relaxed locally because the script uses pre-computed elemental energies for gas phase corrections. Only H₂O is needed for determining the specific water formation energy offset.
4. Relax Solid Phases
Relax all solid phases (and included H2O) using the same MLIP:
python
# Batch relax all solids with same MLIP
# (Model already loaded from step 3)
fairchem.relax_structure(
structure_data="./structures/structures/", # Directory with all CIF files
relax_cell=True,
fmax=0.02,
steps=500,
output_dir="./relaxed_solids/"
)
Critical: Use the same MLIP model for molecules and solids!
5. Calculate Pourbaix Diagram
Construct the diagram using automated referencing (fetching elemental energies and deriving corrections internally):
--relaxed_solids: Directory with MLIP-relaxed solid structures (MUST include the relaxed H2O)
--target: Target metal element (or use --comp_dict for multi-element)
--comp_dict: (Optional) Composition dictionary for K-nary systems (e.g. "Li=1,Fe=1")
--mlip_name: Name for the plot title (and for looking up elemental energies)
--output: Output directory
--apply_solid_compat: (Optional) Apply Materials Project 2020 compatibility corrections. Use only if your MLIP is trained on MP data (e.g. MACE-MP, CHGNet). Do NOT use for UMA or generic potentials unless verified.
--ion_concentration: Ion concentration in M (default: 1e-6)
Critical: Use the same MLIP for all structures in a single workflow!
6. Interpret Results
The scripts generate:
pourbaix_diagram.png: Visual representation
stable_entries.json: List of all stable phases in the diagram
Stability domains for each phase across pH/V space
Interpretation:
Solid domain: Material is thermodynamically stable as a solid
Ion domain: Material dissolves into aqueous ions
Passivation: Material covered by protective oxide layer
Constraints
Energy Consistency: All structures (molecules + solids) MUST be relaxed with the same MLIP model.
Water Correction: REQUIRED for thermodynamic consistency. Skipping water correction will produce incorrect diagrams.
Convergence: Use fmax ≤ 0.02 eV/Å for both molecules and solids.
Chemical System: Automatically determined from target material and MP ion data.
Temperature: Calculations assume 298 K (25°C).
Reference Electrode: Results are vs. Standard Hydrogen Electrode (SHE).
DFT Validation: For publication-quality results, validate critical stability boundaries with DFT.
Theoretical Background
Following Persson et al. (2012)¹, the grand Pourbaix potential is:
ϕ_pbx = G - μ_H·N_H - μ_O·N_O - eV·Q
The water correction aligns MLIP solid energies (computational scale) with MP aqueous ion free energies (experimental scale) by enforcing:
ΔGf(H₂O)_corrected = -2.4583 eV (experimental)
This allows thermodynamically consistent mixing of:
MLIP total energies for solids
MP Gibbs free energies for aqueous ions
References
K. A. Persson, B. Waldwick, P. Lazic, G. Ceder. "Prediction of solid-aqueous equilibria: Scheme to combine first-principles calculations of solids with experimental aqueous states." Physical Review B85, 235438 (2012). DOI:10.1103/PhysRevB.85.235438
Mat Pourbaix Diagram 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.
Mat Pourbaix Diagram compared with similar skills
Skill
Stars
Used in
Tokens
Auto-check
Licence
Repo updated
Mat Pourbaix Diagram this skilllearningmatter-mit/AtomisticSkills
Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.
Create, edit, replicate, and iteratively refine editable research and technical diagrams in diagrams.net/draw.io (.drawio XML) from prompts, papers, repositories, screenshots, or existing diagrams.
Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.
Calculate Pourbaix (pH-voltage) diagrams for aqueous electrochemical stability using water-corrected MLIP energies and pymatgen. Mat Pourbaix Diagram is an agent skill from learningmatter-mit/AtomisticSkills. Calculate Pourbaix (pH-voltage) diagrams for aqueous electrochemical stability using water-corrected MLIP energies and pymatgen.
When should I use Mat Pourbaix Diagram?
Mat Pourbaix Diagram fits situations like: tasks that involve Diagrams; tasks that involve Physical and earth sciences.
How do I install Mat Pourbaix Diagram in Claude Code?
Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a claude-code`. Or copy the skill folder (skills/mat-pourbaix-diagram in learningmatter-mit/AtomisticSkills) into .claude/skills/mat-pourbaix-diagram in your project. Claude Code loads it when a task matches its description.
How do I install Mat Pourbaix Diagram in Codex?
Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a codex`. Or copy the skill folder (skills/mat-pourbaix-diagram in learningmatter-mit/AtomisticSkills) into .agents/skills/mat-pourbaix-diagram in your project. Codex loads it when a task matches its description.
Can I use Mat Pourbaix Diagram 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 learningmatter-mit/AtomisticSkills --skill mat-pourbaix-diagram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mat-pourbaix-diagram, .gemini/skills/mat-pourbaix-diagram, .github/skills/mat-pourbaix-diagram and .opencode/skills/mat-pourbaix-diagram in your project.
What does Mat Pourbaix Diagram need to run?
Going by SKILL.md and its folder, Mat Pourbaix Diagram needs Python for the scripts in its folder and credentials named MP_API_KEY. Our summary lists: Python 3; A credential in MP_API_KEY.
Does Mat Pourbaix Diagram access the network?
SKILL.md names 4 domains. As links in the text: doi.org, arxiv.org, pymatgen.org and github.com. This is read from the text; nothing was executed.
Is Mat Pourbaix Diagram 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 Mat Pourbaix Diagram use?
Mat Pourbaix Diagram is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Mat Pourbaix Diagram use?
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
What are the alternatives to Mat Pourbaix Diagram?
Skills that share tags, products or a category with Mat Pourbaix Diagram: Excalidraw Skill (yctimlin/mcp_excalidraw, 2.5k stars), GitDiagram Repository Overview (ahmedkhaleel2004/gitdiagram, 18k stars), Drawio Diagram Builder (Will-hxw/drawio-diagram-builder, 412 stars) and Drawio (bahayonghang/drawio-skills, 286 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Mat Pourbaix Diagram?
learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 176 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 7, 2026.