ml-cluster-expansion

ml-cluster-expansion is a skill for Claude Code, Codex from learningmatter-mit/AtomisticSkills. It costs 24 tokens per session (1,833 once invoked), scanned A, original, MIT.

train a Cluster Expansion (CE) for lattice-based Monte Carlo simulation of disordered materials.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/ml-cluster-expansion.svg)](https://agentmods.dev/skills/learningmatter-mit/atomisticskills/ml-cluster-expansion)
Your own site
<a href="https://agentmods.dev/skills/learningmatter-mit/atomisticskills/ml-cluster-expansion"><img src="https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/ml-cluster-expansion.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,833 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.00024 $0.01833
Opus 5 $0.00012 $0.00916
Sonnet 5 $0.00005 $0.00367
Haiku 4.5 $0.00002 $0.00183

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

Security

Grade A, and why

ml-cluster-expansion 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 5 executable files (examples/pdptag_ternary_surface/analyze_mc.py, examples/pdptag_ternary_surface/parse_atat.py, examples/pdptag_ternary_surface/parse_primordial.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-cluster-expansion/SKILL.md · 175 lines

How it starts

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

Cluster Expansion

Goal

To automatically build and refine a Cluster Expansion (CE) model for a disordered material system using an Agent-driven iterative workflow that leverages MCP tools for efficient training, sampling, and labeling.

Workflow Overview

  1. Preparation: Generate a disordered primordial structure.
  2. Iteration 0: systematic enumeration to generate initial structures.
  3. Labeling: Relax structures with an MLIP (e.g., MACE, CHGNet) via MCP.
  4. Training: Train the CE model using mcp_smol_train_cluster_expansion.
  5. Sampling: Run MC with mcp_smol_run_monte_carlo to explore configuration space.
  6. Selection: Extract structures from MC, compute features, and select novel configurations.
  7. Loop: Repeat labeling, training, and sampling until convergence.

Step 1: Prepare the Primordial Structure

Use prepare_disordered.py to handle symmetry refinement and disorder creation. It is highly recommended to save the primordial structure as a JSON file to preserve exact occupancy and species information, avoiding "unrecognized species" errors during matching.

# Env: smol-agent
python .agents/skills/ml-cluster-expansion/scripts/prepare_disordered.py \
    input_structure.cif \
    Li \
    0.5 \
    -o primordial.cif

Step 2: Iteration 0 (Ordered Structure Sampling)

Generate an initial set of structures using systematic enumeration and D-optimality via the MCP tool. It is recommended to generate around 1000 structures to ensure high coverage of the configuration space.

# MCP Tool: mcp_smol_sample_ordered_structures
result = mcp_smol_sample_ordered_structures(
    disordered_structure="primordial.cif",
    cutoffs={2: 5.0, 3: 4.0},
    num_structures=1000,
    target_num_sites=32,
    output_dir="./ce_project/iter_0/to_label"
)

[!NOTE] Training Workflow: You can perform a Simple Training by only using the initially sample_ordered_structures set. This is often sufficient for basic property predictions. For high-accuracy ground-state exploration, you should continue with the Active Learning loop (MC sampling and iterative refinement).

Read the full file on GitHub · 175 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 · 175 lines · 24 tokens per session scan A 4d480ada5130

Subscribe to this mod's changes

ml-cluster-expansion is a skill published in the GitHub repository learningmatter-mit/AtomisticSkills (158 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 1,833 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

gradio-themes

Build and customise Gradio themes. Use when creating, editing, or publishing Python-based Gradio themes that control colours, typography, spacing, shadows, and dark mode.

gradio-app/gradio · 39 tokens

fixing-streamlit-ci

Analyze and fix failed GitHub Actions CI jobs for the current branch/PR. Use when CI checks fail, PR checks show failures, or you need to diagnose lint/type/test errors and verify fixes locally.

streamlit/streamlit · 47 tokens

hf-gradio

Use Gradio applications via API. Use when the user asks for to generate a prediction from a Gradio app on Hugging Face spaces or public URL. For example, "Generate an image using black-forest-labs/FLUX.2-dev".

gradio-app/gradio · 55 tokens

hugging-face-paper-publisher

Publish and manage research papers on Hugging Face Hub. Supports creating paper pages, linking papers to models/datasets, claiming authorship, and generating professional markdown-based research articles.

patchy631/ai-engineering-hub · 42 tokens

reviewing-readability

Evaluates comments, docstrings, and naming in code for readability by a developer new to the codebase — is the documentation clear and concise, and is non-obvious logic documented? Produces findings with concrete proposed rewrites (or additions where documentation is missing); the caller decides whether to apply them…

streamlit/streamlit · 108 tokens

reviewing-pr-description

Evaluates a PR's title and description for readability — do they clearly and concisely convey what changed and why to a reviewer? Produces findings with concrete proposed rewrites; the caller decides whether to apply them or present them as feedback. Use when finalizing a PR or reviewing PR metadata. For code…

streamlit/streamlit · 81 tokens