fair-simulation-packager
FreeRuns bundled scriptsNot checkedCreate FAIR-minded reproducibility bundles for materials simulations by collecting input/output file inventories, hashes, units, engine versions, structure…
About this skill
FAIR Simulation Packager
Goal
Build a minimal reproducibility manifest for materials simulation results so another person or agent can understand what was run, with which inputs, and how outputs should be interpreted.
Requirements
- Python 3.10+
- No external dependencies
- Works on Linux, macOS, and Windows
Inputs to Gather
| Input | Description | Example |
|---|---|---|
| Project name | Human-readable bundle name | al-cu-diffusion-study |
| Engine | Simulation code | LAMMPS, VASP, MOOSE |
| Input files | Files needed to rerun | in.lammps,data.lmp |
| Output files | Files needed to verify results | log.lammps,traj.dump |
| Structure ID | Database or local identifier | mp-149 |
| Units | Field/unit mapping | energy=eV,length=angstrom |
Decision Guidance
- Always include input files, output files, code version, and units.
- Include hashes for every file that exists locally.
- Include structure identifiers when using Materials Project, NOMAD, OPTIMADE, CIF, POSCAR, or internal database records.
- Record missing files as warnings instead of silently dropping them.
Script Outputs
scripts/fair_packager.py --json prints an envelope with two top-level keys:
inputs: the parsed CLI arguments echoed back (note:inputs.inputsis the raw comma-separated string passed via--inputs, not the per-file records).results: contains a single keymanifest.
results.manifest contains these fields:
project_name,engine,engine_version,structure_id,unitsfile_inventorywithinputsandoutputs, each a list of per-file records (path,exists, and when the file exists,size_bytesandsha256)missing_files: paths that do not exist on diskprovenance(working_directory,manifest_schema)fair_checks:has_inputs,has_outputs,has_units,has_engine_version, andhas_hashes_for_existing_files(true/false, ornullwhen no files exist so the check is not applicable)recommended_next_steps
Parse fields at results.manifest.<field>. When --out PATH is given, only the bare
manifest object (not the inputs/results envelope) is written to PATH.
Workflow
python3 skills/data-management/fair-simulation-packager/scripts/fair_packager.py \
--project-name al-cu-diffusion \
--engine LAMMPS \
--inputs in.lammps,data.lmp \
--outputs log.lammps,traj.dump \
--units energy=eV,length=angstrom,time=ps \
--structure-id local:alcu-cell-001 \
--json
Use --out manifest.json only when the user wants a manifest file written.
Error Handling
Missing files are reported in missing_files (exit code 0). Invalid input stops with
exit code 2: malformed unit entries, fields containing control characters, fields longer
than 4096 characters, more than 1000 input or output entries, or a file larger than
500 MB. Note that ordinary file paths — including absolute paths and paths containing
.. — are accepted and inventoried; the tool reads file contents only to compute
metadata and SHA-256 hashes.
Limitations
This skill creates a metadata manifest. It does not upload to NOMAD, Materials Project, or an OPTIMADE provider.
Verification checklist
- Confirmed
fair_checks.has_hashes_for_existing_filesistrue(notnullorfalse); anullmeans no listed file existed on disk, so re-run from the directory where the files actually live before trusting the manifest. - Reviewed
missing_filesand confirmed it is empty, or recorded an explicit reason for each entry — every missing path means an input/output was named but not hashed, so the bundle is not reproducible as-is. - Spot-checked at least one
sha256inresults.manifest.file_inventoryagainst an independentsha256sum/Get-FileHashof the same file to confirm the recorded digest matches the bytes on disk. - Confirmed
engine_versionis a real version string and not the default"unknown"; pass--engine-versionso the bundle records the exact code build. - Verified
unitsis non-empty and every reported quantity (energy, length, time, etc.) has an entry, so downstream consumers do not have to guess the unit system. - Confirmed
structure_idis populated when a Materials Project / NOMAD / OPTIMADE / CIF / POSCAR structure was used, so the structure identity is recoverable. - When
--out PATHwas used, openedPATHand confirmed it holds the baremanifestobject (not theinputs/resultsenvelope) and that no unintended path outside the working directory was written.
Common pitfalls & rationalizations
| Tempting shortcut | Why it's wrong / what to do |
|---|---|
| "It exited 0, so the bundle is complete." | Exit 0 only means no validation error; missing files are reported in missing_files with exit 0. Inspect missing_files and fair_checks before trusting completeness. |
"has_hashes_for_existing_files is null, c |
Install fair-simulation-packager in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
ReadBashWriteGrepGlobBundled files
FAQ
What does the fair-simulation-packager skill do?
Create FAIR-minded reproducibility bundles for materials simulations by collecting input/output file inventories, hashes, units, engine versions, structure identifiers, provenance, and NOMAD/OPTIMADE/Materials Project friendly metadata. Use before publishing, sharing, archiving, or handing simulation results to another agent.
How do I install the fair-simulation-packager skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the fair-simulation-packager skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic