pymatgen

pymatgen is a skill for Claude Code from K-Dense-AI/scientific-agent-skills. It costs 47 tokens per session (3,997 once invoked), scanned C, original, MIT.

A Python toolkit for working with materials-science data, including chemical compositions, molecules, crystal structures, phase diagrams, symmetry, and electronic-structure files. It can also make bounded queries to the Materials Project, a database of computed materials properties.

In plain words
What is it for?
Use it to analyze crystal structures, compare possible material phases, process electronic-structure calculations, and retrieve materials data for research workflows.
Why use it?
It helps you inspect, validate, convert, and transform scientific structures while keeping track of methods and parameters that can affect the result.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

not rated 44krepo +1.6k today C scan Socket: passSnyk: warnSkillSpector: pass 47 tokens original MIT

Good fit Use it to analyze crystal structures, compare possible material phases, process electronic-structure calculations, and retrieve materials data for research workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/k-dense-ai/scientific-agent-skills/pymatgen
About the project

Scientific Agent Skills is a collection of reusable procedures that give AI agents capabilities for scientific research across areas such as biology, chemistry, medicine, and drug discovery. It is used by researchers and by people building AI scientist workflows with compatible coding agents. The catalogue contains many of the project's skills and supporting instructions.

K-Dense-AI/scientific-agent-skills · 44,469 stars · on GitHub · arxiv.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add K-Dense-AI/scientific-agent-skills --skill pymatgen
Clone the repo
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pymatgen

README.md
[![agentmods](https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/pymatgen/github.svg)](https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/pymatgen)
Your own site
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/pymatgen"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/pymatgen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pymatgen

Your own site · 80×15
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/pymatgen"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/pymatgen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,997 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 9 Apr 2026
  • Snyk warn 9 Apr 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.03997
Opus 5 $0.00023 $0.01998
Sonnet 5 $0.00009 $0.00799
Haiku 4.5 $0.00005 $0.00400

Measured 8d ago against content hash 84e4d8eaf9da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

pymatgen scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/_common.py, scripts/artifact_manifest.py, scripts/composition_structure_validator.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

the key as a CLI argument, traverse `.env` files, dump environment variables,
skills/pymatgen/SKILL.md · 422 lines

How it starts

The opening of the file, as written. The whole thing — 422 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pymatgen

Use pymatgen for explicit, provenance-preserving work with compositions, molecules, periodic structures, computed entries, symmetry, phase diagrams, electronic structures, and electronic-structure-code files. Treat every parse, conversion, symmetry assignment, transformation, and database result as method- and parameter-dependent.

The MIT frontmatter license covers this skill. pymatgen and pymatgen-core are MIT; mp-api declares BSD-3-Clause-LBNL. Materials Project data is generally CC BY 4.0, while contributed data remains owned by its contributors. Check the exact artifact and data terms before redistribution.

Verified snapshot (2026-07-23)

  • pymatgen==2026.5.4 is the latest stable wrapper release (2026-05-04). Package metadata requires Python 3.11+ and directly requires pymatgen-core>=2026.4.16.
  • pymatgen-core==2026.7.16 is the latest stable core release (2026-07-16). It now contains core objects, symmetry/lattice operations, and the I/O layer, all under the existing pymatgen.* namespace.
  • mp-api==0.46.4 is the latest stable Materials Project client (2026-06-15), requires Python 3.11+, and depends on pymatgen>2024.2.20.
  • The current API site is built from 2026.7.16 core documentation. Pinning both distributions prevents pymatgen==2026.5.4 from silently resolving to a different future core.
  • Pymatgen uses date-based versions. PyPI renders the date with dots; do not infer semantic-version compatibility from the numbers.

Create a project lock for reproducibility:

uv init --python 3.11
uv add "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4"
uv lock
uv sync --frozen

For a disposable reviewed environment:

uv venv --python 3.11 .venv-pymatgen
uv pip install --python .venv-pymatgen/bin/python \
  "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4"

Direct pins do not freeze all transitive wheels. Preserve uv.lock, platform, Python version, package versions, and artifact hashes.

Read the full file on GitHub · 422 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 422 lines · 47 tokens per session scan C 84e4d8eaf9da

Subscribe to this mod's changes

pymatgen is a skill published in the GitHub repository K-Dense-AI/scientific-agent-skills (44,469 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 3,997 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

discovery-toolbox

A routed repertoire of 90 scientific thinking operators for biological research agents - visual reasoning, detectability and information budgets, search reframing, causal identification, competing explanations, observation and selection processes, pipeline artifact diagnosis, effort allocation, and confirmation…

dekan-aleksandr/biodiscovery-skills · 122 tokens

discovery-director

Operate as a research director making original discoveries from a given biological question and dataset. Use when the task is open-ended scientific research, exploring omics or experimental data for findings, hypothesis generation and testing, screening a large candidate space of genes, variants, features or…

dekan-aleksandr/biodiscovery-skills · 114 tokens

polars-dovmed

Search PMC Open Access and bioRxiv corpora with polars-dovmed. Use when structured, reproducible literature queries should run through the hosted API or local parquet indexes.

fmschulz/omics-skills · 42 tokens

bio-interdomain-hgt

Detect and polarize interdomain horizontal gene transfer with homology, context, and phylogenetic checks. Use when studying lateral gene transfer, virus-host gene exchange, endogenous viral elements, or donor direction.

fmschulz/omics-skills · 47 tokens

csag-extraction

Extract a Conditional Scientific Argumentation Graph and grounded Q&A from a manuscript. Use when representing assertions, contexts, evidence links, and inference steps in machine-readable form.

fmschulz/omics-skills · 38 tokens

exploratory-data-analysis

Inspect scientific data and generate a Markdown structure-and-quality report. Use when triaging tabular, array, sequence, HDF5, JSON, or raster files before downstream analysis.

fmschulz/omics-skills · 42 tokens