dimensional-analysis

其他 社区
解读按原文结构重写,命令、链接、术语均保留;右侧可核对作者原始 SKILL.md

方法与流程

  • Workflow:Follow these sections in order. Do not advance until the current step satisfies its completion gate.
  • Step 1: Vocabulary and Scope Discovery:If cached artifacts cannot be reused, delegate repository scanning to arithmetic-scanner and vocabulary discovery to dimension-discoverer. Do not do that step-specific analysis directly in the main skill context. Check whether DIMENSIONALUNITS.md and…
  • Step 2: Anchor Annotation:The main skill context must not add annotations itself. Use the Task tool to spawn dimension-annotator agents for all anchor-point annotation work. For full examples and annotation format details, see {baseDir}/references/annotate.md.

适用与边界

  • When to Use:Annotating a codebase with unit/dimension comments (e.g., D18{tok}, D27{UoA/tok}) Performing dimensional analysis on DeFi protocols, financial code, or scientific computations Hunting for arithmetic bugs caused by unit mismatches, missing scaling, or precision…
  • When NOT to Use:Codebases with no numeric arithmetic or unit conversions — there is nothing to annotate Pure integer counting logic (loop indices, array lengths) with no physical or financial dimensions When you only need a quick spot-check of a single formula — read the code…
  • Shared Orchestration Rules:DIMENSIONALSCOPE.json and DIMENSIONALUNITS.md live in the project root. The main skill context verifies Step 1 artifacts but does not write either Step 1 artifact itself. DIMENSIONALSCOPE.json.inscopefiles is the source of truth for Steps 2-4. Never derive…

原文中的明确线索

  • 要点:「all in-scope arithmetic files」、「all」、「never」、「This skill runs in one mode only: full-auto.」、「- Always run the full pipeline in this order: Step 1 -> Step 2 -> Step 3 -> Step 4.」、「This skill must audit all in-scope arithmetic files, including large repositories.」、「- In-scope files are defined by Step 1 scanner output (files array), across all priority tiers (CRITICAL, HIGH, MEDIUM, LOW).」、「- arithmetic-scanner owns repository scanning, arithmetic-file prioritization, and writing DIMENSIONALSCOPE.json.」
  • 文件与命令D18{tok}D27{UoA/tok}full-autoTaskfilesarithmetic-scannerDIMENSIONALSCOPE.jsonstep2

流狐整理:以上内容来自当前 SKILL.md 的章节与原词;未补写作者没有声明的工具、兼容性或能力。

流狐档案 作者与许可取自来源;运行、权限和网络为流狐检测或估算
流狐分类
通用
作者声明 Agent
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
作者 / 版本 / 许可
@trailofbits · 未声明 license
流狐 Token 估算
较高消耗
流狐接入估算
需简单配置
是否需要外部 API Key
未发现要求
检测到的系统要求
未声明
底层运行要求
未声明
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • Shell 执行
检测到的网络行为
仅限本地
安装命令数
无(仅作为资料)

档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。

需要注意: 未限定 allowed-tools,默认拥有全部工具权限。

输出预览 dimensional-analysis.preview
# Final Output

{
  "mode": "full-auto",
  "project_root": "<path>",
  "vocabulary": {
    "base_units": ["..."],
    "derived_units": ["..."],
    "precision_prefixes": ["..."]
  },
  "annotations": {
    "total_added": 0,
    "by_file": {}
  },
  "findings": {
    "critical": 0,
    "high": 0,
    "medium": 0,
    "details": []
  },
  "uncertainties_resolved": 0,
  "coverage": {
    "in_scope_files": 0,
    "anchor_reviewed_files": "0/0",
    "propagation_reviewed_files": "0/0",
    "validation_reviewed_files": "0/0",
    "annotated_functions": "0/0",
    "annotated_variables": "0/0",
    "unprocessed_files": [
      {
        "path": "/path/to/repo/contracts/LegacyMath.sol",
        "blocked_step": "step3",
        "reason": "Parser could not process generated source",
        "retry_count": 1
      }
    ]
  }
}

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。