Agent skill

Web3 Guide

by mobazha in mobazha/mobazha-unified

Guide for Web3/blockchain development in Mobazha including wallet connection (Reown AppKit), ethers.js v6 patterns, Escrow smart contracts, multi-chain support, and RWA tokenization.

MPL-2.0Auto-check passedBackend & APIs

Install Web3 Guide

skills CLI
$ npx skills add mobazha/mobazha-unified --skill web3-guide -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mobazha/mobazha-unified web3-guide --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mobazha/mobazha-unified.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/web3-guide .claude/skills/web3-guide && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
web3-guide
GitHub stars
165
Token cost
~1.6k tokens
SKILL.md length
228 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MPL-2.0

At a glance

Guide for Web3/blockchain development in Mobazha including wallet connection (Reown AppKit), ethers.js v6 patterns, Escrow smart contracts, multi-chain support, and RWA tokenization.

  • Works in 4 steps: ethers v6 语法:项目使用 v6,注意与 v5 的区别 → Provider vs Signer → Gas 处理 → …
  • Working with wallets
  • SKILL.md covers 技术栈, 支持的网络, 钱包连接模式 and Escrow 智能合约, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Web3 Guide is an agent skill from mobazha/mobazha-unified. Guide for Web3/blockchain development in Mobazha including wallet connection (Reown AppKit), ethers.js v6 patterns, Escrow smart contracts, multi-chain support, and RWA tokenization. Use when working with wallets, transactions, smart contracts, or blockchain features, "Web3", "钱包", "合约", "Escrow", "区块链", "交易", "RWA".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Smart contracts, Crypto and DeFi analysis and Natural language processing. It works with macOS and Solana. The repository describes itself as: Open-source commerce frontend for storefronts, marketplaces, checkout, and seller management. The licence is MPL-2.0.

When your agent uses it

  • Working with wallets
  • Smart contracts
  • Blockchain features

Example prompts

  • “Escrow”
  • “/web3-guide”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. ethers v6 语法:项目使用 v6,注意与 v5 的区别
  2. Provider vs Signer
  3. Gas 处理
  4. 错误处理

What it can do on your machine

Read from SKILL.md and the folder at commit 156c699. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript, bash and go).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Web3 Guide loads about 1.6k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 228 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mobazha/mobazha-unified at commit 156c699, republished under its MPL-2.0 licence (© mobazha). 228 words, ~1,620 tokens.

