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/profiles-farcaster.md

View on GitHub
---
title: Fetch Farcaster profile data
impact: MEDIUM
tags: farcaster, profiles, social
---

## Fetch Farcaster profile data

Use `fetchFarcasterProfile` to get Farcaster user information.

**Basic usage:**

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

const profile = await fetchFarcasterProfile("dwr.eth");

console.log("Address:", profile.address);
console.log("Username:", profile.username);
console.log("Display Name:", profile.displayName);
console.log("FID:", profile.fid);
console.log("Followers:", profile.social?.follower);
console.log("Following:", profile.social?.following);
```

**In agent context:**

```typescript
agent.on("text", async (ctx) => {
  const senderAddress = await ctx.getSenderAddress();
  const profile = await fetchFarcasterProfile(senderAddress);
  
  if (profile.username) {
    await ctx.conversation.sendText(
      `Hello ${profile.displayName || profile.username}! ` +
      `You have ${profile.social?.follower || 0} followers on Farcaster.`
    );
  }
});
```

**Profile structure:**

```typescript
interface FarcasterProfile {
  address: string | null;
  displayName?: string | null;
  platform: string;            // "farcaster"
  username: string | null;
  fid: string | null;          // Farcaster ID
  social?: {
    uid: number | null;
    follower: number | null;
    following: number | null;
  } | null;
}
```

**Note:** The function uses web3.bio API under the hood. An API key is optional but recommended for higher rate limits.
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: 472kUpdated 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