跳到正文
TakoAPI
返回技能列表

sui-auto-test

由 easonc13 提供

Coding Agents & IDEs
978下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Analyze Sui Move test coverage, identify untested code, write missing tests, and perform security audits.

描述

该技能的功能

Analyzes test coverage for Sui Move smart contracts, identifies uncovered functions, branches, and assertion failure paths, then writes the missing tests. Also performs security analysis during the testing process, checking for access control issues, integer overflow, and economic exploits.

Combines coverage gap detection with security analysis in a single workflow, so test-writing and vulnerability review happen together rather than as separate passes.

何时使用

  • Identifying untested functions in a Sui Move module
  • Writing expected_failure tests for assert! paths
  • Generating coverage reports before a contract audit
  • Catching integer overflow vulnerabilities while improving coverage
  • Verifying 100% branch coverage before mainnet deployment

示例工作流

输入

User asks: Improve test coverage for my_module in my Sui Move package

智能体
  1. 1

    Run sui move test --coverage --trace in the package directory

  2. 2

    Run analyze_source.py -m my_module -o coverage.md to generate the coverage report

  3. 3

    Read coverage.md to list uncovered functions, uncovered branches, and untested assert! failure paths

  4. 4

    Write Move tests for each gap, including #[expected_failure] tests for abort paths and paired tests for if/else branches

  5. 5

    Re-run coverage analysis to confirm all gaps are closed and document any security findings

输出

New test functions added to the module's test file, coverage at 100%, and a security report noting any vulnerabilities found during the process

前置要求

  • Sui CLI installed and available in PATH

安装

clawhub install easonc13/sui-auto-test

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接