LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

dimensional-analysis

Annotates codebases with dimensional analysis comments documenting units, dimensions, and decimal scaling. Use when someone asks to annotate units in a codebase, perform a dimensional analysis, or find vulnerabilities in a DeFi protocol, offchain code, or other blockchain-related codebase with arithmetic. Prevents dimensional mismatches and catches formula bugs early.

5,778stars509forksUpdated 6/19/2026
Security#security#blockchain#dimensional-analysis#code-audit#defi#arithmetic-verification

Security Assessment

Safe(100/100)
Security Score100/100

About dimensional-analysis

The dimensional-analysis skill orchestrates a comprehensive pipeline for annotating codebases with dimensional analysis comments that document units, dimensions, and decimal scaling factors. It prevents dimensional mismatches and catches formula bugs early by systematically analyzing numeric computations across mixed units, precisions, or scaling factors. This is particularly valuable for DeFi protocols, financial systems, and scientific codebases where arithmetic errors can lead to critical vulnerabilities or incorrect calculations.

The skill operates through a four-step workflow that delegates specialized tasks to subagents: repository scanning to identify arithmetic-heavy files, vocabulary discovery to extract dimensional units from the codebase, anchor annotation to mark key variables and functions with dimension comments, and propagation to ensure dimensional consistency throughout the call graph. The main skill context acts as a workflow controller, managing batching, persistence, retries, coverage gates, and final reporting. It guarantees complete coverage by tracking all in-scope files through each pipeline step and persisting state in manifest files like DIMENSIONAL_SCOPE.json and DIMENSIONAL_UNITS.md.

This skill is designed for security auditors, protocol developers, and engineers working with blockchain arithmetic, fixed-point math, or any codebase involving unit conversions and precision transformations. It's particularly useful when auditing DeFi protocols for arithmetic vulnerabilities, annotating financial codebases with unit documentation, or validating scientific computations where dimensional consistency is critical. The automated workflow handles large repositories systematically, ensuring no arithmetic file is missed during the analysis.

FAQ

When should I use this skill instead of manual code review?

Use this skill when you need comprehensive dimensional analysis across an entire codebase, especially for DeFi protocols, financial systems, or codebases with mixed decimal precisions. It systematically covers all arithmetic files and catches unit mismatches that manual review might miss. For quick spot-checks of a single formula, reading the code directly is more efficient.

What types of codebases does this skill support?

The skill works with any codebase performing numeric computations with mixed units, precisions, or scaling factors. This includes DeFi protocols, blockchain offchain code, financial applications, and scientific computations. It's not useful for codebases with no arithmetic operations or simple integer counting logic.

How does the skill ensure complete coverage of large repositories?

The skill tracks all in-scope files through a manifest system (DIMENSIONAL_SCOPE.json) and guarantees that every arithmetic file passes through all four pipeline steps: scanning, vocabulary discovery, annotation, and validation. A file is only considered covered when all three processing statuses (step2, step3, step4) are present. The workflow does not finish until all in-scope files are processed.

What files does the skill generate during execution?

The skill generates DIMENSIONAL_SCOPE.json in the project root to track in-scope files and their processing status across all pipeline steps, and DIMENSIONAL_UNITS.md to persist the discovered dimensional vocabulary for reuse by later steps and future runs.

Can I run only part of the pipeline or skip certain steps?

No, the skill runs in full-auto mode only and always executes the complete four-step pipeline in order: scanning → vocabulary discovery → annotation → validation. Any mode arguments provided by the caller are ignored to ensure comprehensive analysis and coverage guarantees.

All Files

7 files
references/annotate.md11.0 KB
View
references/dimension-algebra.md6.3 KB
View
agents/openai.yaml0.1 KB
View
assets/trail-of-bits-mark.svg3.0 KB
View
references/bug-patterns.md11.6 KB
View
SKILL.md17.4 KB
View
references/common-dimensions.md7.3 KB
View

Install dimensional-analysis

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

trailofbits/skills

Related Skills

content-pattern-analyzer-sms

513

ai-ui-patterns

249

quick-mockups

7,247

clean-architecture

720