Agent skill

Mat Phase Diagram

by learningmatter-mit in learningmatter-mit/AtomisticSkills

Retrieve and visualize pre-computed phase diagrams from Materials Project for thermodynamic stability analysis.

MITAuto-check passedDevelopment

Install Mat Phase Diagram

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

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

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills mat-phase-diagram --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-phase-diagram .claude/skills/mat-phase-diagram && 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-phase-diagram
GitHub stars
176
Token cost
~1.2k tokens
SKILL.md length
363 words
Files
7 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Retrieve and visualize pre-computed phase diagrams from Materials Project for thermodynamic stability analysis.

  • Works in 3 steps: Basic Phase Diagram Retrieval → Generate Phase Diagram Plot → Use Different DFT Functional
  • Tasks that involve Diagrams
  • SKILL.md covers Goal, Instructions, Integration with Other Skills and Constraints, plus 2 more sections
  • Runs Shell and Python scripts from its folder; needs MP_API_KEY

What it does

Mat Phase Diagram is an agent skill from learningmatter-mit/AtomisticSkills. Retrieve and visualize pre-computed phase diagrams from Materials Project for thermodynamic stability analysis.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts (for example `examples/Li-O/README.md`, `examples/Li-O/li_o_example.sh` and `examples/Li-O/li_o_phase_diagram/li2o_stability.json`).

It sits in Development, covering Diagrams. 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

Example prompts

  • “/mat-phase-diagram”

Requirements

  • Python 3
  • A Bash shell
  • A credential in MP_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Basic Phase Diagram Retrieval
  2. Generate Phase Diagram Plot
  3. Use Different DFT Functional

What it can do on your machine

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 1 file in scripts/ (Shell and 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):

    • 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 Phase Diagram loads about 1.2k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 363 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~1.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 6257444, republished under its MIT licence (© learningmatter-mit). 363 words, ~1,161 tokens.

Download SKILL.mdSave it as .claude/skills/mat-phase-diagram/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
mat-phase-diagram
description
Retrieve and visualize pre-computed phase diagrams from Materials Project for thermodynamic stability analysis.
metadata.category
materials
metadata.venv
cpu

Phase Diagram Retrieval

Goal

Retrieve pre-computed phase diagrams from Materials Project to analyze thermodynamic stability, competing phases, and convex hull relationships. Phase diagrams are essential for understanding:

  • Which compounds are stable at 0 K
  • Energy above hull (formation energy distance to the convex hull)
  • Competing phases that may form during synthesis
  • Thermodynamic driving forces for phase transformations

Instructions

1. Basic Phase Diagram Retrieval

Retrieve a phase diagram for a chemical system:

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/get_phase_diagram.py \
  --chemsys "Li-O" \
  --output li_o_phase_diagram.json

Output: JSON file containing the phase diagram data (entries, energies, hull)

2. Generate Phase Diagram Plot

Add --plot flag to create a visualization:

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/get_phase_diagram.py \
  --chemsys "Li-O" \
  --output li_o_pd.json \
  --plot li_o_pd.png

Output: PNG plot showing the convex hull and stable/unstable phases

3. Use Different DFT Functional

By default, retrieves GGA+U phase diagrams. For R2SCAN data:

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/get_phase_diagram.py \
  --chemsys "Li-Fe-P-O" \
  --thermo_type "R2SCAN" \
  --output lifepo4_r2scan_pd.json \
  --plot lifepo4_r2scan_pd.png

Thermo types:

  • GGA_GGA+U (default): Standard PBE with U corrections
  • R2SCAN: Meta-GGA functional (more accurate)
  • GGA: Pure PBE without U corrections

Integration with Other Skills

With material-stability Skill

Use phase diagrams to visualize competing phases:

bash
# 1. Get phase diagram
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/get_phase_diagram.py \
  --chemsys "Li-O" \
  --output li_o_pd.json \
  --plot li_o_pd.png

# 2. Check specific material's position on hull
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/../mat-db-mp/scripts/query_mp.py \
  --formula "Li2O" \
  --properties energy_above_hull formation_energy_per_atom \
  --output li2o_stability.json
With MatterGen Fine-Tuning

Query stable structures from a chemical system for training data:

bash
# 1. Visualize phase diagram to understand stable phases
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/get_phase_diagram.py \
  --chemsys "Li-S" \
  --output li_s_pd.json \
  --plot li_s_pd.png

# 2. Query all stable structures
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/../mat-db-mp/scripts/query_mp.py \
  --chemsys "Li-S" \
  --e_above_hull_max 0.0 \
  --properties energy_above_hull formation_energy_per_atom \
  --output li_s_stable.json

Constraints

  • API Key Required: Set MP_API_KEY environment variable
  • Pre-Computed Only: Returns Materials Project's pre-computed phase diagrams. Cannot compute custom phase diagrams with user-provided energies.
  • Chemical System Format: Use hyphen-separated elements (e.g., "Li-O", not "LiO" or "Li O")
  • Availability: Not all chemical systems have pre-computed phase diagrams. Common systems (binary oxides, battery materials) are well-covered.
  • Thermo Type Availability: R2SCAN phase diagrams are available for a subset of systems
  • Environment: Requires the cpu environment
  • Dependencies: mp-api, pymatgen, matplotlib (all installed in cpu)
Show full SKILL.md (118 more words)Show less

When to Use This vs. Calculate

Use MP Phase Diagrams (this skill) when:

  • You need quick exploratory analysis
  • You want DFT-quality phase diagrams without running calculations
  • You're analyzing common chemical systems
  • You need GGA+U or R2SCAN accuracy

Calculate Custom Phase Diagrams when:

  • You have MLIP-relaxed structures not in MP
  • You need to compare MLIP formation energies
  • Your chemical system is not in MP
  • You want to use specific MLIP models or DFT settings

For custom phase diagram construction, see material-stability skill which can build phase diagrams from user-provided energies.

Examples

See examples/ directory for:

  • Li-O binary phase diagram retrieval and visualization
  • Li-Fe-P-O quaternary phase diagram (LiFePO4 system)
  • Integration with stability analysis workflow

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 6 other files (scripts) in skills/mat-phase-diagram of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/Li-O/README.md
  • examples/Li-O/li_o_example.sh
  • examples/Li-O/li_o_phase_diagram/li2o_stability.json
  • examples/Li-O/li_o_phase_diagram/li_o_pd.json
  • examples/Li-O/li_o_phase_diagram/li_o_pd.png
  • scripts/get_phase_diagram.py

Open the folder on GitHubat commit 6257444

Compare with similar skills

Mat Phase 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 Phase Diagram compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mat Phase Diagram this skilllearningmatter-mit/AtomisticSkills176—~1.2kAutomated safety check: PassMIT
Archify Diagramstt-a1i/archify79k—~2.9kAutomated safety check: PassMIT
JSON Canvasheyitsnoah/claudesidian2.6k18 repos~3.5kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Fireworks Tech Graphtisfeng/Easydict15k1 repos~1.4kAutomated safety check: PassMIT
Excalidraw Diagramcoleam00/excalidraw-diagram-skill5k2 repos~6.1kAutomated safety check: PassNone

Similar skills

  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    79k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • JSON Canvas

    heyitsnoah/claudesidian

    Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections.

    2.6k GitHub starsUsed in 18 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Fireworks Tech Graph

    tisfeng/Easydict

    Create precise SVG technical diagrams, export PNG or offline HTML, and animate supported semantic SVGs to GIF.

    15k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Excalidraw Diagram

    coleam00/excalidraw-diagram-skill

    Create Excalidraw diagram JSON files that make visual arguments.

    5k GitHub starsUsed in 2 repos~6.1k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

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.

    176 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

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

    176 GitHub stars~2k tokensUpdated today
    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).

    176 GitHub stars~4k tokensUpdated today
    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.

    176 GitHub stars~2.5k tokensUpdated today
    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.

    176 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

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

    176 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Categories

Questions about Mat Phase Diagram

What does Mat Phase Diagram do?

Retrieve and visualize pre-computed phase diagrams from Materials Project for thermodynamic stability analysis. Mat Phase Diagram is an agent skill from learningmatter-mit/AtomisticSkills. Retrieve and visualize pre-computed phase diagrams from Materials Project for thermodynamic stability analysis.

When should I use Mat Phase Diagram?

Mat Phase Diagram fits situations like: tasks that involve Diagrams.

How do I install Mat Phase Diagram in Claude Code?

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

How do I install Mat Phase Diagram in Codex?

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

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

What does Mat Phase Diagram need to run?

Going by SKILL.md and its folder, Mat Phase Diagram needs a shell and Python for the scripts in its folder and credentials named MP_API_KEY. Our summary lists: Python 3; A Bash shell; A credential in MP_API_KEY.

Does Mat Phase Diagram access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

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

Mat Phase 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 Phase Diagram use?

About 1.2k tokens (SKILL.md is roughly 4.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 Phase Diagram?

Skills that share tags, products or a category with Mat Phase Diagram: Archify Diagrams (tt-a1i/archify, 79k stars), JSON Canvas (heyitsnoah/claudesidian, 2.6k stars), Diagram Design (cathrynlavery/diagram-design, 45k stars) and Fireworks Tech Graph (tisfeng/Easydict, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mat Phase 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.

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.