mat-grain-boundary

mat-grain-boundary is a skill for Claude Code, Codex from learningmatter-mit/AtomisticSkills. It costs 43 tokens per session (2,039 once invoked), scanned A, original, MIT.

A workflow for calculating the energy of interfaces between differently oriented crystal grains. Grain boundary energy measures how much extra energy the boundary has compared with the same material without that interface.

In plain words
What is it for?
Use it to calculate tilt and twist grain boundary energies with machine-learning atomic models. It produces energy-versus-orientation curves and identifies special low-energy boundaries such as Σ3 or Σ5.
Why use it?
It turns many possible grain orientations into comparable energy values, making it easier to find especially stable boundaries and study how energy changes with orientation.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/learningmatter-mit/atomisticskills/mat-grain-boundary
Any agent
npx skills add learningmatter-mit/AtomisticSkills --skill mat-grain-boundary
Clone the repo
git clone --depth 1 https://github.com/learningmatter-mit/AtomisticSkills

Made for: Claude Code, Codex.

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 mat-grain-boundary

README.md
[![agentmods](https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/mat-grain-boundary.svg)](https://agentmods.dev/skills/learningmatter-mit/atomisticskills/mat-grain-boundary)
Your own site
<a href="https://agentmods.dev/skills/learningmatter-mit/atomisticskills/mat-grain-boundary"><img src="https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/mat-grain-boundary.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,039 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00043 $0.02039
Opus 5 $0.00022 $0.01019
Sonnet 5 $0.00009 $0.00408
Haiku 4.5 $0.00004 $0.00204

Measured today against content hash c47e8e589357, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mat-grain-boundary 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 today.

The scan reads SKILL.md. This mod also ships 3 executable files (examples/Cu-001-tilt-TensorNet/plot_gb_structure.py, scripts/calculate_gb_energy.py, scripts/create_grain_boundary.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.

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.

.agents/skills/mat-grain-boundary/SKILL.md · 166 lines

How it starts

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

Grain Boundary Energy Calculation

Goal

To compute the specific grain boundary energy ($\gamma_{GB}$, J/m²) for a series of coincidence site lattice (CSL) grain boundaries using Machine Learning Interatomic Potentials. This enables:

  • Identification of low-energy special grain boundaries (Σ3, Σ5, Σ7, ...)
  • Anisotropy analysis of GB energy as a function of misorientation angle
  • Input data for polycrystalline simulations (phase-field, kinetic Monte Carlo)

The grain boundary energy is defined as:

$$\gamma_{GB} = \frac{E_{GB} - N \cdot E_{bulk}}{2 A}$$

where $E_{GB}$ is the total energy of the GB supercell, $N$ is the number of atoms, $E_{bulk}$ is the DFT/MLIP energy per atom of the relaxed bulk, and $A$ is the interfacial area (one GB, periodic cell contains two identical GBs hence the factor of 2).

Instructions

1. Select Foundation Potential

GB calculations benefit from accurate interatomic forces. Prefer r2SCAN-level models for energy accuracy:

  • MACE-MH-1 with matpes_r2scan head (recommended)
  • CHGNet-MatPES-r2SCAN-2025.2.10-2.7M-PES (MatGL)
  • TensorNet-MatPES-r2SCAN-v2025.1-PES (MatGL, faster)

Refer to ml-foundation-potentials.

2. Relax Bulk Reference

Perform a high-accuracy bulk relaxation to obtain $E_{bulk}$.

# Env: matgl-agent
mcp_matgl_load_model(model_name="CHGNet-MatPES-r2SCAN-2025.2.10-2.7M-PES")
mcp_matgl_relax_structure(
    structure_data="bulk.cif",
    relax_cell=True,
    fmax=0.005,
    output_dir="bulk_relaxation/"
)

Record the final energy per atom ($E_{bulk}$) from the relaxation output JSON.

3. Generate Grain Boundary Structures

Use pymatgen's GrainBoundaryGenerator to create CSL grain boundary supercells for a range of Σ values and rotation angles.

# Env: base-agent
python .agents/skills/mat-grain-boundary/scripts/create_grain_boundary.py \
    --bulk bulk_relaxation/relaxed_structure.cif \
    --rotation-axis 0 0 1 \
    --max-sigma 29 \
    --min-slab-size 10.0 \
    --vacuum 0.0 \
    --output-dir gb_structures/

Read the full file on GitHub · 166 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. today First seen · 166 lines · 43 tokens per session scan A c47e8e589357

Subscribe to this mod's changes

mat-grain-boundary is a skill published in the GitHub repository learningmatter-mit/AtomisticSkills (158 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 2,039 once invoked, about $0.0002 per session on Opus 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-09-03.

Related

Other skills, from other repositories

cd-calculator

Python calculators for geometry analysis, structural checking, solar calculations, panel optimization, mesh analysis, material estimation, and fabrication cost estimation for AEC computational design.

Abhinavbwj/Claude-skills-for-Computational-Designers · 30 tokens

cd-calculator

Python calculators for geometry analysis, structural checking, solar calculations, panel optimization, mesh analysis, material estimation, and fabrication cost estimation for AEC computational design.

marcinfinitesimal533/Claude-skills-for-Computational-Designers · 30 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

K-Dense-AI/scientific-agent-skills · 83 tokens

evaluating-with-leakage-gates

Evaluate an OpenMed de-identification or clinical NER model against the leakage-first release gates G1a through G8, which gate releases on residual PHI leakage rather than on F1. Use when the user wants to run the OpenMed eval harness on a synthetic golden set, decide whether a de-id model is RELEASABLE or…

maziyarpanahi/openmed · 158 tokens

mapping-to-snomed

Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…

maziyarpanahi/openmed · 205 tokens

mixed-precision

Use FP16/BF16 mixed precision to accelerate training and reduce memory. Use when optimizing GPU performance.

aiming-lab/AutoResearchClaw · 25 tokens