Computes finite-temperature CALPHAD equilibria, phase fractions, and phase compositions from thermodynamic TDB databases using pycalphad.

MITAuto-check passedResearch & Science

Install Pycalphad

skills CLI
$ npx skills add K-Dense-AI/scientific-agent-skills --skill pycalphad -a claude-code

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

GitHub CLI
$ gh skill install K-Dense-AI/scientific-agent-skills pycalphad --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/K-Dense-AI/scientific-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pycalphad .claude/skills/pycalphad && 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
pycalphad
GitHub stars
48k
Used in
1 other repo
Token cost
~2k tokens
SKILL.md length
850 words
Files
5 (incl. scripts, references, assets)
Skills in repo
153
Repo updated
First seen
Licence
MIT

At a glance

Computes finite-temperature CALPHAD equilibria, phase fractions, and phase compositions from thermodynamic TDB databases using pycalphad.

  • Works in 6 steps: Identify the TDB's source, license,… → Inspect database elements and phases.… → Copy assets/equilibrium.json. Specify… → …
  • Alloy phase stability
  • SKILL.md covers When to use, Workflow, Execute the tested example and Outputs and acceptance, plus 1 more section
  • Runs Python scripts from its folder; calls uv and python

What it does

Pycalphad is an agent skill from K-Dense-AI/scientific-agent-skills. Computes finite-temperature CALPHAD equilibria, phase fractions, and phase compositions from thermodynamic TDB databases using pycalphad. Use for alloy phase stability, equilibrium temperature sweeps, tie lines, lever-rule checks, or reproducible phase-fraction calculations with explicit components and mole-fraction conditions.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts, reference files and assets (for example `assets/equilibrium.json`, `references/model-and-validation.md` and `scripts/equilibrate.py`). Compatibility notes: Requires Python 3.12+, pycalphad 0.11.2, and NumPy. Installation needs network access; calculations run locally without credentials. Real-material predictions…

It sits in Research & Science. The repository describes itself as: Turn any AI agent into an AI Scientist. The 1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific… The licence is MIT.

When your agent uses it

  • Alloy phase stability
  • Equilibrium temperature sweeps
  • Lever-rule checks
  • Reproducible phase-fraction calculations with explicit components and mole-fraction conditions

Example prompts

  • “Use the pycalphad skill to compute finite-temperature CALPHAD equilibria, phase fractions, and phase compositions from thermodynamic TDB databases…”
  • “/pycalphad”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires Python 3.12+, pycalphad 0.11.2, and NumPy. Installation needs network access; calculations run locally without credentials. Real-material predictions require a suitable licensed thermodynamic database.

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Identify the TDB's source, license, assessment/publication, valid temperature/pressure
  2. Inspect database elements and phases. Select the relevant phases deliberately; record
  3. Copy assets/equilibrium.json. Specify exactly N-1 elemental
  4. Declare the database temperature interval from its assessment if known, or set
  5. Run the calculation. Check finite Gibbs energies, phase fractions summing to one,
  6. Deliver phase fractions with their molar basis, phase compositions, database hash,

What it can do on your machine

Read from SKILL.md and the folder at commit 92ace75. 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 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • python

    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):

    • pycalphad.org
    • 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.

  • Compatibility

    Requires Python 3.12+, pycalphad 0.11.2, and NumPy. Installation needs network access; calculations run locally without credentials. Real-material predictions require a suitable licensed thermodynamic database.

    From compatibility in the SKILL.md frontmatter.

Context cost

Pycalphad loads about 2k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 85 tokens; SKILL.md has 850 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.6k

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 K-Dense-AI/scientific-agent-skills at commit 92ace75, republished under its MIT licence (© K-Dense-AI). 850 words, ~2,049 tokens.

Download SKILL.mdSave it as .claude/skills/pycalphad/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
pycalphad
description
Computes finite-temperature CALPHAD equilibria, phase fractions, and phase compositions from thermodynamic TDB databases using pycalphad. Use for alloy phase stability, equilibrium temperature sweeps, tie lines, lever-rule checks, or reproducible phase-fraction calculations with explicit components and mole-fraction conditions.
compatibility
Requires Python 3.12+, pycalphad 0.11.2, and NumPy. Installation needs network access; calculations run locally without credentials. Real-material predictions require a suitable licensed thermodynamic database.
license
MIT
metadata.version
1.1
metadata.skill-author
K-Dense Inc.
metadata.tested-package-version
0.11.2
metadata.last-reviewed
2026-10-01

