ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

sui-decompile

Fetch on-chain Sui Move contract source code and let your agent explain how smart contracts work. Scrape from Suivision/Suiscan explorers, analyze DeFi protocols, and understand any contract on Sui.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/easonc13/sui-decompile
Or

Sui Decompile Skill

Fetch decompiled source code for on-chain Sui Move packages via block explorers.

GitHub: https://github.com/EasonC13-agent/sui-skills/tree/main/sui-decompile

Suivision (Preferred)

May have official verified source code when available.

URL: https://suivision.xyz/package/{package_id}?tab=Code

Browser workflow:

  1. browser action=open profile=openclaw targetUrl="https://suivision.xyz/package/{package_id}?tab=Code"
  2. Click module tabs on the left if multiple modules exist
  3. Extract code:
() => {
  const rows = document.querySelectorAll('table tr');
  const lines = [];
  rows.forEach(r => {
    const cells = r.querySelectorAll('td');
    if (cells.length >= 2) lines.push(cells[1].textContent);
  });
  return lines.join('\n');
}

Suiscan (Alternative)

URL: https://suiscan.xyz/mainnet/object/{package_id}/contracts

Browser workflow:

  1. browser action=open profile=openclaw targetUrl="https://suiscan.xyz/mainnet/object/{package_id}/contracts"
  2. Click "Source" tab (default may show Bytecode)
  3. Click module tabs if multiple modules
  4. Extract code:
() => {
  const rows = document.querySelectorAll('table tr');
  const lines = [];
  rows.forEach(r => {
    const cells = r.querySelectorAll('td');
    if (cells.length >= 2) lines.push(cells[1].textContent);
  });
  return lines.join('\n') || 'not found';
}

Multiple Modules

Packages like DeepBook (0xdee9) have multiple modules:

  1. List module tabs from sidebar
  2. Click each tab, extract code
  3. Save to separate .move files

Examples

PackageSuivisionSuiscan
Sui Frameworksuivision.xyz/package/0x2?tab=Codesuiscan.xyz/mainnet/object/0x2/contracts
DeepBooksuivision.xyz/package/0xdee9?tab=Codesuiscan.xyz/mainnet/object/0xdee9/contracts

Use with Other Skills

This skill works great with the Sui development skill suite:

  • sui-move: Write and deploy Move smart contracts. Use sui-decompile to study existing contracts, then use sui-move to write your own.
  • sui-coverage: Analyze test coverage. Decompile a contract, write tests for it, then check coverage.

Typical workflow:

  1. sui-decompile - Study how a DeFi protocol works
  2. sui-move - Write your own contract based on learned patterns
  3. sui-coverage - Ensure your code is well-tested

Server/Headless Setup

For running on servers without display (CI/CD, VPS, etc.), use Puppeteer with a virtual display to avoid headless detection:

# Install xvfb (virtual framebuffer)
sudo apt-get install xvfb

# Run with virtual display (avoids headless detection)
xvfb-run --auto-servernum node scraper.js

Puppeteer example:

const puppeteer = require('puppeteer');

Metadata

Author@easonc13
Stars2387
Views0
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-easonc13-sui-decompile": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.