تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

sui-coverage

بواسطة easonc13

Coding Agents & IDEs
1.1kالتنزيلات وفق ما يذكره clawskills.sh
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, and guides writing tests to close those gaps. Includes Python scripts for parsing coverage output into readable reports. Combines coverage improvement with security vulnerability analysis during the testing process.

Combines coverage reporting and security auditing in one pass, so gaps in test coverage double as signals for potential vulnerabilities rather than requiring separate tooling.

متى تستخدمها

  • Finding untested functions in a deployed Move module
  • Writing expected_failure tests for assertion edge cases
  • Generating a coverage report before submitting a contract audit
  • Checking branch coverage across if/else logic in Move code
  • Running a security review alongside test gap analysis

مثال على سير العمل

الإدخال

User asks: Improve test coverage for my_module in /path/to/my_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 a coverage report

  3. 3

    Read coverage.md to list uncovered functions, uncovered branches, and untested assertion 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, then commit the new tests

الإخراج

Updated test files with 100% coverage, plus a security findings summary noting any vulnerabilities discovered during test writing

المتطلبات

  • Sui CLI installed (`brew install sui` or official installer)

التثبيت

clawhub install easonc13/sui-coverage

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط