materials-project
Query the Materials Project API v3 for crystal structures, band gaps, formation energies, and thermodynamic stability of 150k+ inorganic materials. Use when: (1) searching materials by chemical formula, (2) looking up material properties by MP ID, (3) filtering materials by band gap, energy, or density, (4) finding stable phases for a composition. NOT for: organic molecules (use pubchem-compound), proteins (use uniprot-protein), drug compounds (use chembl-drug).
Best use case
materials-project is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Query the Materials Project API v3 for crystal structures, band gaps, formation energies, and thermodynamic stability of 150k+ inorganic materials. Use when: (1) searching materials by chemical formula, (2) looking up material properties by MP ID, (3) filtering materials by band gap, energy, or density, (4) finding stable phases for a composition. NOT for: organic molecules (use pubchem-compound), proteins (use uniprot-protein), drug compounds (use chembl-drug).
Teams using materials-project should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/materials-project/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How materials-project Compares
| Feature / Agent | materials-project | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Query the Materials Project API v3 for crystal structures, band gaps, formation energies, and thermodynamic stability of 150k+ inorganic materials. Use when: (1) searching materials by chemical formula, (2) looking up material properties by MP ID, (3) filtering materials by band gap, energy, or density, (4) finding stable phases for a composition. NOT for: organic molecules (use pubchem-compound), proteins (use uniprot-protein), drug compounds (use chembl-drug).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Materials Project API
Search and retrieve computed materials data from the Materials Project database
(v3 API). Covers 150k+ inorganic crystalline materials with DFT-computed properties.
## Authentication
All requests require the `X-API-KEY` header set to your Materials Project API key.
Store it in the `MP_API_KEY` environment variable.
```bash
export MP_API_KEY="your_api_key_here"
```
## API Base URL
```
https://api.materialsproject.org/v3
```
## Search by Chemical Formula
```bash
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?formula=Fe2O3&_fields=material_id,formula_pretty,band_gap,formation_energy_per_atom,energy_above_hull,symmetry,density&_limit=10"
```
## Lookup by Material ID
```bash
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?material_ids=mp-149&_fields=material_id,formula_pretty,band_gap,formation_energy_per_atom,energy_above_hull,symmetry,density,structure"
```
## Filter by Band Gap Range
```bash
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?band_gap_min=1.0&band_gap_max=2.0&_fields=material_id,formula_pretty,band_gap,formation_energy_per_atom&_limit=20"
```
## Filter by Thermodynamic Stability
Find materials on or near the convex hull (energy_above_hull close to 0 = stable):
```bash
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?energy_above_hull_max=0.025&elements=Li,Fe,O&_fields=material_id,formula_pretty,energy_above_hull,formation_energy_per_atom&_limit=20"
```
## Filter by Elements
Search for materials containing specific elements:
```bash
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?elements=Si,Ge&_fields=material_id,formula_pretty,band_gap,density&_limit=15"
```
## Key Properties
| Property | Description | Unit |
|-----------------------------|-----------------------------------------------|------------|
| `band_gap` | Electronic band gap | eV |
| `formation_energy_per_atom` | Formation energy per atom from elements | eV/atom |
| `energy_above_hull` | Energy above convex hull (0 = stable) | eV/atom |
| `symmetry` | Space group and crystal system | - |
| `density` | Computed density | g/cm^3 |
| `volume` | Unit cell volume | Angstrom^3 |
| `nsites` | Number of sites in the unit cell | - |
## Parse Results with Python
```bash
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?formula=TiO2&_fields=material_id,formula_pretty,band_gap,energy_above_hull,density&_limit=10" \
| python3 -c "
import sys, json
data = json.load(sys.stdin)
for mat in data.get('data', []):
mid = mat.get('material_id', 'N/A')
formula = mat.get('formula_pretty', 'N/A')
bg = mat.get('band_gap', 'N/A')
ehull = mat.get('energy_above_hull', 'N/A')
rho = mat.get('density', 'N/A')
print(f'{mid:12s} {formula:10s} Eg={bg} eV Ehull={ehull} eV/at rho={rho} g/cm3')
"
```
## Pagination
Use `_limit` and `_skip` for pagination:
```bash
# First page
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?elements=Cu,Zn&_fields=material_id,formula_pretty&_limit=50&_skip=0"
# Second page
curl -s -H "X-API-KEY: $MP_API_KEY" \
"https://api.materialsproject.org/v3/materials/summary/?elements=Cu,Zn&_fields=material_id,formula_pretty&_limit=50&_skip=50"
```
## Common Query Patterns
- **Solar cell absorbers**: `band_gap_min=1.0&band_gap_max=1.8&energy_above_hull_max=0.05`
- **Wide band gap semiconductors**: `band_gap_min=3.0&band_gap_max=6.0`
- **Metals**: `band_gap_max=0&is_metal=true`
- **Specific composition**: `chemsys=Li-Fe-P-O` (all materials in that chemical system)
## Best Practices
1. Always specify `_fields` to limit response size and speed up queries.
2. Use `energy_above_hull_max=0.025` to filter for thermodynamically stable phases.
3. Check `is_deprecated` field to avoid outdated entries.
4. Use `chemsys` for phase diagram queries across a chemical system.
5. Rate limit: keep requests under 5 per second to avoid throttling.
6. For bulk downloads, use the mp-api Python client instead of REST calls.
## Data Integrity Rule
NEVER fabricate database results from training data. Every protein ID, gene name, compound property, pathway ID, structure detail, and metadata MUST come from an actual API response in this conversation. If the API returns no results, errors, or partial data, report exactly what happened. Do not "fill in" missing data from memory or make up identifiers.Related Skills
pymatgen-materials
Materials science computation with pymatgen. Use when: (1) crystal structure creation and manipulation, (2) phase diagram construction, (3) electronic structure analysis, (4) symmetry and space group operations, (5) VASP input/output parsing. NOT for: molecular chemistry (use rdkit-chemistry), protein structure (use biopython-bio), or general numerical computation (use scipy-analysis).
materials-screening
Orchestrates a materials screening workflow from database search through property filtering to stability assessment and ranking. Use when identifying candidate materials for batteries, catalysts, semiconductors, or other applications. NOT for molecular chemistry or biological compound analysis.
materials-science
Analyzes material properties including crystal structures, phase diagrams, mechanical/thermal/electronic properties, and supports materials discovery through computational approaches; trigger when users discuss alloys, ceramics, polymers, nanomaterials, or materials characterization.
xurl
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
writing
No description provided.
world-bank-data
World Bank Open Data API for development indicators. Use when: user asks about GDP, population, poverty, health, or education statistics by country. NOT for: real-time financial data or stock prices.
wikipedia-search
Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information
wikidata-knowledge
Query Wikidata for structured knowledge using SPARQL and entity search. Use when: (1) finding structured facts about entities (people, places, organizations), (2) querying relationships between entities, (3) cross-referencing external identifiers (Wikipedia, VIAF, GND, ORCID), (4) building knowledge graphs from linked data. NOT for: full-text article content (use Wikipedia API), scientific literature (use semantic-scholar), geospatial data (use OpenStreetMap).
weather
Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed.
wacli
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
voice-call
Start voice calls via the OpenClaw voice-call plugin.