一键导入
sui-skill-generator
Generate professional SKILL.md files for any Sui Move contract
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate professional SKILL.md files for any Sui Move contract
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | sui-skill-generator |
| description | Generate professional SKILL.md files for any Sui Move contract |
This is a meta-skill that enables you to analyze Sui blockchain contracts and generate specialized SKILL.md files. When a user asks to understand, document, or integrate a Sui contract, use this skill to fetch the contract data and generate appropriate documentation.
Trigger this skill when the user says:
Generate different documentation based on user needs:
| Scene | Use When | Focus Areas |
|---|---|---|
sdk | User wants to integrate/call the contract | Function signatures, code examples, PTB patterns |
learn | User wants to understand the protocol | Architecture, concepts, state transitions |
audit | User is reviewing security | Permission model, risks, vulnerability checklist |
frontend | User is building a UI | User flows, data queries, event handling |
bot | User is building automation | Entry functions, gas optimization, monitoring |
docs | User wants comprehensive docs | API reference, terminology, FAQ |
Use Sui RPC to get the normalized module:
curl -X POST https://fullnode.mainnet.sui.io:443 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_getNormalizedMoveModule",
"params": ["PACKAGE_ID", "MODULE_NAME"]
}'
Or to list all modules in a package:
curl -X POST https://fullnode.mainnet.sui.io:443 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_getNormalizedMoveModulesByPackage",
"params": ["PACKAGE_ID"]
}'
Extract from the response:
exposedFunctions: Map of function names to their definitions
isEntry: Whether it can be called directlyvisibility: "Public", "Private", or "Friend"parameters: Array of parameter typesreturn: Array of return typestypeParameters: Generic type constraintsstructs: Map of struct definitions
abilities: ["copy", "drop", "store", "key"]fields: Array of field definitionstypeParameters: Generic parameters# {Module Name} - SDK Integration Guide
## Quick Start
[30-second example to call the contract]
## Contract Info
[Package ID, Module, Network table]
## Function Reference
### Entry Functions
[For each entry function: name, parameters, returns, code example]
### Public Functions (Composable)
[For each public function: signature, usage]
## PTB Patterns
[How to combine operations]
## Error Handling
[Common errors and solutions]
# {Module Name} - Protocol Deep Dive
## Overview
[One-liner explanation]
## Architecture
[Mermaid diagram of components]
## Core Concepts
[For each struct: purpose, abilities, fields]
## State Transitions
[How operations change state]
## Design Patterns
[Patterns used in the code]
# {Module Name} - Security Analysis
## Executive Summary
[Key metrics table]
## Permission Model
[Who can call what]
## Asset Flow
[How tokens move in/out]
## Risk Classification
[High/Medium/Low risk functions]
## Vulnerability Checklist
[Common checks and status]
# {Module Name} - Frontend Integration
## User Operations
[Actions users can take]
## Data Fetching
[How to query state]
## Event Listening
[Events to subscribe to]
## UX Best Practices
[Loading states, errors, confirmations]
# {Module Name} - Trading Bot Guide
## Entry Functions for Automation
[Functions suitable for bots]
## Gas Optimization
[Tips to reduce costs]
## Batch Operations
[PTB patterns for efficiency]
## Monitoring
[State polling and events]
# {Module Name} Documentation
## API Reference
[All functions with signatures]
## Type Definitions
[All structs with fields]
## Terminology
[Glossary of terms]
## FAQ
[Common questions]
Map Sui Move types to TypeScript:
| Move Type | TypeScript |
|---|---|
bool | boolean |
u8, u16, u32 | number |
u64, u128, u256 | bigint | string |
address | string |
vector<T> | T[] |
0x1::string::String | string |
0x2::object::ID | string |
0x2::coin::Coin<T> | string (object ID) |
&T / &mut T | string (object ID) |
Classify function risk by:
| Indicator | Risk Level |
|---|---|
| Name contains "admin", "owner", "emergency" | High |
| Handles Coin types | Medium-High |
| Has &mut parameters | Medium |
| View-only (no state changes) | Low |
For a package 0xdee9::clob_v2:
sui_getNormalizedMoveModule("0xdee9", "clob_v2")| Network | RPC URL |
|---|---|
| Mainnet | https://fullnode.mainnet.sui.io |
| Testnet | https://fullnode.testnet.sui.io |
| Devnet | https://fullnode.devnet.sui.io |
Infer Purpose: Use function names to guess what they do
swap_*, exchange_* → DEX operationsmint_*, create_* → Creation operationsburn_*, destroy_* → Destruction operationstransfer_*, send_* → Transfer operationsIdentify Key Objects: Look for structs with key ability - these are on-chain objects
Find Entry Points: Entry functions are the main user-facing operations
Track Dependencies: Note which external packages are used (0x1, 0x2, etc.)
Always output as a complete SKILL.md file with:
This meta-skill enables Claude to become an expert on any Sui contract.