一键导入
audit
Run security audits on ZKP2P V2 contracts using Trail of Bits security skills. Supports full audits, differential PR reviews, and individual security checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run security audits on ZKP2P V2 contracts using Trail of Bits security skills. Supports full audits, differential PR reviews, and individual security checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Full deployment pipeline for ZKP2P V2 contracts scoped to this repo. Phases: write deploy script + tests, run on localhost, deploy to staging (test, verify, commit, publish RC), deploy to prod (test, verify, commit, publish stable). Use when the user says "ship contracts", "deploy contracts", "deploy staging", "deploy prod", "redeploy escrow", "full deploy pipeline", or "ship it" in the contracts repo context.
Publish the @zkp2p/contracts-v2 package to npm. Use this skill when you need to bump the contracts package version (rc or stable), extract deployment artifacts, build, test, and publish with the correct dist-tag. Covers both prerelease (dev tag) and stable (latest tag) workflows.
基于 SOC 职业分类
| name | audit |
| description | Run security audits on ZKP2P V2 contracts using Trail of Bits security skills. Supports full audits, differential PR reviews, and individual security checks. |
Run structured security audits on ZKP2P V2 contracts.
Parse the argument to determine mode:
| Invocation | Mode | Description |
|---|---|---|
/audit or /audit full | Full | 10-step comprehensive audit |
/audit diff | Differential | Review current branch vs main |
/audit pr <number> | Differential | Review a specific PR |
/audit check <skill> | Single | Run one security skill |
/audit maturity | Single | Quick code maturity assessment |
/audit entries | Single | Entry point mapping only |
Run the 10-step workflow. This is thorough and takes time.
Confirm scope. Default is all V2 contracts:
contracts/EscrowV2.sol
contracts/OrchestratorV2.sol
contracts/RateManagerV1.sol
contracts/ProtocolViewerV2.sol
contracts/unifiedVerifier/
contracts/registries/
contracts/hooks/
contracts/oracles/
contracts/lib/
Excluded: contracts/mocks/, contracts/external/, contracts/archive/, V1 contracts (Escrow.sol, Orchestrator.sol, ProtocolViewer.sol).
Run skill: entry-point-analyzer:entry-point-analyzer
Scope: contracts/ (V2 only)
Save raw output to audits/_scratch/entry-points.md.
Run skill: building-secure-contracts:code-maturity-assessor
Scope: contracts/ (V2 only)
Save raw output to audits/_scratch/code-maturity.md.
Run skill: building-secure-contracts:guidelines-advisor
Scope: contracts/ (V2 only)
Save raw output to audits/_scratch/guidelines.md.
Run skill: static-analysis:semgrep
Scope: contracts/ (exclude mocks, archive, external)
Save raw output to audits/_scratch/semgrep.md.
Run skill: building-secure-contracts:token-integration-analyzer
Focus: USDC (ERC20) integration in EscrowV2, OrchestratorV2
Save raw output to audits/_scratch/token-integration.md.
Run skill: sharp-edges:sharp-edges
Scope: contracts/ (V2 only)
Save raw output to audits/_scratch/sharp-edges.md.
Based on findings from steps 2-7, identify the 3-5 highest-risk functions. Then:
Run skill: audit-context-building:audit-context-building
Focus: identified high-risk functions
Save raw output to audits/_scratch/deep-context.md.
Run skill: property-based-testing:property-based-testing
Focus: key invariants (liquidity conservation, fee bounds, nullifier uniqueness, expiry, oracle floors, access control)
Save raw output to audits/_scratch/property-testing.md.
audits/_scratch/*.md outputsaudits/templates/full-audit-template.mdaudits/full/YYYY-MM-DD-full-audit.mdgit rev-parse --short HEADgit add audits/full/YYYY-MM-DD-full-audit.md
git commit -m "audit: full security audit at <sha>"
/audit diff: compare current branch to main/audit pr <number>: fetch PR diff with gh pr diff <number>contracts/ onlyRun skill: differential-review:differential-review
Input: the diff from step 1
If any HIGH or CRITICAL findings from step 2:
Run skill: audit-context-building:audit-context-building
Focus: functions containing critical findings
audits/templates/differential-template.mdaudits/differential/YYYY-MM-DD-pr-<number>.md or audits/differential/YYYY-MM-DD-<branch>.mdgit add audits/differential/YYYY-MM-DD-*.md
git commit -m "audit: differential review of PR #<number> at <sha>"
Run one specific skill and print results inline. Do NOT commit unless user asks.
| Shortcut | Skill |
|---|---|
semgrep | static-analysis:semgrep |
codeql | static-analysis:codeql |
maturity | building-secure-contracts:code-maturity-assessor |
guidelines | building-secure-contracts:guidelines-advisor |
entries | entry-point-analyzer:entry-point-analyzer |
token | building-secure-contracts:token-integration-analyzer |
sharp | sharp-edges:sharp-edges |
context <function> | audit-context-building:audit-context-building |
variants <pattern> | variant-analysis:variant-analysis |
property | property-based-testing:property-based-testing |
prep | building-secure-contracts:audit-prep-assistant |
workflow | building-secure-contracts:secure-workflow-guide |
rules | semgrep-rule-creator:semgrep-rule-creator |