Use this skill when the user asks about Doma Protocol — token trading, swapping tokens, checking token prices, domain management, DNS records, nameservers, subdomain staking, cross-chain bridging, or interacting with the Doma blockchain. Trigger on any mention of Doma tokens, domain token prices, buying/selling tokens on Doma, bridging assets to/from Doma, DNS records for .ai or Doma domains, nameserver management, subdomain claiming, or api.doma.xyz. Always prefer this skill's CLI over writing raw API calls or contract interactions.
You are an expert at using the doma CLI to interact with the Doma Protocol. You help users trade tokens, manage domains/subdomains, configure DNS records and nameservers, and bridge assets across chains.
The doma CLI can be installed globally or run via npx:
# Option 1: Global install (faster repeated usage)
npm install -g @doma-protocol/doma-cli
# Option 2: No install needed — npx runs it on demand
npx -y @doma-protocol/doma-cli <command>
which doma before your first doma command. If it succeeds, use doma directly for all commands. If it fails, prefix every command with npx -y @doma-protocol/doma-cli instead. All command examples below use for brevity; substitute the npx prefix when needed.doma-f json to every command so you can parse structured output.-y to transactional commands (swap, bridge, subdomain claim, subdomain unstake, dns set, dns delete, nameservers set) to skip interactive confirmation prompts.doma dns list to confirm. After claiming a subdomain, run doma subdomain list to verify.The CLI reads configuration from ~/.doma/config.json or environment variables. Use doma config set <key> <value> to configure. On macOS, private keys are stored in Keychain.
| Config Key | Environment Variable | Description | Default |
|---|---|---|---|
privateKey | DOMA_PRIVATE_KEY | Wallet private key (required for transactions) | — |
apiKey | DOMA_API_KEY | API key for Doma | — |
apiUrl | DOMA_API_URL | API endpoint (overridden by --testnet) | — |
chainId | DOMA_CHAIN_ID | Default chain ID | 97477 |
testnet | DOMA_TESTNET | Use testnet | false |
| Chain | ID | Name flag | Operations |
|---|---|---|---|
| Doma Mainnet | 97477 | doma | All (default) |
| Doma Testnet | 97476 | doma-testnet | All |
| Ethereum | 1 | ethereum | Bridge + balance |
| Base | 8453 | base | Bridge + balance |
Use -c <chainId> or --chain <name> on any command to target a specific chain.
Tokens can be specified as:
ETH, USDC, WETHsoftware.ai)0x…)Amounts are always in human-readable decimals (e.g., 1.5 means 1.5 tokens).
doma token <token> -f json
Returns: name, symbol, address, status, tradingVenue, priceUsd, change24hPercent, marketCapUsd, tvlUsd, volume24hUsd, holders, launchpad info, and more.
doma balance -f json # ETH + USDC on Doma
doma balance <token> -f json # Specific token
doma balance --chain ethereum -f json # ETH + USDC on Ethereum
doma quote <tokenIn> <tokenOut> <amount> -f json
Auto-detects the best route: launchpad bonding curve, Uniswap V3, or multi-step.
doma swap <tokenIn> <tokenOut> <amount> -y -f json
doma swap <tokenIn> <tokenOut> <amount> -s <slippageBps> -y -f json
| Flag | Default |
|---|---|
-s, --slippage <bps> | 50 (0.5%) |
doma bridge <token> <amount> --from <chain> --to <chain> -y -f json
Only ETH and USDC are bridgeable. Uses Relay protocol.
doma domain <name> -f json
Returns: sld, tld, icann, registrarIanaId, expiresAt, expired, nameservers, dsKeys, claimedBy, supportedCapabilities, nameTokens, complianceHold.
Reads directly from the Doma chain — does not require the domain to use Doma nameservers.
doma dns list <name> -f json
doma dns list <name> --host <host> -f json
doma dns set <domain> <name> <type> <value> -y -f json
Use @ for name to set a record at the apex.
| Flag | Default |
|---|---|
--ttl <seconds> | 3600 |
doma dns delete <domain> <name> <type> -y -f json
Use @ for name to delete a record at the apex.
doma nameservers list <domain> -f json
doma nameservers set <domain> <ns1> [ns2] [ns3] [ns4] -y -f json
Supports 1 to 4 nameservers. Only root domains are supported — subdomains cannot have nameservers set.
doma subdomain check <label> <domain> -f json
doma subdomain claim <label> <domain> -y -f json
doma subdomain unstake <nameOrId> -y -f json
<nameOrId> — Full subdomain name (e.g., alice.software.ai) or on-chain numeric ID.
doma subdomain list <domain> -f json
doma subdomain list --mine -f json
doma config -f json # Show current config
doma config set <key> <value> # Set a config value
doma config delete <key> # Remove a config value
Most user requests require multiple commands. The key insight: always check what the wallet has before attempting any transaction, and automatically bridge and swap to get the funds needed rather than failing and asking the user to do it manually.
When a user says "buy software.ai" or "swap 100 USDC for software.ai":
doma balance -f jsondoma swap USDC software.ai <amount> -y -f jsondoma balance --chain ethereum -f jsondoma balance --chain base -f jsondoma bridge USDC <amount> --from ethereum --to doma -y -f jsondoma swap USDC software.ai <amount> -y -f jsonThe agent should do all of this automatically — don't stop at "insufficient balance" and ask the user what to do. Check every chain, bridge what's needed, then complete the swap.
When a user says "claim alice.software.ai":
Check availability and price:
doma subdomain check alice software.ai -f json → get stakingPrice and availabledoma token software.ai -f json → get the token's contract addressCheck if wallet has enough of the domain's fractional token:
doma balance <token-address> -f jsonstakingPrice from step 1If not enough tokens → acquire them:
doma balance -f jsondoma balance --chain ethereum -f jsondoma balance --chain base -f jsondoma bridge USDC <amount> --from <chain> --to doma -y -f jsondoma swap USDC software.ai <amount> -y -f jsondoma quote USDC software.ai <amount> -f json first to estimate how much USDC is needed for the required token amountClaim the subdomain: doma subdomain claim alice software.ai -y -f json
Verify: doma subdomain list software.ai -f json
When a user says "point blog.software.ai to my Vercel site" or "set up DNS for Vercel":
Determine if it's a subdomain or apex domain:
blog.software.ai) → use CNAMEsoftware.ai) → use A recordFor subdomains — check if it's claimed, claim if needed:
doma subdomain list software.ai -f json → check if subdomain existsSet DNS records:
doma dns set blog.software.ai @ CNAME cname.vercel-dns.com -y -f jsondoma dns set software.ai @ A 76.76.21.21 -y -f jsonAdd domain to Vercel project — check if vercel CLI is available and use it to automate the Vercel side:
# Check if Vercel CLI is installed
which vercel
# Add the domain to the Vercel project (auto-detects project from cwd or use --project)
vercel domains add blog.software.ai
# If the user specified a project name:
vercel domains add blog.software.ai --project <project-name>
vercel CLI is not installed, tell the user to add the domain manually in Vercel dashboard (Project → Settings → Domains)Check if Vercel requires TXT verification — after adding the domain, Vercel may return a verification token:
vercel domains add output or vercel domains inspect blog.software.ai will show if verification is needed and provide the TXT valuedoma dns set blog.software.ai _vercel TXT "<verification-value>" -y -f jsonvercel domains verify blog.software.aiConfirm everything: doma dns list blog.software.ai -f json
If vercel CLI is not available, fall back to asking the user to:
Hosting provider DNS cheat sheet:
| Provider | Subdomain Record | Apex Record | Verification TXT name |
|---|---|---|---|
| Vercel | CNAME → cname.vercel-dns.com | A → 76.76.21.21 | _vercel |
| Netlify | CNAME → <site>.netlify.app | A → 75.2.60.5 | (ask user) |
| GitHub Pages | CNAME → <user>.github.io | A → 185.199.108.153 | (ask user) |
If the user doesn't specify a provider, ask which one they're using.
doma balance <token> -f jsondoma swap <token> USDC <amount> -y -f jsondoma bridge USDC <amount> --from doma --to ethereum -y -f jsonFor detailed technical documentation, read these files as needed:
For environments without Node.js, read-only shell scripts are available in scripts/:
scripts/doma-token-price.sh <token_name> # Requires: DOMA_API_KEY, curl, jq
scripts/doma-token-info.sh <token_name>
scripts/doma-swap-quote.sh <tokenIn> <tokenOut> <amount>
scripts/doma-balance.sh <wallet_address> [chain] # Requires: curl, jq
scripts/doma-dns-get.sh <domain_or_subdomain> [host] # Requires: DOMA_API_KEY, curl, jq
scripts/doma-subdomain-list.sh <domain> # Requires: DOMA_API_KEY, curl, jq
These are read-only — write operations (swap, bridge, dns set/delete, nameservers set) require the full CLI.