pycalphad: TDB equilibrium calculations

When to use

Use for equilibrium phase fractions and compositions at a fixed bulk elemental mole composition, specified pressure, and a list of finite temperatures. The bundled helper executes real pycalphad equilibria, checks mass balance, repeats at greater sampling density, and exports each stable composition set separately.

Equilibrium is constrained by the selected database, components, phases, and conditions. It does not predict precipitation rates, retained metastable microstructures, or properties of phases missing from the database. Successful numerical checks do not establish the database's experimental accuracy.

Workflow

  1. Identify the TDB's source, license, assessment/publication, valid temperature/pressure and composition range, and required elements. Use the user's database for real alloys. The bundled assets/ideal-cu-ni.tdb is an original hypothetical teaching model, not an assessed Cu-Ni database.
  2. Inspect database elements and phases. Select the relevant phases deliberately; record exclusions because they can turn the calculation into a metastable constrained result. Include VA where required by sublattice models. Vacancies are not an independent bulk mole fraction. Keep coupled order/disorder definitions in the TDB, but do not select both partners as separate candidates when the ordered model already includes the disordered contribution; the helper rejects such filtered candidate lists.
  3. Copy assets/equilibrium.json. Specify exactly N-1 elemental mole fractions and one dependent non-vacancy element. The dependent fraction is 1 - sum(independent fractions); fractions are not silently normalized. Set K and Pa. Convert weight percentages or mass fractions before using this helper.
  4. Declare the database temperature interval from its assessment if known, or set database_temperature_range_k to null if unknown. This is user-supplied evidence, not a range automatically inferred from every TDB function. Requests outside a declared interval fail. Check pressure and composition validity separately.
  5. Run the calculation. Check finite Gibbs energies, phase fractions summing to one, reconstructed bulk composition, and stability to doubled pdens (phase-constitution sampling density). Near transitions, refine temperatures and sampling density further.
  6. Deliver phase fractions with their molar basis, phase compositions, database hash, conditions, excluded phases, and any numerical or assessment limitations.

Read references/model-and-validation.md for the analytic example, basis conversion, native Model/Workspace/property/plot contracts, miscibility-gap handling, and convergence limits.

Execute the tested example

From the collection root:

bash
uv run --no-project --python 3.12 --with pycalphad==0.11.2 --with numpy==2.5.3 \
  python skills/pycalphad/scripts/equilibrate.py \
  skills/pycalphad/assets/ideal-cu-ni.tdb \
  skills/pycalphad/assets/equilibrium.json equilibrium-result

Tested on Python 3.12, pycalphad 0.11.2, and NumPy 2.5.3. Use a new output directory. All thermodynamic calculations are local; the script does not upload a TDB.

For the supplied hypothetical model at X(Ni)=0.5 and 101325 Pa:

TemperatureEquilibrium result
900 KFCC_A1 only
1100 K0.5 FCC_A1 + 0.5 LIQUID; X(Ni) approximately 0.527307 and 0.472693 respectively
1300 KLIQUID only

The suite verifies analytic common-tangent compositions, a noncentral lever-rule case, Gibbs energy, mass balance, both single-phase limits, and actual same-phase miscibility gap vertices. These validate the computational workflow, not real Cu-Ni metallurgy.

Show full SKILL.md (402 more words)Show less

Outputs and acceptance

  • report.json: settings and versions, TDB/settings SHA-256, excluded database phases, requested, solver-imposed, and reconstructed bulk compositions, per-temperature baseline/refined results, and checks. Experimental validity is not evaluated by the helper.
  • phase-equilibria.csv: one row per stable vertex per temperature and sampling run, including phase name, molar phase fraction, and elemental mole fractions. Its Gibbs energy column is the whole-system molar Gibbs energy, repeated for each vertex; it is not the individual phase energy.

Unused pycalphad vertices have blank names and NaN values; those are omitted. Named vertices with invalid values cause failure. Multiple vertices with the same phase name are retained because a miscibility gap can contain two composition sets of one phase. Vertex indices do not track the same physical phase continuously across temperatures.

