dimensional-analysis-check
Use when numeric values cross arithmetic, API, storage, or time boundaries and a unit, scale, precision, rounding, signedness, or range mismatch could make the result wrong.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- dimensional-analysis-check
- audience
- specialist
- description
- Use when numeric values cross arithmetic, API, storage, or time boundaries and a unit, scale, precision, rounding, signedness, or range mismatch could make the result wrong.
03 SKILL.md 正文
Dimensional Analysis Check
Catch unit, scale, base, and precision errors by checking that every quantity's dimensions agree across an expression, an API boundary, and a storage round-trip.
Steps
- Inventory every numeric quantity the change touches and annotate each with its unit and scale: seconds vs milliseconds, bytes vs KiB, basis points vs percent vs fraction, token decimals, wei vs ether.
- Check each arithmetic expression for dimensional consistency — added terms must share a unit, and a ratio's unit must be what the consumer expects.
- Check every boundary crossing: function parameters, JSON fields, database columns, environment variables, and RPC payloads are where units silently change identity.
- Verify conversion factors against the authoritative definition rather than an inline literal, and flag every magic constant that encodes a unit conversion.
- Check precision and rounding: integer division truncation, float accumulation in loops, and fixed-point scaling applied twice or not at all.
- Check signedness and range: values that can go negative, counters that can wrap, and durations that can exceed the field's width.
- Check time explicitly — epoch vs monotonic, UTC vs local, inclusive vs exclusive interval bounds — as it is the most common dimensional defect.
- Where a unit is only documented in a name, treat the name as an assertion to verify, not as evidence.
Acceptance
- Every quantity in the reviewed change has a stated unit and scale.
- Each expression and each boundary crossing is dimensionally consistent, or the mismatch is reported.
- Conversion constants are traced to an authoritative definition.
- Rounding, truncation, overflow, and sign behavior are checked at the extremes, not just at typical values.
- Time values state their epoch, zone, and interval bound convention.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.