dimensional-analysis

Automate dimensional analysis across codebases with unit annotation and validation.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/rohanbhatia27/rohanstutoring-redesign --skill dimensional-analysis-rohanbhatia27
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dimensional-analysis
Source: https://github.com/rohanbhatia27/rohanstutoring-redesign/tree/main/.agents/skills/dimensional-analysis
Command: npx skills add https://github.com/rohanbhatia27/rohanstutoring-redesign --skill dimensional-analysis-rohanbhatia27

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires arithmetic-scanner, dimension-discoverer, dimension-annotator, dimension-propagator, dimension-validator, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates dimensional analysis in codebases, identifying and resolving issues related to units, dimensions, and decimal scaling, which helps in maintaining precision and detecting arithmetic bugs early.

Core Features & Use Cases

  • Dimensional Analysis: Annotates codebases with unit and dimension comments.
  • Bug Detection: Identifies and reports arithmetic bugs due to unit mismatches, missing scaling, or precision loss.
  • Use Case: When analyzing a DeFi protocol or financial code, this Skill can help ensure that calculations are accurate and consistent, reducing the risk of errors in complex numeric computations.

Quick Start

Use the dimensional-analysis skill to perform a full dimensional analysis on the 'contracts' directory.

Frequently Asked Questions about dimensional-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect arithmetic errors and unit mismatches in DeFi protocol code?

Automated dimensional analysis detects arithmetic errors in DeFi code by scanning numeric computations, identifying unit mismatches, and flagging missing decimal scaling or precision loss before deployment.

What is dimensional analysis in software engineering and when is it needed?

Dimensional analysis in software engineering annotates code with unit and dimension comments to validate mixed-scale numeric computations, needed when processing financial protocols to ensure calculation precision and consistency.

How do I annotate a codebase with unit and dimension comments for precision analysis?

Annotate a codebase by running an automated dimensional analysis pipeline that discovers unit vocabulary, propagates dimensions across arithmetic operations, and validates precision across all numeric files.

Can I use dimensional analysis to check decimal scaling and precision loss across an entire contracts directory?

Yes, dimensional analysis checks decimal scaling and precision loss across an entire contracts directory by processing all arithmetic files through a defined scanning and validation pipeline.

What is the best way to automate unit discovery and dimension propagation in codebases?

The best way to automate unit discovery and propagation is using a multi-step pipeline with specialized subagents that handle vocabulary discovery, annotation, and dimension propagation across the codebase.