| name | auditor-claw |
| description | Generate cryptographic audit trail (zkTLS + TEE + IPFS). Triggers: '验证', 'verify', 'proof', '审计', 'IPFS', 'zkTLS', 'TEE', 'Merkle', '可信证明'. IMPORTANT: You MUST use the exec tool to run: python3 {baseDir}/auditor.py --scan-hash <HASH> --compliance-hash <HASH> — generates ProofBundle with Merkle tree + TDX attestation + IPFS upload. Do NOT fabricate CIDs or proof data. Get hashes from previous scanner/compliance step outputs via sha256sum. After exec, present the ProofBundle CID to user. For full instructions read SKILL.md with read tool. This skill should be used when the user asks to 'generate proof', 'create audit trail', 'verify report', 'upload to IPFS', mentions '验证', 'verify', 'proof', '审计', 'IPFS', 'zkTLS', 'TEE', 'Merkle', '可信证明', 'CID', or wants cryptographic attestation of tax calculations. This is the verifiable layer of VeriTax — it builds Merkle trees, generates TEE attestations, and uploads immutable audit trails to IPFS. Do NOT use when the user only wants data extraction (use scanner-claw), tax calculation (use compliance-claw), or TLH optimization (use optimizer-claw). |
| license | MIT |
| metadata | {"author":"veritax","version":"1.0.0","homepage":"https://github.com/veritax/veritax","openclaw":{"requires":{"bins":["python","node"],"env":["RECLAIM_APP_ID","PINATA_JWT","PHALA_API_TOKEN"]}}} |
SKILL: AuditorClaw — Verifiable Audit Trail
角色:VeriTax 可验证层,为税务计算流程生成密码学审计链。
模型:Claude Haiku 4.5 (0.33x) via sessions_spawn — 机械执行,无需推理。
从 VeriTask 迁移:Phala TEE + Reclaim zkFetch + Merkle/IPFS 代码可直接复用。
可验证三件套
| 层 | 技术 | 作用 |
|---|
| 数据来源证明 | Reclaim zkFetch (zkTLS) | 证明 Binance API 数据确实来自 Binance 服务器 |
| 计算完整性证明 | Phala dStack TDX Quote (TEE) | 证明税计算在可信执行环境中运行,未被篡改 |
| 审计链完整性 | merkletreejs + Pinata IPFS | Merkle Hash Chain 确保步骤不可删改,IPFS CID 不可变存储 |
执行流程
Step 1: 收集各步骤哈希
从 ScannerClaw、ComplianceClaw、OptimizerClaw 的输出中提取 step_hash:
scan_hash = SHA256(tax_dataset.json)
compliance_hash = SHA256(compliance_report.json)
optimizer_hash = SHA256(tlh_plan.json)(如有)
Step 2: 构建 Merkle Tree
使用 merkletreejs 构建 Merkle Tree:
- 叶子节点 = 各步骤 step_hash
- 输出:
merkle_root
Step 3: 生成 TEE 证明
调用 Phala dStack SDK:
report_data = merkle_root (hex bytes)
- 输出:TDX Quote (base64)
Step 4: 上传到 IPFS
通过 Pinata 上传 ProofBundle:
- 包含:merkle_root + tdx_quote + step_hashes + 时间戳
- 输出:不可变 CID (e.g.
QmXyz...)
Command Index
python {baseDir}/auditor.py --scan-hash <hash> --compliance-hash <hash>
python {baseDir}/auditor.py --scan-hash <hash> --compliance-hash <hash> --optimizer-hash <hash>
python {baseDir}/auditor.py --scan-hash <hash> --compliance-hash <hash> --json
| 参数 | 必填 | 默认值 | 说明 |
|---|
--scan-hash | 是 | — | ScannerClaw 输出的 SHA256 |
--compliance-hash | 是 | — | ComplianceClaw 输出的 SHA256 |
--optimizer-hash | 否 | — | OptimizerClaw 输出的 SHA256 |
--json | 否 | — | 输出原始 JSON ProofBundle |