Download SKILL.mdSave it as .claude/skills/web3-guide/SKILL.md (or your agent's skills folder).
name
web3-guide
description
Guide for Web3/blockchain development in Mobazha including wallet connection (Reown AppKit), ethers.js v6 patterns, Escrow smart contracts, multi-chain support, and RWA tokenization. Use when working with wallets, transactions, smart contracts, or blockchain features, "Web3", "钱包", "合约", "Escrow", "区块链", "交易", "RWA".

Web3 开发指南

Mobazha 去中心化市场的区块链开发规范。

技术栈

组件技术文件位置
钱包连接Reown AppKit + EthersAdapterpackages/core/providers/AppKitProvider.tsx
EVM 交互ethers.js v6packages/core/services/payment/
Solana原生 Providerpackages/core/services/payment/solana.ts
状态管理walletStorepackages/core/stores/walletStore.ts
HooksuseWallet, useEscrow, useSolanaWalletpackages/core/hooks/

支持的网络

EVM 主网:Ethereum, BSC, Polygon, Arbitrum, Optimism, Avalanche EVM 测试网:Sepolia, BSC Testnet, Mumbai, Arbitrum Sepolia, Optimism Sepolia, Fuji Solana:Mainnet, Devnet

钱包连接模式

AppKit 初始化
typescript
// packages/core/providers/AppKitProvider.tsx
// 已封装为 React Provider,使用时只需包裹:
<AppKitProvider>
  <App />
</AppKitProvider>
获取 Provider 和 Signer
typescript
import { useWallet } from '@mobazha/core';

function PaymentComponent() {
  const {
    address, // 当前钱包地址
    isConnected, // 连接状态
    chainId, // 当前链 ID
    connect, // 连接钱包
    disconnect, // 断开连接
    switchNetwork, // 切换网络
    signMessage, // 签名消息
  } = useWallet();

  // 获取 ethers Provider/Signer
  const provider = new BrowserProvider(walletProvider);
  const signer = await provider.getSigner();
}
网络切换
typescript
// AppKit 自动处理网络切换 UI
// 代码层面验证当前网络:
if (chainId !== expectedChainId) {
  await switchNetwork(expectedChain);
  // AppKit 会弹出网络切换提示
}

// 不支持的网络会自动断开连接(AppKitProvider 中已处理)

Escrow 智能合约

工作流程
买家付款 → Escrow 创建 → 卖家发货 → 买家确认 → Release
                                    ↓
                              买家发起争议 → 仲裁员裁决 → Resolve
创建 Escrow
typescript
import { useEscrow } from '@mobazha/core';

const { createEscrow, releaseEscrow, getEscrowInfo } = useEscrow();

// 原生代币 Escrow
await createEscrow({
  orderId: 'order-123',
  sellerAddress: '0x...',
  moderatorAddress: '0x...',
  amount: parseEther('0.1'),
  tokenAddress: null, // null = 原生代币
});

// ERC20 代币 Escrow
await createEscrow({
  orderId: 'order-123',
  sellerAddress: '0x...',
  moderatorAddress: '0x...',
  amount: parseUnits('100', 6), // USDT 6 位精度
  tokenAddress: '0x...USDT',
});
监听 Escrow 事件
typescript
// packages/core/services/payment/escrow.ts
const unsubscribe = escrowService.listenToEscrowEvents(orderId, {
  onCreated: event => {
    /* 创建成功 */
  },
  onReleased: event => {
    /* 资金释放 */
  },
  onRefunded: event => {
    /* 退款完成 */
  },
  onDisputeResolved: event => {
    /* 争议解决 */
  },
});

// 清理
return () => unsubscribe();

交易状态管理

walletStore 模式
typescript
// packages/core/stores/walletStore.ts
// 已封装的状态管理:
const {
  balances, // 各币种余额
  isLoading, // 加载状态
  fetchBalances, // 刷新余额
  sendTransaction, // 发送交易
  selectedCoin, // 当前选中币种
} = useWalletStore();
交易生命周期
typescript
// 1. 准备阶段
const gasEstimate = await contract.method.estimateGas(...args);

// 2. 发送交易
const tx = await contract.method(...args); // 返回 TransactionResponse

// 3. 等待确认
const receipt = await tx.wait(); // 等待链上确认
if (receipt.status === 0) throw new Error('交易失败');

// 4. 更新 UI
await fetchBalances(); // 刷新余额

RWA (Real World Asset) 相关

项目支持 RWA 代币化,涉及:

  • ERC1155 / ERC3525 标准
  • packages/core/services/rwa/ — RWA 服务
  • packages/core/hooks/useRwaAssets.ts — RWA 资产 hook
  • packages/core/utils/rwaAssetResolver.ts — 资产解析
合约交互模式
typescript
// rwaBalanceService.ts 中的模式
const contract = new ethers.Contract(
  contractAddress,
  ERC1155_ABI,
  provider // 只读查询用 provider,写操作用 signer
);

const balance = await contract.balanceOf(ownerAddress, tokenId);

关键注意事项

  1. ethers v6 语法:项目使用 v6,注意与 v5 的区别

    • BrowserProvider 替代 Web3Provider
    • parseEther / formatEther 从 ethers 直接导入
    • BigInt 替代 BigNumber(ethers 层面)
  2. Provider vs Signer:

    • 只读操作(查询余额、读取合约)→ 使用 Provider
    • 写操作(发送交易、调用合约方法)→ 使用 Signer
  3. Gas 处理:

    • 始终先 estimateGas
    • 考虑 EIP-1559 的 maxFeePerGas 和 maxPriorityFeePerGas
  4. 错误处理:

    • 用户拒绝交易:ACTION_REJECTED
    • 余额不足:INSUFFICIENT_FUNDS
    • Gas 不足:UNPREDICTABLE_GAS_LIMIT

快速检查清单

  • 交易前是否检查钱包连接和正确的链?
  • 是否使用 estimateGas() 预估 gas?
  • 合约地址是否使用 ethers.getAddress() 规范化?
  • 金额是否正确处理精度(parseUnits / formatUnits)?
  • 是否有完善的错误处理(用户拒绝、余额不足等)?
  • 事件监听是否在组件卸载时清理?

后端智能合约源码(bsc-smart-contracts)

EVM 合约
合约路径说明
Escrowcontracts/escrow/MobazhaEscrow.sol托管合约
EscrowSpeccontracts/escrow/EscrowSpec.mdEscrow 功能规范
RWA Marketplacecontracts/rwa-marketplace/RWA 市场合约
Broadway Tokencontracts/broadway/演出票务 RWA
Group Marketplacecontracts/marketplace/群组集市验证合约
Deploy Scriptsmigrations/ + scripts/部署脚本
Solana 程序
程序路径说明
Escrowsolana_anchor/programs/escrow/Solana Escrow 程序
RWAsolana_anchor/programs/rwa/Solana RWA 程序
测试solana_anchor/tests/Anchor 测试
Go Binding 生成

mobazha 通过 abigen 生成 Go binding 与合约交互:

bash
# 从 ABI 生成 Go binding
abigen --abi=MobazhaEscrow.abi --pkg=escrow --out=escrow.go

# Go binding 位置: mobazha/pkg/contracts/
Go 后端合约交互

mobazha 中的合约调用模式:

go
// pkg/contracts/ — Go binding 文件
// internal/multiwallet/ — 多链钱包管理,负责签名和发送交易
// pkg/wallet/ — 钱包接口定义

相关功能文档

  • 钱包集成 — useWallet Hook 完整 API、AppKit 配置、Escrow 合约、支持的链列表
  • bsc-smart-contracts 各合约目录下的 README.md — 合约详细说明

© mobazha, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/web3-guide of mobazha/mobazha-unified.

Open the folder on GitHubat commit 156c699

Compare with similar skills

Web3 Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Web3 Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Web3 Guide this skillmobazha/mobazha-unified165—~1.6kAutomated safety check: PassMPL-2.0
Solana Token Extensionssolanabr/ai-kit108—~3.5kAutomated safety check: PassMIT
Switchboard Oracle SDKinternet-court/internet-court-skill6.4k3 repos~2.9kAutomated safety check: PassApache-2.0
Pyth Network Price Feedsinternet-court/internet-court-skill6.4k2 repos~3.9kAutomated safety check: PassApache-2.0
Swap Tokenscirclefin/skills155—~4.6kAutomated safety check: NotesApache-2.0
Use Usdccirclefin/skills155—~2.4kAutomated safety check: NotesApache-2.0

Similar skills

  • Helps choose, combine and create Token-2022 mint and account extensions on Solana with the spl-token CLI, @solana/kit or Anchor, and integrate the resulting mints.

    108 GitHub stars~3.5k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Switchboard Oracle SDK

    internet-court/internet-court-skill

    Covers integrating Switchboard oracles on Solana: pull feeds, oracle quotes, VRF randomness and Surge WebSocket streaming, from both the TypeScript SDK and Rust.

    6.4k GitHub starsUsed in 3 repos~2.9k tokens
    Backend & APIsAuto-check passed
  • Pyth Network Price Feeds

    internet-court/internet-court-skill

    Shows how to read Pyth oracle prices in Solana apps, off-chain through the Hermes client or on-chain from an Anchor program, including confidence and EMA values.

    6.4k GitHub starsUsed in 2 repos~3.9k tokens
    Backend & APIsAuto-check passed
  • Swap Tokens

    circlefin/skills

    Build browser or server token swaps with Circle App Kit or standalone Swap Kit.

    155 GitHub stars~4.6k tokensUpdated 22 days ago
    Backend & APIsAuto-check: notes
  • Use Usdc

    circlefin/skills

    USDC is Circle's stablecoin deployed across multiple blockchain ecosystems including EVM chains (Ethereum, Base, Arbitrum, Polygon, Arc) and Solana.

    155 GitHub stars~2.4k tokensUpdated 22 days ago
    Backend & APIsAuto-check: notes
  • Multichain non-custodial agent wallet via Finance District - check balances, prices, and best DeFi yields, move funds, swap, and make x402 paid API calls across EVM, Solana, Bitcoin, and Sui.

    767 GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from mobazha/mobazha-unified

All 29 skills in this repo
  • A11y Guide

    mobazha/mobazha-unified

    Accessibility guide for Mobazha following WCAG 2.1 AA standards including color contrast, reduced motion, ARIA patterns, keyboard navigation, focus management, and screen reader testing.

    165 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • API Reference

    mobazha/mobazha-unified

    Look up Mobazha backend API endpoints, request/response formats, and field mappings.

    165 GitHub stars~1.7k tokensUpdated 4 days ago
    Auto-check passed
  • Code Review

    mobazha/mobazha-unified

    Review code for quality, architecture consistency, and adherence to Mobazha project standards using confidence-based filtering.

    165 GitHub stars~464 tokensUpdated 4 days ago
    Auto-check passed
  • Code Simplifier

    mobazha/mobazha-unified

    Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality.

    165 GitHub stars~601 tokensUpdated 4 days ago
    Auto-check passed
  • Commit Helper

    mobazha/mobazha-unified

    Generate commit messages and run pre-commit validation following Mobazha conventions.

    165 GitHub stars~735 tokensUpdated 4 days ago
    Auto-check passed
  • Component Dev

    mobazha/mobazha-unified

    Create and modify UI components following Mobazha conventions including directory structure, spacing standards, accessibility, and testing.

    165 GitHub stars~638 tokensUpdated 4 days ago
    Auto-check passed

Works with

Questions about Web3 Guide

What does Web3 Guide do?

Guide for Web3/blockchain development in Mobazha including wallet connection (Reown AppKit), ethers.js v6 patterns, Escrow smart contracts, multi-chain support, and RWA tokenization. Web3 Guide is an agent skill from mobazha/mobazha-unified.js v6 patterns, Escrow smart contracts, multi-chain support, and RWA tokenization.

When should I use Web3 Guide?

Web3 Guide fits situations like: working with wallets; smart contracts; blockchain features.

How do I install Web3 Guide in Claude Code?

Run `npx skills add mobazha/mobazha-unified --skill web3-guide -a claude-code`. Or copy the skill folder (.cursor/skills/web3-guide in mobazha/mobazha-unified) into .claude/skills/web3-guide in your project. Claude Code loads it when a task matches its description.

How do I install Web3 Guide in Codex?

Run `npx skills add mobazha/mobazha-unified --skill web3-guide -a codex`. Or copy the skill folder (.cursor/skills/web3-guide in mobazha/mobazha-unified) into .agents/skills/web3-guide in your project. Codex loads it when a task matches its description.

Can I use Web3 Guide in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mobazha/mobazha-unified --skill web3-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/web3-guide, .gemini/skills/web3-guide, .github/skills/web3-guide and .opencode/skills/web3-guide in your project.

What does Web3 Guide need to run?

SKILL.md names no scripts, command-line tools or credentials: Web3 Guide is instructions for the agent only.

Does Web3 Guide access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Web3 Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Web3 Guide use?

Web3 Guide is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Web3 Guide use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Web3 Guide?

Skills that share tags, products or a category with Web3 Guide: Solana Token Extensions (solanabr/ai-kit, 108 stars), Switchboard Oracle SDK (internet-court/internet-court-skill, 6.4k stars), Pyth Network Price Feeds (internet-court/internet-court-skill, 6.4k stars) and Swap Tokens (circlefin/skills, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Web3 Guide?

mobazha (a GitHub organization) maintains it in mobazha/mobazha-unified, which has 165 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 3, 2026.

Source: mobazha/mobazha-unified on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.