Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By bongkagev3.0.1CC-BY-SA-4.0In 1 marketplace
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. Prevents dimensional mismatches and catches formula bugs early.
Claude hands work to one, or you mention it with @.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Add dimensional annotations to codebases and detect dimensional bugs. Uses an annotation format inspired by Reserve Protocol's Solidity conventions, but applicable to any language or protocol performing numeric arithmetic with mixed units, precisions, or scaling factors.
This plugin runs one automatic workflow:
D18{tok}, D27{UoA/tok}Based on Reserve Protocol's format (shown here in Solidity, but adaptable to any language):
// State variables
uint256 public tvlFee; // D18{1/s} demurrage fee on AUM
uint256 public lastPoke; // {s}
// Struct fields
struct RebalanceLimits {
uint256 low; // D18{BU/share} (0, 1e27]
uint256 spot; // D18{BU/share} (0, 1e27]
uint256 high; // D18{BU/share} (0, 1e27]
}
// Function parameters (NatSpec)
/// @param weights D27{tok/BU} Basket weight ranges
/// @param prices D27{UoA/tok} Prices for each token
/// @return price D27{buyTok/sellTok}
// Inline arithmetic
// D27{buyTok/sellTok} = D27{UoA/sellTok} * D27 / D27{UoA/buyTok}
uint256 startPrice = Math.mulDiv(sellPrices.high, D27, buyPrices.low);
The skill always executes in full-auto mode. Any supplied mode argument is ignored.
Workflow orchestration for all four phases lives in skills/dimensional-analysis/SKILL.md.
DIMENSIONAL_UNITS.md if present; otherwise auto-generates and saves itDIMENSIONAL_SCOPE.json as a source-of-truth manifest for large repos| Agent | Purpose |
|---|---|
arithmetic-scanner | Scans repo for files with dimensional arithmetic to scope discovery |
dimension-discoverer | Discovers dimensional vocabulary from naming, interfaces, and patterns |
dimension-annotator | Adds dimensional annotations at anchor points (comments only) |
dimension-propagator | Propagates dimensional annotations through arithmetic and call chains, reporting mismatches |
dimension-validator | Validates dimensional consistency and detects bugs |
See the references/ directory for:
dimension-algebra.md - Rules for dimensional arithmeticcommon-dimensions.md - DeFi dimension vocabularybug-patterns.md - Dimensional bug patterns with examplesannotate.md - Full annotated protocol examples (ERC-4626, AMM, Lending)Coriolan Pinhas & Benjamin Samuels - Trail of Bits
npx claudepluginhub bongkage/trailofbits-skills --plugin dimensional-analysisBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground