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.
npx skills add ualberta-rcg/drac-agent-skills --skill pymatgengit clone --depth 1 https://github.com/ualberta-rcg/drac-agent-skillsWrote 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.
[](https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/pymatgen)<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/pymatgen"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-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.
<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/pymatgen"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/pymatgen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.01349 |
| Opus 5.5 | $0.00029 | $0.00540 |
| Sonnet 5.5 | $0.00014 | $0.00270 |
| Haiku 4.5 | $0.00007 | $0.00135 |
Grade A, and why
pymatgen scanned grade A with 0 findings 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 6d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pymatgen: Materials Structures, DFT I/O & Phase Diagrams
Use pymatgen with explicit units (Å, degrees, eV, eV/atom), explicit coordinate modes (coords_are_cartesian), and provenance preservation across every parse, transformation, symmetry assignment, and phase diagram.
Installation
# Pin both pymatgen wrapper and pymatgen-core together (date-versioned releases)
pip install "pymatgen==2026.9.24" "pymatgen-core==2026.9.23" "mp-api==0.46.5"
Core Scientific Contracts & Patterns
1. Periodic Structure vs. Non-Periodic Molecule & Safe CIF Intake
Inspect both CifParser.warnings and Python warnings (check_occu=True, primitive=False); never silently discard partial occupancies, disorder, or site-merging warnings:
import warnings
from pymatgen.core import Composition, Lattice, Structure
from pymatgen.io.cif import CifParser
with warnings.catch_warnings(record=True) as py_warns:
warnings.simplefilter("always")
parser = CifParser("input.cif", check_cif=True)
structures = parser.parse_structures(primitive=False, check_occu=True, on_error="raise")
structure = structures[0]
print("CIF warnings:", parser.warnings)
print("Disordered?", not structure.is_ordered)
(Security note: always use pymatgen >= 2024.2.20 and never deserialize untrusted pickle files — use strict JSON or .as_dict() / Structure.from_dict().)
2. Tolerance-Swept Space-Group Symmetry
SpacegroupAnalyzer defaults to symprec=0.01 Å whereas Materials Project pipelines commonly use symprec=0.1 Å. Always sweep tolerances and report (symprec, angle_tolerance) alongside space-group symbols:
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
for symprec in (1e-3, 1e-2, 1e-1):
sga = SpacegroupAnalyzer(structure, symprec=symprec, angle_tolerance=5.0)
print(f"symprec={symprec:<5} -> {sga.get_space_group_symbol()} (#{sga.get_space_group_number()})")
3. Provenance-Preserving Transformations & Loss-Aware Format Conversion
CIF, VASP POSCAR, XYZ, and JSON do not preserve identical metadata (e.g., POSCAR drops oxidation states and disorder; XYZ drops lattice periodicity). Always write conversions to a new path and transform copies via TransformedStructure:
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.
- 6d ago First seen · 93 lines · 72 tokens per session scan A 4463bc270ae8
pymatgen is a skill published in the GitHub repository ualberta-rcg/drac-agent-skills (2 stars, last pushed 7d ago), licensed MIT. It adds 72 tokens to every session and 1,349 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-25.
pymatgen compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pymatgenualberta-rcg/drac-agent-skills | Skill | 2 | 7d ago | MIT | A | 72 | Claude Code |
| jupyter-notebookNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 18 | Claude Code, Codex |
| matlabK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 44 | Claude Code |
| pennylaneK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 74 | Claude Code |
| cuequivariance-torchNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 37 | Claude Code, Codex |
| cuequivariance-jaxNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 38 | Claude Code, Codex |
| cuopt-numerical-optimization-apiNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 51 | Claude Code, Codex |