dimensional-analysis plugin
Audits code for unit and decimal-scaling bugs and annotates it with dimensional comments recording the units of each value. Use when someone asks to audit or review code for unit confusion, decimals or scaling mismatches, WAD/RAY scale errors, or the wrong token's decimals; to annotate units in a codebase; or to perform a dimensional analysis of a DeFi protocol, offchain code, or other arithmetic-heavy codebase. Catches formulas that combine values carrying different units or scales.
How to install the dimensional-analysis plugin
Run both commands inside Claude Code. The first adds the marketplace once; the second installs the plugin.
/plugin marketplace add trailofbits/skills
/plugin install dimensional-analysis@trailofbitsWhat's inside dimensional-analysis
6 parts read from the plugin's own files.
Agents 5
Call as @agent-dimensional-analysis:name- @agent-dimensional-analysis:arithmetic-scanner
No description in the file.
- @agent-dimensional-analysis:dimension-annotator
No description in the file.
- @agent-dimensional-analysis:dimension-discoverer
No description in the file.
- @agent-dimensional-analysis:dimension-propagator
No description in the file.
- @agent-dimensional-analysis:dimension-validator
No description in the file.
Skills 1
Claude loads it when the task matches- dimensional-analysis
Audits code for unit and decimal-scaling bugs and annotates it with dimensional comments recording the units of each value.
Using dimensional-analysis in Claude Code
Ask for an agent by name:
@agent-dimensional-analysis:arithmetic-scanner
@agent-dimensional-analysis:dimension-annotatorSkills need no command. Claude reads them when your request matches what they describe.
Update, turn off or remove
- Update the plugin (shell)
- claude plugin update dimensional-analysis@trailofbits
- Refresh the marketplace
- /plugin marketplace update trailofbits
- Turn it off for now
- /plugin disable dimensional-analysis@trailofbits
- Remove it
- /plugin uninstall dimensional-analysis@trailofbits
Skills in dimensional-analysis
- dimensional-analysistrailofbits/skills
Audits code for unit and decimal-scaling bugs and annotates it with dimensional comments recording the units of each value.
12 files8.1Kstars
dimensional-analysis plugin questions
How do I install the dimensional-analysis plugin?
In Claude Code run /plugin marketplace add trailofbits/skills, then /plugin install dimensional-analysis@trailofbits.
What does the dimensional-analysis plugin include?
dimensional-analysis bundles 5 agents, 1 skill.
Which agents come with dimensional-analysis?
arithmetic-scanner, dimension-annotator, dimension-discoverer, dimension-propagator, dimension-validator. Call one with @agent-dimensional-analysis:arithmetic-scanner.
How do I update or remove the dimensional-analysis plugin?
Update it with claude plugin update dimensional-analysis@trailofbits in your shell, or from the Installed tab of /plugin. Remove it with /plugin uninstall dimensional-analysis@trailofbits.