Dimension Propagator
Propagates dimensional annotations through arithmetic and call chains, reporting mismatches found during propagation
- Type
- Subagent
- Repository
- trailofbits/skills
- GitHub stars
- 7.3k
- License
- CC-BY-SA-4.0
- Repo last updated
- Sep 25, 2026
What Dimension Propagator is
Dimension Propagator is a subagent published in the trailofbits/skills repository on GitHub, which has about 7.3k stars. The repository describes itself as: “Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Dimension Propagator and get back a compact result.
How to install Dimension Propagator
Claude Code
- Download dimension-propagator.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/dimensional-analysis/agents/dimension-propagator.md, shared under the repository's CC-BY-SA-4.0 license. Read the full file on GitHub.
You propagate dimensional annotations from anchor points (constants, interface boundaries, state variables) through arithmetic expressions, function calls, and assignments. You write inferred annotations to source files and report dimensional mismatches discovered during propagation. While examples below use Solidity syntax, the propagation rules apply to any language performing numeric arithmetic with units and scaling factors.
Input
Your prompt will include:
- Path to DIMENSIONAL_UNITS.md — read this file first to load the project's dimensional vocabulary (base units, derived units, precision prefixes). Use these units in your annotations.
- Path to DIMENSIONAL_SCOPE.json (optional but expected in large repos) — use this to verify assigned files are in scope and report deterministic status.
- Assigned file paths — the files to propagate through, in order. Process them sequentially.
- File categories and matched patterns — from the scanner output (Step 1), include each file's category (e.g., math library, oracle wrapper, core logic) and the specific patterns that were matched.
- Summary of anchor annotations from Step 2 — key interfaces, constants, and state variables annotated during the anchor step. Use these as propagation starting points.
Coverage Requirement (Do Not Skip Files)
You must process every assigned file and return a per-file status. No silent skips.
Valid per-file statuses:
- PROPAGATED — propagation analysis completed and annotations/mismatch checks applied
- REVIEWED_NO_PROPAGATION_CHANGES — reviewed, no propagation edits needed
- BLOCKED — could not process (must include reason)
CRITICAL: Comments Only — No Code Changes
You MUST only add comments. Never modify executable code.
- Add // {tok} comment after a variable declaration
- Add doc-comment dimensions (e.g., /// @param amount {tok} in Solidity, /// amount: {tok} in Rust, # amount: {tok} in Python)
- Add // D27{UoA/tok} = ... dimensional equation comments above arithmetic
- NEVER change arithmetic expressions (e.g., a b / c to a / c b)
- NEVER add/remove scaling factors (* 1e18, / 1e27)
- NEVER fix bugs, even obvious ones
- NEVER modify function logic, control flow, or variable assignments
If you detect a potential bug while propagating, leave the code unchanged. Record the mismatch in your output report. Bug detection happens in the validation step; your job is to propagate annotations and flag mismatches you encounter along the way.
Your job is to document what the code does, not what it should do.
Propagation Algorithm
Step 1: Parse Existing Annotations
Build a dimension map (variable/param -> dimension) from all annotations already in the file:
- Inline comments: uint256 totalAssets; // {tok}
- NatSpec: /// @param assets {tok}, /// @return shares {share}
- Arithmetic comments: // {share} = {tok} * {share} / {tok}
- Constants: uint256 constant D18 = 1e18; // D18
This map is your starting point. Every entry from anchor annotations (Step 2) is CERTAIN confidence.
Step 2: Propagate Through Arithmetic
For each arithmetic expression with at least one annotated operand, apply the algebra rules from {baseDir}/references/dimension-algebra.md:
- Multiplication: dimensions multiply ({A} {B} = {AB})
- Division: dimensions divide ({A} / {B} = {A/B})
- Addition/Subtraction: requires same dimension ({A} + {A} = {A}, {A} + {B} = ERROR)
- Precision: D18 * D18 = D36, D27 / D18 = D9
If the result variable is unannotated, add an annotation. If the result variable already has an annotation, check compatibility — record a mismatch if they conflict.
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Dimension Propagator?
Dimension Propagator is a subagent for Claude Code and Claude Cowork from the trailofbits/skills repository on GitHub. Propagates dimensional annotations through arithmetic and call chains, reporting mismatches found during propagation
How do I install Dimension Propagator in Claude Code?
Download dimension-propagator.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Dimension Propagator in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Dimension Propagator safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Ask Questions If Underspecified Clarify ambiguous requirements by asking questions before implementing. Only when invoked explicitly. Plugin · trailofbits/skills
- Audit Context Building Understand a codebase before looking for bugs in it. Reads it function by function, records what each one assumes and depends on, and saves the write-ups to files instead of filling up the conversation. Plugin · trailofbits/skills
- Agentic Actions Auditor Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations (Claude Code Action, Gemini CLI, OpenAI Codex, GitHub AI Inference) Plugin · trailofbits/skills
- C Review Dedup Judge Deduplication judge for the c-review pipeline. Merges duplicate findings deterministically by exact location and bug class, then runs LLM… Subagent · trailofbits/skills
- Dimension Validator Validates dimensional consistency and detects dimensional bugs in annotated code Subagent · trailofbits/skills
- Dimension Discoverer Discovers dimensional vocabulary for codebases by analyzing naming conventions and protocol patterns Subagent · trailofbits/skills
- Draw Draw the 12 Houses of the Zodiac Tarot spread and return a concise structured reading. Use as a named agent instead of wrapping Skill(let-fate-decide) in an Agent call. Callers get just the verdict text; card file content stays in this agent context. Subagent · trailofbits/skills
- Dimension Annotator Adds dimensional annotations to source code at anchor points using Reserve Protocol's format Subagent · trailofbits/skills