ml-matgl-finetune

ml-matgl-finetune is a skill for Claude Code, Codex from learningmatter-mit/AtomisticSkills. It costs 22 tokens per session (1,428 once invoked), scanned A, original, MIT.

A training workflow for adapting MatGL atomistic models, including CHGNet, M3GNet, and TensorNet, to custom labelled structures. It prepares the data, trains the model, checks the result, and stores the trained checkpoint.

In plain words
What is it for?
Use it to prepare datasets, fine-tune MatGL models on a GPU, compare their training results, and register the trained model.
Why use it?
A pretrained model may need adjustment for a specific chemical system or prediction task. Fine-tuning provides a way to reuse that model with new reference data.

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/ml-matgl-finetune
Any agent
npx skills add learningmatter-mit/AtomisticSkills --skill ml-matgl-finetune
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 ml-matgl-finetune

README.md
[![agentmods](https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/ml-matgl-finetune.svg)](https://agentmods.dev/skills/learningmatter-mit/atomisticskills/ml-matgl-finetune)
Your own site
<a href="https://agentmods.dev/skills/learningmatter-mit/atomisticskills/ml-matgl-finetune"><img src="https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/ml-matgl-finetune.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 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.00022 $0.01428
Opus 5 $0.00011 $0.00714
Sonnet 5 $0.00004 $0.00286
Haiku 4.5 $0.00002 $0.00143

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

Security

Grade A, and why

ml-matgl-finetune 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 (scripts/generate_matgl_config.py, scripts/prepare_matgl_data.py, scripts/train_matgl.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/ml-matgl-finetune/SKILL.md · 91 lines

How it starts

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

MatGL Fine-tuning

Goal

To evaluate and improve the accuracy of a foundation MatGL potential (e.g., CHGNet, M3GNet, TensorNet) for a specific chemical system or physical property using the provided Python fine-tuning script.

Instructions

  1. Prepare Labeled Dataset: Obtain diverse structures with high-fidelity labels (energy, forces, stress). See the /benchmark-finetuning workflow for details.
  2. Custom Data Conversion: Read the source data format and write a customized conversion script if needed, formatting it for the subsequent preparation step.
  3. Data Preparation: Execute scripts/prepare_matgl_data.py to process JSON structures and split into training and validation sets.
  4. Fine-Tuning: Execute scripts/train_matgl.py to begin fine-tuning natively on the GPU using PyTorch Lightning.
  5. Validation: Verify convergence and compare against the benchmarked foundation metrics.
  6. Registration: Use the register_model tool to register the newly fine-tuned model checkpoint into the local registry so future research tasks can discover and reuse it.

Usage

1. Data Preparation

Convert your dataset into the appropriate JSON format for MatGL training:

conda run -n matgl-agent python .agents/skills/ml-matgl-finetune/scripts/prepare_matgl_data.py \
    --data /path/to/training_data.json \
    --model CHGNet-MatPES-PBE-2025.2.10-2.7M-PES \
    --val-split 0.1 \
    --output-dir ./matgl_finetuned

2. Run Training

Fine-tune the model using the prepared data:

conda run -n matgl-agent python .agents/skills/ml-matgl-finetune/scripts/train_matgl.py \
    --train-data ./matgl_finetuned/train_data.json \
    --val-data ./matgl_finetuned/val_data.json \
    --model CHGNet-MatPES-PBE-2025.2.10-2.7M-PES \
    --epochs 10 \
    --lr 1e-3 \
    --batch-size 4 \
    --freeze-backbone \
    --output-dir ./matgl_finetuned

Training Configuration

MatGL fine-tuning is divided into a data preparation step (formatting nested dictionaries and converting lists) and a native training run utilizing PyTorch Lightning.

Read the full file on GitHub · 91 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 · 91 lines · 22 tokens per session scan A 1b41d435d732

Subscribe to this mod's changes

ml-matgl-finetune is a skill published in the GitHub repository learningmatter-mit/AtomisticSkills (158 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 1,428 once invoked, about $0.0001 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

hugging-face-trackio

Track and visualize ML training experiments with Trackio. Use when logging metrics during training (Python API) or retrieving/analyzing logged metrics (CLI). Supports real-time dashboard visualization, HF Space syncing, and JSON output for automation.

patchy631/ai-engineering-hub · 52 tokens

pysr

Use when fitting equations to data with PySR or SymbolicRegression.jl, when a user wants an interpretable formula, symbolic model, scaling law, or empirical relation discovered from numeric data, or when debugging a PySR search that is slow, stuck, or giving poor equations.

astroautomata/PySR · 61 tokens

cellxgene-census-query

Query CZ CELLxGENE Census (61M+ cells). Filter by cell type/tissue/disease, retrieve expression data, and integrate with scanpy/PyTorch for population-scale single-cell analysis. Use this skill when: (1) Querying single-cell expression data by cell type, tissue, or disease, (2) Exploring available single-cell datasets…

PharMolix/OpenBioMed · 105 tokens

HomeSafe-Bench

VLM indoor safety hazard detection benchmark inspired by HomeSafeBench (arXiv 2509.23690).

SharpAI/DeepCamera · 28 tokens

depth-estimation

Real-time depth map privacy transforms using Depth Anything v2 (CoreML + PyTorch).

SharpAI/DeepCamera · 22 tokens

start-experiment

Start the autoresearch optimization loop for a specific model + lane. Resolves the hierarchical program.md (root → model → lane), asks the user for hardware (local TPU VM or GKE cluster of a specified TPU type + topology), discovers available clusters from .env/, checks occupancy with USERPREFIX-aware attribution…

vlasenkoalexey/tpu_performance_autoresearch_wiki · 103 tokens