What problem does it solve?
This Skill helps you find and prevent unit-mismatch bugs in software systems by treating every numeric value as a quantity with meaning, not just a raw number. It is especially useful when errors come from mixing milliseconds with seconds, percentages with ratios, timestamps with durations, or currencies and measurement systems across boundaries.
Core Features & Use Cases
- Unit Inventory and Classification: Identifies numeric quantities in code, APIs, configs, and persisted data, then classifies them by family such as time, money, size, rate, percentage, ratio, or score.
- Boundary and Conversion Analysis: Examines where values move between modules, services, databases, libraries, or protocols so implicit or missing conversions become visible.
- Type-Safety Recommendations: Suggests stronger representations such as branded types, newtypes, value objects, canonical internal units, and naming conventions to make dimensional errors harder to introduce.
- Use Case: Review a service that accepts timeouts from environment variables, stores timestamps in a database, and reports latency metrics, then verify that durations, absolute times, percentages, and rates are never confused.
Quick Start
Use the dimensional-analysis skill to review a code path or API schema and identify every numeric field, its unit, and any unsafe conversions or mismatched arithmetic.