Calculate the thermodynamic stability and energy above the convex hull (Ehull) of a material at 0K.

MITAuto-check passed

Install Mat Stability

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-stability -a claude-code

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

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills mat-stability --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/learningmatter-mit/AtomisticSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mat-stability .claude/skills/mat-stability && 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
mat-stability
GitHub stars
175
Token cost
~2.2k tokens
SKILL.md length
823 words
Files
6 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Calculate the thermodynamic stability and energy above the convex hull (Ehull) of a material at 0K.

  • Works in 5 steps: Select Level of Theory: Choose the… → Query Materials Project Hull: Retrieve… → Relax All Structures: Perform structural… → …
  • SKILL.md covers Goal, Instructions, Examples and Constraints
  • Runs Python scripts from its folder

What it does

Mat Stability is an agent skill from learningmatter-mit/AtomisticSkills. Calculate the thermodynamic stability and energy above the convex hull (Ehull) of a material at 0K.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts (for example `examples/li3ps4_stability/README.md`, `examples/li3ps4_stability/hull_entries.json` and `examples/li3ps4_stability/stability_analysis.json`).

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.

Example prompts

  • “/mat-stability”

Requirements

  • Python 3

Workflow steps

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

  1. Select Level of Theory: Choose the target accuracy level for stability calculations.
  2. Query Materials Project Hull: Retrieve all structures on the convex hull in the target material's chemical space.
  3. Relax All Structures: Perform structural relaxation on all hull structures using the same MLIP.
  4. Construct Convex Hull & Calculate Stability: Build a pymatgen phase diagram using the relaxed energies.
  5. Interpret Stability: Assess the thermodynamic stability based on $E_{hull}$ (energy above hull in meV/atom)

What it can do on your machine

Read from SKILL.md and the folder at commit 7f2d86d. 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 2 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
    • 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.

Context cost

Mat Stability loads about 2.2k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 823 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

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 learningmatter-mit/AtomisticSkills at commit 7f2d86d, republished under its MIT licence (© learningmatter-mit). 823 words, ~2,160 tokens.

Download SKILL.mdSave it as .claude/skills/mat-stability/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
mat-stability
description
Calculate the thermodynamic stability and energy above the convex hull (E_hull) of a material at 0K.
metadata.category
materials
metadata.venv
cpu, mlip

Stability Calculation

<!-- mcp-tools-note -->

[!NOTE] Steps written server.tool are MCP tool calls: matgl.relax_structure is the relax_structure tool of the matgl server (mcp__matgl__relax_structure, or mcp__plugin_atomistic-skills_matgl__relax_structure 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:

bash
${CLAUDE_SKILL_DIR}/../../venv/run mlip python -m src.mcp_server.cli matgl relax_structure key=value

Goal

To determine the thermodynamic stability of a material at 0K by computing the energy above the convex hull ($E_{hull}$) using pymatgen phase diagram analysis with structures from Materials Project.

[!TIP] Finite Temperature Stability: While this skill focuses on 0K stability (potential energy), you can construct a finite-temperature phase diagram by replacing potential energies with Free Energies ($G = U + F_{\text{vib}}$) calculated from the mat-qha-thermal-expansion skill.

Electrochemical Stability: The phase diagram constructed here can be seamlessly reused to calculate the material's electrochemical window (ECW) against a specific mobile ion (e.g., Li/Li+). See the mat-electrochemical-window skill for detailed methods.

Instructions

  1. Select Level of Theory: Choose the target accuracy level for stability calculations.

    • Recommended: r2SCAN-level foundation potentials for high accuracy
    • Options: TensorNet-MatPES-r2SCAN-v2025.1-PES (MatGL) or MACE-MH-1 with matpes_r2scan head
    • See ml-foundation-potentials for detailed guidance

    Note: r2SCAN shows high accuracy for predicting thermodynamic stability (MAE 80 meV/atom for formation energies vs PBE's 175 meV/atom)[^1]. Using r2SCAN-trained potentials ensures consistency with Materials Project's r2SCAN entries.

    [^1]: Kingsbury, R. et al. "Performance comparison of r2SCAN and SCAN metaGGA density functionals for solid materials via an automated, high-throughput computational workflow" Physical Review Materials 6, 013801 (2022). DOI: 10.1103/PhysRevMaterials.6.013801

  2. Query Materials Project Hull: Retrieve all structures on the convex hull in the target material's chemical space.

    bash
    ${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_mp_hull.py \
        --formula "Li-Fe-P-O" \
        --target "LiFePO4" \
        --thermo_type "R2SCAN" \
        --output hull_structures/

    This script will:

    • Query Materials Project for all stable phases in the chemical space (including all subsystems)
    • Download structures on the convex hull (ground state phases)
    • Filter by level of theory (e.g., GGA/GGA+U or R2SCAN) to ensure consistency
    • Save the target material and all competing phases
    • Output a hull_entries.json manifest
  3. Relax All Structures: Perform structural relaxation on all hull structures using the same MLIP.

    bash
    # (if using MatGL)
    matgl.relax_structure(
        structure_data="hull_structures/",  # Pass directory containing all CIF files
        relax_cell=True,
        model_name="TensorNet-MatPES-r2SCAN-v2025.1-PES",
        fmax=0.02,
        steps=500,
        output_dir="relaxed/"
    )

    The MCP tool will automatically:

    • Process all CIF files in hull_structures/
    • Create individual subdirectories in relaxed/ for each structure
    • Save energies to relaxed_energy.txt files for compute_ehull.py

    Critical: Use the same MLIP and settings for all relaxations to ensure energy consistency.

  4. Construct Convex Hull & Calculate Stability: Build a pymatgen phase diagram using the relaxed energies.

    bash
    ${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/compute_ehull.py \
        --hull_manifest hull_entries.json \
        --relaxed_dir relaxed/ \
        --target_material LiFePO4 \
        --calculate_ecw \
        --mobile_ion Li \
        --output stability_analysis.json

    The script will:

    • Read relaxed structures and energies from each subdirectory
    • Create ComputedEntry objects for pymatgen
    • Construct the convex hull using PhaseDiagram
    • Calculate $E_{hull}$ for the target material
    • (Optional) If --calculate_ecw is provided, calculate the intrinsic Electrochemical Stability Window ($V_{red}$ and $V_{ox}$) against the specified --mobile_ion.
  5. Interpret Stability: Assess the thermodynamic stability based on $E_{hull}$ (energy above hull in meV/atom):

    • $E_{hull} = 0$ meV/atom: STABLE - On the convex hull, thermodynamically stable
    • $0 < E_{hull} \leq 50$ meV/atom: METASTABLE - May be synthesizable under kinetic control
    • $E_{hull} > 50$ meV/atom: UNSTABLE - Likely to decompose into competing phases

    The decomposition reaction and products are also reported by pymatgen.

Show full SKILL.md (282 more words)Show less

Examples

Example 1: Integrated Stability and ECW Pipeline for Li3PS4
bash
# Step 1: Query Materials Project hull in Li-P-S space
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_mp_hull.py \
    --formula "Li-P-S" \
    --target "Li3PS4" \
    --thermo_type "R2SCAN" \
    --output hull_structures/

# Step 2: Batch relax all structures with MatGL r2SCAN
matgl.relax_structure(
    structure_data="hull_structures/",
    relax_cell=True,
    model_name="TensorNet-MatPES-r2SCAN-v2025.1-PES",
    fmax=0.05,
    steps=20,
    output_dir="relaxed/"
)

# Step 3: Compute Integrated Stability and ECW
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/compute_ehull.py \
    --hull_manifest hull_entries.json \
    --relaxed_dir relaxed/ \
    --target_material Li3PS4 \
    --calculate_ecw \
    --mobile_ion Li \
    --output Li3PS4_stability_ecw.json

We also provide a stored record of this example run in examples/li3ps4_stability/.

Constraints

  • Energy Consistency: All structures (target + hull phases) MUST be relaxed with the same MLIP model and settings. Mixing different MLIPs will produce incorrect E_hull values.
  • Level of Theory: Use r2SCAN-trained foundation potentials (e.g., MACE-MH-1 matpes_r2scan) for better accuracy and consistency with Materials Project.
  • Convergence Criterion: Use fmax ≤ 0.02 eV/Å for all relaxations. Inconsistent convergence criteria will introduce systematic errors.
  • Chemical Space: The query must include ALL elements in the target material. For example, for LiFePO4, query "Li-Fe-P-O" not just "Li-Fe-P".
  • Hull Completeness: Ensure all competing phases are included. Missing hull phases will lead to underestimated E_hull (false negatives for instability).
  • Hull Reuse: If calculating the stability of multiple different structures in the same chemical space, we should reuse the hull instead of relaxing them again.
  • Stability Thresholds:
    • $E_{hull} = 0$ meV/atom: Stable
    • $0 < E_{hull} \leq 50$ meV/atom: Metastable
    • $E_{hull} > 50$ meV/atom: Unstable
  • Phase Diagram Construction: For full phase diagram visualization and competing phase analysis, see the separate phase-diagram skill (to be developed).
  • Energy Input: Use TOTAL POTENTIAL ENERGY for all entries in pymatgen.analysis.phase_diagram.PhaseDiagram automatically calculates formation energies by identifying elemental ground states from the provided entries. Do not pass formation energies directly.
  • High-Throughput Self-Competition: When computing $E_{hull}$ for multiple generated candidates, place all relaxed structures in relaxed_dir. compute_ehull.py will automatically load all candidates and include them in the PhaseDiagram alongside the Materials Project hull reference. This correctly enables generated candidates to thermodynamically compete against each other.
  • DFT Validation: For publication-quality results, validate E_hull with DFT calculations, especially for materials close to the stability threshold.

Author: Bowen Deng Contact: GitHub @learningmatter-mit

© learningmatter-mit, 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 5 other files (scripts) in skills/mat-stability of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/li3ps4_stability/README.md
  • examples/li3ps4_stability/hull_entries.json
  • examples/li3ps4_stability/stability_analysis.json
  • scripts/compute_ehull.py
  • scripts/query_mp_hull.py

Open the folder on GitHubat commit 7f2d86d

Compare with similar skills

Mat Stability 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 Stability compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mat Stability this skilllearningmatter-mit/AtomisticSkills175—~2.2kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official37k11 repos~3.1kAutomated safety check: PassApache-2.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
Stitch to Remotion Walkthrough Videosgoogle-labs-code/stitch-skills8.4k6 repos~3.2kAutomated safety check: NotesApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    37k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Stitch to Remotion Walkthrough Videos

    google-labs-code/stitch-skills

    Official

    Builds walkthrough videos from Stitch design projects using Remotion, with transitions, zoom effects and text overlays on each screen.

    8.4k GitHub starsUsed in 6 repos~3.2k tokens
    Media & CreativeAuto-check: notes
  • MCP Development

    coollabsio/coolify

    A skill your agent uses for Laravel MCP development. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 1 repo~949 tokens
    Frontend & DesignAuto-check passed

More from learningmatter-mit/AtomisticSkills

All 129 skills in this repo
  • Drug Binding Site Definition

    learningmatter-mit/AtomisticSkills

    Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.

    175 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

    Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.

    175 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Drug Pocket Detection

    learningmatter-mit/AtomisticSkills

    Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).

    175 GitHub stars~4k tokensUpdated yesterday
    Auto-check passed
  • Chem Bond Dissociation

    learningmatter-mit/AtomisticSkills

    Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.

    175 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Chem Conformer Search

    learningmatter-mit/AtomisticSkills

    Generate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting.

    175 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

    Query multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al.

    175 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Questions about Mat Stability

What does Mat Stability do?

Calculate the thermodynamic stability and energy above the convex hull (Ehull) of a material at 0K. Mat Stability is an agent skill from learningmatter-mit/AtomisticSkills. Calculate the thermodynamic stability and energy above the convex hull (Ehull) of a material at 0K.

How do I install Mat Stability in Claude Code?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-stability -a claude-code`. Or copy the skill folder (skills/mat-stability in learningmatter-mit/AtomisticSkills) into .claude/skills/mat-stability in your project. Claude Code loads it when a task matches its description.

How do I install Mat Stability in Codex?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-stability -a codex`. Or copy the skill folder (skills/mat-stability in learningmatter-mit/AtomisticSkills) into .agents/skills/mat-stability in your project. Codex loads it when a task matches its description.

Can I use Mat Stability 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-stability -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-stability, .gemini/skills/mat-stability, .github/skills/mat-stability and .opencode/skills/mat-stability in your project.

What does Mat Stability need to run?

Going by SKILL.md and its folder, Mat Stability needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Mat Stability access the network?

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

Is Mat Stability 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 Stability use?

Mat Stability 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 Stability use?

About 2.2k tokens (SKILL.md is roughly 8.6k 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 Stability?

Skills that share tags, products or a category with Mat Stability: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 37k stars) and Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mat Stability?

learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 175 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 6, 2026.

Source: learningmatter-mit/AtomisticSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.