In stable 0.11.2, pycalphad clips independent mole fractions to [1e-10, 1-1e-10]. Each result records solver_bulk_mole_fractions and the largest absolute difference from the requested bulk in composition_condition_adjustment_absolute_error. Mass-balance checks still compare against the requested composition; a tighter tolerance can therefore fail at an endpoint. Do not claim exact pure-component or ultratrace results from a clipped multicomponent calculation.

all_checks_passed requires each run's phase-sum and bulk-composition residuals within mass_balance_tolerance, phase totals stable within phase_fraction_tolerance, and system Gibbs energy stable within gibbs_energy_tolerance_j_per_mol when pdens doubles. This comparison does not certify the global minimum or track individual composition-set movement within a same-phase miscibility gap; inspect their exported compositions too. Failed checks remain visible in the report rather than being relabeled as convergence.

Boundaries and upstream contracts

The helper handles elemental mole fractions, one composition, one pressure, and up to 1000 explicit positive temperatures. It validates selected phases through pycalphad's phase-compatibility rules; incompatible or automatically filtered order/disorder phase sets produce an explicit error. It does not silently remove requested phases.

Charged-species constraints, externally imposed chemical potentials, custom models, activity reference-state changes, and database optimization require additional modeling and are outside this helper's tested scope. Do not extrapolate the pedagogical asset to real material selection or heat-treatment decisions.

Upstream latest documentation currently describes 0.11.3 development builds. The bundled helper and the reference's native examples were exercised against stable 0.11.2 on 2026-10-01; the release's source was checked against the installed wheel. No remote thermodynamic calculation or database-fetch API is used. Database loads a local path, file-like object, or TDB text; a URL is not a supported download shortcut.

© K-Dense-AI, 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 4 other files (scripts, references, assets) in skills/pycalphad of K-Dense-AI/scientific-agent-skills.

  • SKILL.md
  • assets/equilibrium.json
  • assets/ideal-cu-ni.tdb
  • references/model-and-validation.md
  • scripts/equilibrate.py

Open the folder on GitHubat commit 92ace75

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in K-Dense-AI/scientific-agent-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Pycalphad 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.

Pycalphad compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pycalphad this skillK-Dense-AI/scientific-agent-skills48k1 repos~2kAutomated safety check: PassMIT
Hypothesis Generationspacering-net/codeg3.9k14 repos~3.6kAutomated safety check: NotesMIT
GitHub Deep Researchbytedance/deer-flow84k4 repos~1.3kAutomated safety check: PassMIT
Nature Paper CardYuan1z0825/nature-skills47k2 repos~2.1kAutomated safety check: PassApache-2.0
Content Research Writerweapp-tailwindcss/weapp-tailwindcss1.9k25 repos~3.5kAutomated safety check: PassMIT
Peer Reviewspacering-net/codeg3.9k17 repos~5.9kAutomated safety check: NotesMIT

Similar skills

  • Hypothesis Generation

    spacering-net/codeg

    Structured hypothesis formulation from observations. An agent skill from spacering-net/codeg.

    3.9k GitHub starsUsed in 14 repos~3.6k tokens
    Research & ScienceAuto-check: notes
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    84k GitHub starsUsed in 4 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Nature Paper Card

    Yuan1z0825/nature-skills

    Builds a structured deep-reading card for one scientific paper, covering methods, how experiments support claims, limitations and research ideas, with a script to prepare the source.

    47k GitHub starsUsed in 2 repos~2.1k tokens
    Research & ScienceAuto-check passed
  • Content Research Writer

    weapp-tailwindcss/weapp-tailwindcss

    Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section.

    1.9k GitHub starsUsed in 25 repos~3.5k tokens
    Research & ScienceAuto-check passed
  • Peer Review

    spacering-net/codeg

    Structured manuscript/grant review with checklist-based evaluation.

    3.9k GitHub starsUsed in 17 repos~5.9k tokens
    Research & ScienceAuto-check: notes
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.9k tokensUpdated yesterday
    Research & ScienceAuto-check: notes

More from K-Dense-AI/scientific-agent-skills

All 153 skills in this repo
  • 13C Metabolic Flux Analysis

    K-Dense-AI/scientific-agent-skills

    Estimates reaction fluxes inside cells from steady-state carbon-13 labeling data with a bundled mfapy-based solver, and reports which fluxes the data pin down.

    48k GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed
  • Analytical Method Validation Planner

    K-Dense-AI/scientific-agent-skills

    Plans, runs, and documents analytical method validation, verification, or transfer studies under ICH Q2(R2)/Q14, USP, ICH M10, CLSI EP, or ISO/IEC 17025.

    48k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check: notes
  • Cantera Ignition Delay

    K-Dense-AI/scientific-agent-skills

    Runs Cantera constant-volume or constant-pressure ignition simulations and reports temperature-based ignition delay with mechanism provenance and checks.

    48k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • DiffDock Molecular Docking

    K-Dense-AI/scientific-agent-skills

    Predicts how small molecules bind to a protein with DiffDock, covering batch docking, pose ranking by confidence and checks on the results; not for binding affinity.

    48k GitHub starsUsed in 1 repo~3k tokens
    Auto-check: notes
  • HypoGeniC Hypothesis Generation

    K-Dense-AI/scientific-agent-skills

    Plans and audits runs of the HypoGeniC and HypoRefine packages, which propose hypotheses from labeled text datasets, with local checks before any model call.

    48k GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • ISO Standards Readiness Evidence

    K-Dense-AI/scientific-agent-skills

    Organizes scope, controlled documents, risk files and traceability into draft evidence for human review against ISO 13485, 14971, 17025 and 15189.

    48k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check: notes

Questions about Pycalphad

What does Pycalphad do?

Computes finite-temperature CALPHAD equilibria, phase fractions, and phase compositions from thermodynamic TDB databases using pycalphad. Pycalphad is an agent skill from K-Dense-AI/scientific-agent-skills. Computes finite-temperature CALPHAD equilibria, phase fractions, and phase compositions from thermodynamic TDB databases using pycalphad.

When should I use Pycalphad?

Pycalphad fits situations like: alloy phase stability; equilibrium temperature sweeps; lever-rule checks; reproducible phase-fraction calculations with explicit components and mole-fraction conditions.

How do I install Pycalphad in Claude Code?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill pycalphad -a claude-code`. Or copy the skill folder (skills/pycalphad in K-Dense-AI/scientific-agent-skills) into .claude/skills/pycalphad in your project. Claude Code loads it when a task matches its description.

How do I install Pycalphad in Codex?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill pycalphad -a codex`. Or copy the skill folder (skills/pycalphad in K-Dense-AI/scientific-agent-skills) into .agents/skills/pycalphad in your project. Codex loads it when a task matches its description.

Can I use Pycalphad 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 K-Dense-AI/scientific-agent-skills --skill pycalphad -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pycalphad, .gemini/skills/pycalphad, .github/skills/pycalphad and .opencode/skills/pycalphad in your project.

What does Pycalphad need to run?

Going by SKILL.md and its folder, Pycalphad needs Python for the scripts in its folder and the command-line tools its instructions call (uv and python). Our summary lists: Python 3. Compatibility (from SKILL.md): Requires Python 3.12+, pycalphad 0.11.2, and NumPy. Installation needs network access; calculations run locally without credentials. Real-material predictions require a suitable licensed thermodynamic database..

Does Pycalphad access the network?

SKILL.md names 2 domains. As links in the text: pycalphad.org and github.com. This is read from the text; nothing was executed.

Is Pycalphad 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 Pycalphad use?

Pycalphad is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pycalphad use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.

What are the alternatives to Pycalphad?

Skills that share tags, products or a category with Pycalphad: Hypothesis Generation (spacering-net/codeg, 3.9k stars), GitHub Deep Research (bytedance/deer-flow, 84k stars), Nature Paper Card (Yuan1z0825/nature-skills, 47k stars) and Content Research Writer (weapp-tailwindcss/weapp-tailwindcss, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pycalphad?

K-Dense-AI (a GitHub organization) maintains it in K-Dense-AI/scientific-agent-skills, which has 48,095 GitHub stars. The repository holds 153 skills in this directory. The repository was last updated on October 5, 2026.

Source: K-Dense-AI/scientific-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.