Skip to content

xmtplabs/xmtp-agent-examples / skills/resolving-domains

resolving-domains

Verified

ENS and Web3 identity resolution for XMTP agents. Use when resolving domain names, extracting mentions, or fetching Farcaster profiles. Triggers on ENS resolution, Farcaster lookup, or mention extraction.

FileKindSize
SKILL.mdskill md3.9 KB
rules/extract-mentions.mdmarkdown1.4 KB
rules/profiles-farcaster.mdmarkdown1.5 KB
rules/resolve-address.mdmarkdown1.3 KB

rules/extract-mentions.md

View on GitHub
---
title: Extract @mentions from text
impact: HIGH
tags: mentions, parsing, extract
---

## Extract @mentions from text

Use `extractMentions` to find all mentions in a message.

**Basic extraction:**

```typescript
import { extractMentions } from "../../utils/resolver";

const message = "Hey @vitalik.eth and @dwr, check this out!";
const mentions = extractMentions(message);
// Returns: ["vitalik.eth", "dwr"]
```

**Supported formats:**

```typescript
// @domain.eth
extractMentions("Hello @vitalik.eth"); // ["vitalik.eth"]

// @username (becomes username.farcaster.eth when resolving)
extractMentions("Hello @fabri"); // ["fabri"]

// Standalone domain.eth
extractMentions("Check vitalik.eth"); // ["vitalik.eth"]

// Shortened addresses in groups
extractMentions("@0xabc5…f002"); // ["0xabc5…f002"]

// Full addresses
extractMentions("Send to 0x1234567890abcdef..."); // ["0x1234..."]
```

**Resolve all mentions:**

```typescript
import { resolveMentionsInMessage } from "../../utils/resolver";

const message = "Send 10 USDC to @vitalik.eth";
const members = await ctx.conversation.members();

const resolved = await resolveMentionsInMessage(message, members);
// Returns: { "vitalik.eth": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" }
```

**Filter subdomains:**

The function automatically filters parent domains when subdomains are present:
- If `"byteai.base.eth"` exists, `"base.eth"` is filtered out
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall