Agent skill

ML Matgl Finetune

by learningmatter-mit in learningmatter-mit/AtomisticSkills

Fine-tune MatGL machine learning interatomic potentials on custom datasets.

MITAuto-check passedAI & LLM Engineering

Install ML Matgl Finetune

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill ml-matgl-finetune -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills ml-matgl-finetune --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/learningmatter-mit/AtomisticSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ml-matgl-finetune .claude/skills/ml-matgl-finetune && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ml-matgl-finetune
GitHub stars
176
Token cost
~1.4k tokens
SKILL.md length
557 words
Files
8 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Fine-tune MatGL machine learning interatomic potentials on custom datasets.

  • Works in 2 steps: Data Preparation → Run Training
  • Tasks that involve Fine-tuning
  • SKILL.md covers Goal, Instructions, Usage and Training Configuration, plus 1 more section
  • Runs Python scripts from its folder

What it does

ML Matgl Finetune is an agent skill from learningmatter-mit/AtomisticSkills. Fine-tune MatGL machine learning interatomic potentials on custom datasets.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts (for example `examples/matgl-wbm-finetune/README.md`, `examples/matgl-wbm-finetune/finetune_record.json` and `examples/matgl-wbm-finetune/training_history.json`).

It sits in AI & LLM Engineering, covering Fine-tuning and Machine learning. The repository describes itself as: Integrating AtomisticSkills into Agentic IDEs (Cursor, Claude Code, Codex, Google Antigravity, Hermes Agent, etc). The licence is MIT.

When your agent uses it

  • Tasks that involve Fine-tuning
  • Tasks that involve Machine learning

Example prompts

  • “/ml-matgl-finetune”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Data Preparation
  2. Run Training

What it can do on your machine

Read from SKILL.md and the folder at commit 6257444. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

ML Matgl Finetune loads about 1.4k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 557 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from learningmatter-mit/AtomisticSkills at commit 6257444, republished under its MIT licence (© learningmatter-mit). 557 words, ~1,372 tokens.

Download SKILL.mdSave it as .claude/skills/ml-matgl-finetune/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
ml-matgl-finetune
description
Fine-tune MatGL machine learning interatomic potentials on custom datasets.
metadata.category
machine-learning
metadata.venv
mlip

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:

bash
${CLAUDE_SKILL_DIR}/../../venv/run mlip python ${CLAUDE_SKILL_DIR}/scripts/prepare_matgl_data.py \
    --data /path/to/training_data.json \
    --model CHGNet-PES-MatPES-PBE-1M-2026.9 \
    --val-split 0.1 \
    --output-dir ./matgl_finetuned
2. Run Training

Fine-tune the model using the prepared data:

bash
${CLAUDE_SKILL_DIR}/../../venv/run mlip python ${CLAUDE_SKILL_DIR}/scripts/train_matgl.py \
    --train-data ./matgl_finetuned/train_data.json \
    --val-data ./matgl_finetuned/val_data.json \
    --model CHGNet-PES-MatPES-PBE-1M-2026.9 \
    --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.

Data Preparation Arguments (prepare_matgl_data.py)
KeyTypeDefaultDescription
--datastr(Required)Path to JSON file containing ASE/pymatgen structure dictionaries
--modelstrCHGNet-MatPES-PBE-2025...Base model name or path to a checkpoint
--output-dirstr./fine_tuningDirectory to save the processed data
--val-splitfloat0.1Fraction of data to set aside for validation
--seedint42Random seed for splitting validation data
--vasp-stress-conversionflag-If set, multiplies stress values by -1/160.2x to convert VASP raw kB to eV/ų
Training Arguments (train_matgl.py)
KeyTypeDefaultDescription
--train-datastr(Required)Path to JSON file containing training data
--val-datastrNonePath to JSON file containing validation data (optional)
--modelstrCHGNet-MatPES-PBE-2025...Base model name or path to a checkpoint
--epochsint10Number of training epochs
--lrfloat1e-3Learning rate
--batch-sizeint4Training batch size
--devicestrautoTarget compute device (cuda or cpu)
--output-dirstr./fine_tuningDirectory to save the fine-tuned model and logs
--freeze-backboneflag-Freeze backbone (interaction blocks); only readout heads are trained
--reinit-headflag-Re-initialize readout head weights
--schedulerstrCosineAnnealingLRCosineAnnealingLR or ReduceLROnPlateau
--patienceintNoneEarly stopping patience (epochs)
--energy-weightfloat1.0Loss weight for energy
--force-weightfloat1.0Loss weight for forces
--stress-weightfloat0.1Loss weight for stress
Show full SKILL.md (161 more words)Show less

Constraints

  • Data Size: For small datasets, --freeze-backbone is strongly recommended to prevent catastrophic forgetting.
  • Reference Energies (element_refs): If your fine-tuning data is computed using the same DFT functional (e.g., PBE) as the foundation model's original training data, you should reuse the foundation model's original isolated atom reference energies instead of re-fitting them. This maintains thermodynamic compatibility across the periodic table.
  • Environment: Runs in the mlip environment (venv/run mlip ...). MatGL >= 4 uses PyTorch Geometric only; there is no DGL backend.
  • Stress Units: MatGL inherently converts stress internally to GPa, however the standard expected inputs directly into its JSON files are eV/ų. Raw VASP stress obtained directly via some JSON files may be in kilo-Bar (kB). The Atomate2 MCP tool handles this conversion automatically when convert_units=True. However, if your JSON labels contain raw kB stress, you MUST pass the --vasp-stress-conversion flag to scripts/prepare_matgl_data.py to automatically scale them by -1/160.2x. For more details on unit standardization, see @[skills/general-property-units/SKILL.md].

