Agent Skillsmtarcure/claude-vibe-squad › dimensional-analysis-check

dimensional-analysis-check

GitHub

用于在代码审查中检查数值单位的维度一致性,覆盖算术、API边界及存储转换中的单位、精度和范围错误。

.agents/skills/dimensional-analysis-check/SKILL.md mtarcure/claude-vibe-squad

Trigger Scenarios

涉及数值单位或精度的代码审查 跨系统边界的数值传递检查

Install

npx skills add mtarcure/claude-vibe-squad --skill dimensional-analysis-check -g -y
More Options

Non-standard path

npx skills add https://github.com/mtarcure/claude-vibe-squad/tree/main/.agents/skills/dimensional-analysis-check -g -y

Use without installing

npx skills use mtarcure/claude-vibe-squad@dimensional-analysis-check

指定 Agent (Claude Code)

npx skills add mtarcure/claude-vibe-squad --skill dimensional-analysis-check -a claude-code -g -y

安装 repo 全部 skill

npx skills add mtarcure/claude-vibe-squad --all -g -y

预览 repo 内 skill

npx skills add mtarcure/claude-vibe-squad --list

SKILL.md

Frontmatter
{
    "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."
}

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

  1. 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.
  2. Check each arithmetic expression for dimensional consistency — added terms must share a unit, and a ratio's unit must be what the consumer expects.
  3. Check every boundary crossing: function parameters, JSON fields, database columns, environment variables, and RPC payloads are where units silently change identity.
  4. Verify conversion factors against the authoritative definition rather than an inline literal, and flag every magic constant that encodes a unit conversion.
  5. Check precision and rounding: integer division truncation, float accumulation in loops, and fixed-point scaling applied twice or not at all.
  6. Check signedness and range: values that can go negative, counters that can wrap, and durations that can exceed the field's width.
  7. Check time explicitly — epoch vs monotonic, UTC vs local, inclusive vs exclusive interval bounds — as it is the most common dimensional defect.
  8. 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.

Version History

  • d5262e2 Current 2026-09-11 11:16

Same Skill Collection

.agents/skills/accessible-media-authoring/SKILL.md
.agents/skills/agent-prompt-engineering/SKILL.md
.agents/skills/agentic-safety-audit/SKILL.md
.agents/skills/audio-event-map-authoring/SKILL.md
.agents/skills/auto-scaffold/SKILL.md
.agents/skills/claim-verification/SKILL.md
.agents/skills/code-reachability-audit/SKILL.md
.agents/skills/code-review-loop/SKILL.md
.agents/skills/color-theory/SKILL.md
.agents/skills/conversation-design/SKILL.md
.agents/skills/copy-refinement/SKILL.md
.agents/skills/cross-file-relationship-synthesis/SKILL.md
.agents/skills/dependency-cycle-audit/SKILL.md
.agents/skills/dependency-health-triage/SKILL.md
.agents/skills/detection-as-code/SKILL.md
.agents/skills/diff-aware-semgrep-scan/SKILL.md
.agents/skills/differential-review/SKILL.md
.agents/skills/dual-level-retrieval/SKILL.md
.agents/skills/figma-implement-design/SKILL.md
.agents/skills/forensic-timeline-authoring/SKILL.md
.agents/skills/game-design-fundamentals/SKILL.md
.agents/skills/game-mechanics-balancing/SKILL.md
.agents/skills/head-tail/SKILL.md
.agents/skills/incident-response-runbook/SKILL.md
.agents/skills/interactive-audio-design/SKILL.md
.agents/skills/interface-ambiguity-check/SKILL.md
.agents/skills/keyword-clustering/SKILL.md
.agents/skills/knowledge-base-integration/SKILL.md
.agents/skills/layered-analysis-loop/SKILL.md
.agents/skills/level-design-patterns/SKILL.md
.agents/skills/locale-adaptation/SKILL.md
.agents/skills/narrative-structure/SKILL.md
.agents/skills/platform-compliance/SKILL.md
.agents/skills/player-engagement-psychology/SKILL.md
.agents/skills/requirements-elicitation/SKILL.md
.agents/skills/rule6-rights-gate/SKILL.md
.agents/skills/rule8-truth-gate/SKILL.md
.agents/skills/sandbox-provision-discipline/SKILL.md
.agents/skills/scope-decomposition/SKILL.md
.agents/skills/scope-estimation/SKILL.md
.agents/skills/security-ownership-map/SKILL.md
.agents/skills/security-threat-model/SKILL.md
.agents/skills/semgrep-rule-author/SKILL.md
.agents/skills/skill-description-trigger-authoring/SKILL.md
.agents/skills/sound-design-principles/SKILL.md
.agents/skills/structured-data-authoring/SKILL.md
.agents/skills/supply-chain-audit/SKILL.md
.agents/skills/take-over-resume/SKILL.md
.agents/skills/technical-seo-audit/SKILL.md

Metadata

Files
0
Version
d5262e2
Hash
2e56b25a
Indexed
2026-09-11 11:16

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-13 05:01
浙ICP备14020137号-1 $Map of visitor$