--- name: doma description: > 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. license: MIT metadata: author: doma-protocol version: "1.1" compatibility: Requires Node.js 18+ and npm. allowed-tools: Bash(doma *), Bash(npx -y @doma-protocol/doma-cli *), Bash(which doma) --- # Doma Protocol Skill 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. ## Prerequisites The `doma` CLI can be installed globally or run via `npx`: ```bash # 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 ``` ## Agent Rules 1. **Detect CLI availability once per conversation** — run `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 `doma` for brevity; substitute the npx prefix when needed. 2. **Always** pass `-f json` to every command so you can parse structured output. 3. **Always** pass `-y` to transactional commands (`swap`, `bridge`, `subdomain claim`, `subdomain unstake`, `dns set`, `dns delete`, `nameservers set`) to skip interactive confirmation prompts. 4. Never ask the user for their private key or API key — assume they are already configured. 5. **Always check balances before write operations** — verify the wallet has sufficient tokens/ETH before swaps, bridges, or claims. 6. **Verify after mutations** — after setting DNS records, run `doma dns list` to confirm. After claiming a subdomain, run `doma subdomain list` to verify. ## Setup The CLI reads configuration from `~/.doma/config.json` or environment variables. Use `doma config set ` 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` | ## Supported Chains | 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 ` or `--chain ` on any command to target a specific chain. ## Token Resolution Tokens can be specified as: - Well-known symbols: `ETH`, `USDC`, `WETH` - Token name (e.g., `software.ai`) - Contract address (`0x…`) Amounts are always in human-readable decimals (e.g., `1.5` means 1.5 tokens). ## Commands ### token — Get detailed token information ```bash doma token -f json ``` Returns: name, symbol, address, status, tradingVenue, priceUsd, change24hPercent, marketCapUsd, tvlUsd, volume24hUsd, holders, launchpad info, and more. ### balance — Check wallet balances ```bash doma balance -f json # ETH + USDC on Doma doma balance -f json # Specific token doma balance --chain ethereum -f json # ETH + USDC on Ethereum ``` ### quote — Get a swap quote ```bash doma quote -f json ``` Auto-detects the best route: launchpad bonding curve, Uniswap V3, or multi-step. ### swap — Execute a token swap ```bash doma swap -y -f json doma swap -s -y -f json ``` | Flag | Default | |---|---| | `-s, --slippage ` | 50 (0.5%) | ### bridge — Bridge ETH or USDC across chains ```bash doma bridge --from --to -y -f json ``` Only ETH and USDC are bridgeable. Uses Relay protocol. ### domain — Get on-chain domain information ```bash doma domain -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. ### dns list — List DNS records ```bash doma dns list -f json doma dns list --host -f json ``` ### dns set — Set a DNS record onchain ```bash doma dns set -y -f json ``` Use `@` for name to set a record at the apex. | Flag | Default | |---|---| | `--ttl ` | 3600 | ### dns delete — Delete a DNS record onchain ```bash doma dns delete -y -f json ``` Use `@` for name to delete a record at the apex. ### nameservers list — List nameservers ```bash doma nameservers list -f json ``` ### nameservers set — Set nameservers ```bash doma nameservers set [ns2] [ns3] [ns4] -y -f json ``` Supports 1 to 4 nameservers. Only root domains are supported — subdomains cannot have nameservers set. ### subdomain check — Check availability and staking price ```bash doma subdomain check