Author: Bowen Deng Contact: GitHub @learningmatter-mit

© learningmatter-mit, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts) in skills/ml-matgl-finetune of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/matgl-wbm-finetune/README.md
  • examples/matgl-wbm-finetune/finetune_record.json
  • examples/matgl-wbm-finetune/training_history.json
  • examples/matgl-wbm-finetune/training_history.png
  • scripts/generate_matgl_config.py
  • scripts/prepare_matgl_data.py
  • scripts/train_matgl.py

Open the folder on GitHubat commit 6257444

Compare with similar skills

ML Matgl Finetune next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

ML Matgl Finetune compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
ML Matgl Finetune this skilllearningmatter-mit/AtomisticSkills176—~1.4kAutomated safety check: PassMIT
Unimoljinzhezenggroup/computational-chemistry-agent-skills1481 repos~1.5kAutomated safety check: PassLGPL-3.0-or-later
Adapting Transfer Learning Modelsjeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Deepmd TrainHello-QM/catgo-LRG2051 repos~1.1kAutomated safety check: PassAGPL-3.0
ML Research LabAnastasiyaW/codex-claude-code-config154—~794Automated safety check: PassMIT
RuView Model Trainingruvnet/RuView97k—~1.3kAutomated safety check: NotesMIT

Similar skills

  • Unimol

    jinzhezenggroup/computational-chemistry-agent-skills

    A standardized CLI wrapper for Uni-Mol molecular ML workflows that handles representation extraction (embeddings), model training (regression/classification), and property prediction with built-in…

    148 GitHub starsUsed in 1 repo~1.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Deepmd Train

    Hello-QM/catgo-LRG

    Train DeePMD-kit machine learning potentials. An agent skill from Hello-QM/catgo-LRG.

    205 GitHub starsUsed in 1 repo~1.1k tokens
    AI & LLM EngineeringAuto-check passed
  • ML Research Lab

    AnastasiyaW/codex-claude-code-config

    Machine-learning research loop for dataset curation, fine-tuning, evaluation, inference deployment, experiment tracking, and model explainability.

    154 GitHub stars~794 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Trains and evaluates several WiFi-signal-based pose and sensing models, from unsupervised pose estimation to domain adaptation and publishing.

    97k GitHub stars~1.3k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • ML Experiment Iteration

    Leeroo-AI/superml

    Produces ranked, evidence-grounded next steps when an ML experiment has stalled, drawing on a Leeroopedia knowledge base or on fetched docs and issues.

    195 GitHub stars~4.8k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed

More from learningmatter-mit/AtomisticSkills

All 129 skills in this repo
  • Drug Binding Site Definition

    learningmatter-mit/AtomisticSkills

    Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.

    176 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

    Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.

    176 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Drug Pocket Detection

    learningmatter-mit/AtomisticSkills

    Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).

    176 GitHub stars~4k tokensUpdated today
    Auto-check passed
  • Chem Bond Dissociation

    learningmatter-mit/AtomisticSkills

    Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.

    176 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Chem Conformer Search

    learningmatter-mit/AtomisticSkills

    Generate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting.

    176 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

    Query multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al.

    176 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about ML Matgl Finetune

What does ML Matgl Finetune do?

Fine-tune MatGL machine learning interatomic potentials on custom datasets. ML Matgl Finetune is an agent skill from learningmatter-mit/AtomisticSkills. Fine-tune MatGL machine learning interatomic potentials on custom datasets.

When should I use ML Matgl Finetune?

ML Matgl Finetune fits situations like: tasks that involve Fine-tuning; tasks that involve Machine learning.

How do I install ML Matgl Finetune in Claude Code?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill ml-matgl-finetune -a claude-code`. Or copy the skill folder (skills/ml-matgl-finetune in learningmatter-mit/AtomisticSkills) into .claude/skills/ml-matgl-finetune in your project. Claude Code loads it when a task matches its description.

How do I install ML Matgl Finetune in Codex?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill ml-matgl-finetune -a codex`. Or copy the skill folder (skills/ml-matgl-finetune in learningmatter-mit/AtomisticSkills) into .agents/skills/ml-matgl-finetune in your project. Codex loads it when a task matches its description.

Can I use ML Matgl Finetune in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add learningmatter-mit/AtomisticSkills --skill ml-matgl-finetune -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ml-matgl-finetune, .gemini/skills/ml-matgl-finetune, .github/skills/ml-matgl-finetune and .opencode/skills/ml-matgl-finetune in your project.

What does ML Matgl Finetune need to run?

Going by SKILL.md and its folder, ML Matgl Finetune needs Python for the scripts in its folder. Our summary lists: Python 3.

Does ML Matgl Finetune access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is ML Matgl Finetune safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does ML Matgl Finetune use?

ML Matgl Finetune is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does ML Matgl Finetune use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to ML Matgl Finetune?

Skills that share tags, products or a category with ML Matgl Finetune: Unimol (jinzhezenggroup/computational-chemistry-agent-skills, 148 stars), Adapting Transfer Learning Models (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Deepmd Train (Hello-QM/catgo-LRG, 205 stars) and ML Research Lab (AnastasiyaW/codex-claude-code-config, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains ML Matgl Finetune?

learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 176 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 7, 2026.

Source: learningmatter-mit/AtomisticSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.