agentleFS
jskhermanjskherman/engg-skills/skills/process-units-conversion/SKILL.md

process-units-conversion

Skill7 starsChanged 6 months agoApache-2.0View on GitHub

Convert chemical/process engineering quantities between SI, US Customary, CGS, and mixed-unit forms with explicit dimensional checks. Use when an input is given in non-SI units or when an output needs to be reported in a different unit system. Don't use as a substitute for a property calculation (use thermo-process-properties or vle-flash-calculations); unit conversion only converts magnitudes, not properties that depend on T, P, or composition.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the script; inspect the JSON for the SI value as well.

    line 62
  2. Distinctive:

    If the result is suspicious (off by a factor of 10), check whether you confused similar units (e.g.

    line 63
  3. Distinctive:

    If the requested unit is not in the registry, surface to the user.

    line 84
  4. Distinctive:

    NOT guess the conversion factor.

    line 85
  5. Very specific:

    Run the listed script with representative inputs and an --output file when a deterministic calculation is available.

    line 91
  6. Distinctive:

    Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Process Units Conversion

Overview

Deterministic unit conversions for the common process-engineering quantities (flow, pressure, viscosity, thermal conductivity, energy, temperature, length, area, volume, density, mass). All calculations are SI under the hood; converting to or from a non-SI unit goes through the SI value.

Prerequisites

  1. uv available.

When to Use

  • An input is given in psia, bar, lbm/hr, gpm, cP, ft, in, etc., and you need SI before calling another skill.
  • The user requests output in non-SI units (e.g. shop-floor reporting).
  • You need to sanity-check a vendor data sheet expressed in mixed units.

Don't use for

  • Computing properties that depend on state (density, viscosity, heat capacity) — those need a property package (thermo-process-properties).
  • Currency, financial, or non-physical conversions.
  • Unit groups that are NOT pure conversions (e.g. API gravity to density depends on water reference; check the underlying definition).

Utility Scripts

  • uv run scripts/convert_units.py convert --value 100 --from-unit psi --to-unit Pa --output /tmp/p.json
  • uv run scripts/convert_units.py convert --value 2.5 --from-unit gpm --to-unit m3_s --output /tmp/q.json
  • uv run scripts/convert_units.py list-units --output /tmp/units.json

Procedure

  1. Identify the source unit and the target unit.
  2. Confirm the conversion is purely dimensional (no T/P/composition dependence).
  3. Run the script; inspect the JSON for the SI value as well.
  4. If the result is suspicious (off by a factor of 10), check whether you confused similar units (e.g. psia vs psig, bar vs barg, mol/h vs kmol/h).

Pitfalls

  • Treating gauge pressure (psig, barg) as absolute (psia, bara). The skill is unit-of-quantity, not gauge-vs-absolute; you must subtract / add atmospheric pressure yourself.
  • Mixing mass and molar flow ("kg/s vs kmol/s"); they are different dimensions and the skill will refuse them.
  • Treating "Bbl" or "STB" without specifying the reference (oil vs water).
  • Treating Celsius and Kelvin as interchangeable for delta-T calculations (they are; for absolute, they are not). Convert intentionally.
  • Treating cP and cSt as the same; cP is dynamic viscosity, cSt is kinematic viscosity (= dynamic / density).
  • Converting GPM to m³/s and forgetting US-vs-Imperial gallons.
  • Inputting flow in "mol%" when the schema expects mole fraction.
  • Reporting a converted value with more digits than the source warrants.

Fallback Strategies

  • If the requested unit is not in the registry, surface to the user; do NOT guess the conversion factor.
  • For non-trivial conversions (e.g. API gravity, gas SCF at standard conditions), use a dedicated property routine instead.

Verification

  • Run the listed script with representative inputs and an --output file when a deterministic calculation is available.
  • Confirm the JSON result contains ok: true, expected units, and no unhandled warnings.
  • Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.

References

  • references/unit_conventions.md — supported quantities and units.

Anti-Patterns

  • Embedding a "convenient" conversion factor in another script instead of routing through this skill.
  • Reporting bar and psi values together without naming gauge vs absolute.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.