pie-dimensional-analysis
Mathematical verification for physical calculations: unit tracking algebra (exponent maps), PhysicalQuantity pattern for compound units, SI/Imperial mixed-unit handling, Buckingham pi theorem for dimensionless groups, and common engineering dimensionless numbers. Activates for unit verification, dimensional consistency checks, scaling analysis, and calculation validation across all infrastructure domains.
npx skills add majiayu000/claude-skill-registry --skill dimensional-analysis --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
The skill provides a verification layer for physical calculations, tracking units as exponent maps, performing compound unit algebra, and detecting dimensional mismatches at each arithmetic step. It activates for unit verification, dimensional consistency checks, scaling analysis, and calculation validation across infrastructure domains. It supports converting mixed SI/Imperial inputs to SI, performing calculations in SI, and converting final outputs back to user-specified units. It derives dimensionless groups using the Buckingham pi theorem and recognizes common infrastructure dimensionless numbers (Reynolds, Nusselt, Prandtl, Grashof, Froude, Strouhal). It also validates outputs from a Calculator agent before committing to a CalculationRecord.
How it works
- Step 1: Convert Inputs — All inputs are converted to SI via
lib/units.ts, recorded as PhysicalQuantity with an explicit exponent map. - Step 2: Track Through Calculation — Each arithmetic step propagates units via multiply/divide rules; intermediate results carry their units.
- Step 3: Check Dimensional Homogeneity — At each addition or subtraction, uses
assertSameUnits(); on mismatch, the process stops and flags an error. - Step 4: Verify Result Units — Final result must have expected exponent map (e.g., pipe sizing { m: 1 }, pressure { kg: 1, m: -1, s: -2 }, flow rate { m: 3, s: -1 }).
- Step 5: Check Reasonableness — Dimensionless numbers should fall into expected ranges (e.g., Re thresholds, Nu/Pr checks).
- Calculation workflow includes a Worked Multi-Step Example and a pipe sizing verification to illustrate unit checks at each stage.
When to use it
Activated for unit verification, dimensional consistency checks, scaling analysis, and calculation validation. Triggers include unit conversion, dimensional homogeneity checks, and dimensionless analysis as described in the skill’s integration notes.
What it can touch
- Uses
lib/units.tsfor SI conversions and PhysicalQuantity arithmetic. - Applies
assertSameUnits()to validate unit consistency during additions/subtractions. - Final result units are verified against expected exponent maps for common infrastructure calculations.
Caveats
- Dimensional analysis only verifies mathematical self-consistency; does not replace engineering judgment or safety verification.
- The approach relies on predefined base units and exponent maps; incorrect initial definitions could misreport validity.
- Outcomes are limited to unit consistency and dimensional checks; it does not guarantee physical correctness of constants or modeling assumptions.
# Dimensional Analysis Skill ## At a Glance Dimensional analysis is the mathematical verification layer that ensures physical calculations are dimensionally consistent -- catching unit errors before they become calculation errors. **When to activate:** - Verify multi-step calculations for unit consistency - Mix SI and Imperial units in the same calculation - Scale experimental data to new conditions via dimensionless groups - Identify governing parameters of a physical system - Validate Calculator agent outputs before committing to CalculationRecord **Key capabilities:** - Unit tracking via exponent maps (PhysicalQuantity pattern) - Compound unit algebra: multiply, divide, power, dimensional homogeneity - Dimensional mismatch detection at every arithmetic step - SI to Imperial conversion for all infrastructure engineering domains - Buckingham pi theorem for deriving dimensionless groups - Infrastructure dimensionless numbers: Reynolds, Nusselt, Prandtl, Grashof, Froude, Strouhal **Integration:** Cross-cutting skill -- applies to outputs from fluid-systems, power-systems, and thermal-engineering. Acts as verification layer before Calculator agent commits to CalculationRecord. > **NO
- At a Glance
- Unit Tracking Algebra
- The Seven SI Base Units
- Compound Units as Exponent Maps
- Common Infrastructure Units -- Exponent Map Reference
- The PhysicalQuantity Interface
- Unit Algebra Rules
- Mixed Unit Systems
- Strategy: Convert Immediately, Work in SI, Convert Output
- Common Conversions -- Quick Reference
- Buckingham Pi Theorem
- The Theorem
- Procedure (5 Steps)
- Worked Example: Pipe Flow Pressure Drop
What does the pie-dimensional-analysis skill do?
Mathematical verification for physical calculations: unit tracking algebra (exponent maps), PhysicalQuantity pattern for compound units, SI/Imperial mixed-unit handling, Buckingham pi theorem for dimensionless groups, and common engineering dimensionless numbers. Activates for unit verification, dimensional consistency checks, scaling analysis, and calculation validation across all infrastructure domains.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill dimensional-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
