From sui-dev-agents
Integrates SuiNS (SUI Name Service) to resolve .sui names to addresses, perform reverse lookups, and register names. Includes frontend TypeScript examples and SuiNS API migration notes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sui-dev-agents:sui-suinsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Human-readable names for SUI addresses (like ENS for Ethereum).**
Human-readable names for SUI addresses (like ENS for Ethereum).
Targets: @mysten/suins 1.1.4 (^1.1), @mysten/sui 2.17.0 (^2.16). Tested: 2026-05-21.
Compatibility notes: @mysten/sui is a peer dependency. Use SuinsClient.getNameRecord(name): Promise<NameRecord | null> (NameRecord has targetAddress) — there is no getAddress / getName. Reverse lookup goes through client.core.defaultNameServiceName({ address }).
SuiNS provides:
GraphQL Breaking Changes:
Query.suinsName(name: ...) → Query.address(name: ...) for resolving SuiNS namesIAddressable.defaultSuinsName → IAddressable.defaultNameRecord.target for reverse lookupQuery.nameRecord for fetching the full SuiNS NameRecord for a given name# Old (deprecated)
query { suinsName(name: "alice.sui") { address } }
# New (v1.64+, current)
query { address(name: "alice.sui") }
query { nameRecord(name: "alice.sui") { ... } }
use suins::registry;
public fun register_name(
name: String,
duration_years: u64,
payment: Coin<SUI>,
ctx: &mut TxContext
) {
registry::register(
name,
duration_years,
payment,
ctx
);
}
public fun resolve(name: String): Option<address> {
registry::lookup(name)
}
// @check:skip
import { SuinsClient } from '@mysten/suins';
import { SuiGrpcClient } from '@mysten/sui/grpc';
const client = new SuiGrpcClient({
network: 'mainnet',
baseUrl: 'https://fullnode.mainnet.sui.io:443',
});
const suins = new SuinsClient({ client, network: 'mainnet' });
// Resolve name to address via NameRecord
async function resolveName(name: string): Promise<string | null> {
const record = await suins.getNameRecord(name);
return record?.targetAddress ?? null;
}
// Reverse lookup: address to default name (provided by SuiGrpcClient core)
async function getName(address: string): Promise<string | null> {
const res = await client.core.defaultNameServiceName({ address });
return res.data.name;
}
// Register new name
async function registerName(name: string, years: number) {
const tx = new Transaction();
const [coin] = tx.splitCoins(tx.gas, [tx.pure(calculateCost(years))]);
tx.moveCall({
target: `${SUINS_PACKAGE}::registry::register`,
arguments: [
tx.pure(name),
tx.pure(years),
coin
]
});
return await signAndExecute({ transaction: tx });
}
// @check:skip
function AddressDisplay({ address }: { address: string }) {
const { data: name } = useQuery({
queryKey: ['suins', address],
queryFn: () => getName(address)
});
return (
<span>
{name || `${address.slice(0, 6)}...${address.slice(-4)}`}
</span>
);
}
❌ Not caching name resolutions
❌ Assuming all addresses have names
❌ Not validating name format
❌ Forgetting to handle subdomain resolution
❌ Hard-coding name prices
❌ Not showing expiration dates
❌ Using names without ownership verification
Query SuiNS docs:
// @check:skip
const suinsInfo = await sui_docs_query({
type: "github",
target: "suins",
query: "name registration and resolution API"
});
Make SUI addresses human-friendly!
npx claudepluginhub first-mover-tw/sui-dev-agents --plugin sui-dev-agentsProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.