rishavmukherji

Farcaster Agent

コンテンツ制作v1.2.0
作者:rishavmukherji更新日 2026-05-18全 4 バージョン · 最新版の公開日 2026-02-04farcaster-agent@clawhub_rishavmukherji/farcaster-agent
SNS 運用

AlphaMoatによると、2026-09時点でFarcaster Agentのダウンロード数は3,861、スター数は10で、AIスキル全体5,078件中2,702位、コンテンツ制作では362件中186位です。

インストール数
126
ダウンロード数
3861
スター数
10
総合順位
#2,702
全体の上位 54% · コンテンツ制作の上位 52%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗1263861101
SkillHub ↗124382810—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

自動フローではウォレットの作成や利用、資産のブリッジまたは交換、オンチェーン取引の送信、公開投稿が行われる場合があります。資格情報は平文の JSON として保存される可能性があります。資金を最小限にした専用ウォレットを使い、秘密鍵を安全に管理し、取引や投稿を承認する前に内容を確認してください。 平文の自動保存を無効にするか安全な秘密情報ストアを使い、導入前に依存関係を確認してください。

資料公開日 2026-10-29

できること

  • Farcaster アカウント登録とプロフィール設定の手順を把握する
  • cast の公開や取引署名前の安全確認を行う

使う場面

  • ユーザーがアカウント作成または投稿を明示的に承認し、ウォレット、資格情報の保存、オンチェーン操作を確認済みの場合

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

ウォレット作成や取引を行わずに、Farcaster ID 登録とプロフィール設定の手順をまとめて。
投稿前に確認する cast の文面、署名キー、オンチェーン取引を整理して。

月次の推移

ダウンロード数3861
3133352439152026-05 · ダウンロード数 31872026-06 · ダウンロード数 33222026-07 · ダウンロード数 35682026-08 · ダウンロード数 36642026-09 · ダウンロード数 386126-0526-09
スター数10
910112026-05 · スター数 102026-06 · スター数 102026-07 · スター数 102026-08 · スター数 102026-09 · スター数 1026-0526-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-093861—10
2026-083664+2.7%10
2026-073568+7.4%10
2026-063322+4.2%10
2026-053187—10

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

8.5 KB・ClawHub v1.2.0
---
name: farcaster-agent
description: Create Farcaster accounts and post casts autonomously. Official skill from the Farcaster team.
metadata: {"openclaw":{"emoji":"🟣","requires":{"bins":["node","npm"],"env":[]},"install":[{"id":"npm","kind":"shell","command":"cd {baseDir}/.. && npm install","label":"Install dependencies"}]}}
---

# Farcaster Agent

Official skill from the Farcaster team. Create and manage a Farcaster account autonomously. Register a new Farcaster identity (FID), add signing keys, set up a profile with username, and post casts to the network.
すべて表示(全 300 行)
## When to Use This Skill

Use this skill when:
- You need to create a Farcaster account from scratch
- You want to post casts (messages) to Farcaster
- You need to set up a profile with username, bio, and profile picture
- You want autonomous presence on the Farcaster social network

## Prerequisites

You need approximately **$1 of ETH or USDC** on any major chain (Ethereum, Optimism, Base, Arbitrum, or Polygon). The skill handles bridging and swapping automatically.

## Complete Flow

### Step 1: Generate Wallet and Request Funding

If you don't have a funded wallet, create one first:

```javascript
const { Wallet } = require('ethers');

const wallet = Wallet.createRandom();
console.log('Address:', wallet.address);
console.log('Private Key:', wallet.privateKey);
```

**Ask your human:** "I've created a wallet. Please send ~$1 of ETH or USDC to `<address>` on any of these chains: Ethereum, Optimism, Base, Arbitrum, or Polygon. Let me know when done."

**Save the private key securely** - you'll need it for all subsequent steps.

### Step 2: Run Auto-Setup

Once funded, run the complete setup:

```bash
cd {baseDir}/..
PRIVATE_KEY=0x... node src/auto-setup.js "Your first cast text here"
```

This will:
1. Detect which chain has funds (ETH or USDC)
2. Bridge/swap to get ETH on Optimism and USDC on Base
3. Register your FID (Farcaster ID)
4. Add a signer key
5. Wait for hub synchronization
6. Post your first cast
7. **Automatically save credentials** to persistent storage

### Step 3: Credentials are Saved Automatically

Credentials are automatically saved to:
- `~/.openclaw/farcaster-credentials.json` (if OpenClaw is installed)
- `./credentials.json` (fallback)

**Security Warning:** Credentials are stored as **plain text JSON**. Anyone with access to these files can control the wallet funds and Farcaster account. For production use, implement your own secure storage.

You can verify and manage credentials:

```bash
cd {baseDir}/..

# List all stored accounts
node src/credentials.js list

# Get credentials for active account
node src/credentials.js get

# Show credentials file path
node src/credentials.js path
```

To disable auto-save, use `--no-save`:
```bash
PRIVATE_KEY=0x... node src/auto-setup.js "Your cast" --no-save
```

## Posting Casts

To post additional casts, load credentials from storage:

```javascript
const { postCast, loadCredentials } = require('{baseDir}/../src');

// Load saved credentials
const creds = loadCredentials();

const { hash } = await postCast({
  privateKey: creds.custodyPrivateKey,
  signerPrivateKey: creds.signerPrivateKey,
  fid: Number(creds.fid),
  text: 'Your cast content'
});

console.log('Cast URL: https://farcaster.xyz/~/conversations/' + hash);
```

Or via CLI with environment variables:

```bash
cd {baseDir}/..
PRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 node src/post-cast.js "Your cast content"
```

## Setting Up Profile

To set username, display name, bio, and profile picture:

```bash
cd {baseDir}/..
PRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 npm run profile myusername "Display Name" "My bio" "https://example.com/pfp.png"
```

Or programmatically:

```javascript
const { setupFullProfile } = require('{baseDir}/../src');

await setupFullProfile({
  privateKey: '0x...',
  signerPrivateKey: '...',
  fid: 123,
  fname: 'myusername',
  displayName: 'My Display Name',
  bio: 'I am an autonomous AI agent.',
  pfpUrl: 'https://api.dicebear.com/7.x/bottts/png?seed=myagent'
});
```

### Fname (Username) Requirements

- Lowercase letters, numbers, and hyphens only
- Cannot start with a hyphen
- 1-16 characters
- One fname per account
- Can only change once every 28 days

### Profile Picture Options

For PFP, use any publicly accessible HTTPS image URL:
- **DiceBear** (generated avatars): `https://api.dicebear.com/7.x/bottts/png?seed=yourname`
- IPFS-hosted images
- Any public image URL

## Cost Breakdown

| Operation | Cost |
|-----------|------|
| FID Registration | ~$0.20 |
| Add Signer | ~$0.05 |
| Bridging | ~$0.10-0.20 |
| Each API call | $0.001 |
| **Total minimum** | **~$0.50** |

Budget $1 to have buffer for retries and gas fluctuations.

## API Endpoints

### Neynar Hub API (`https://hub-api.neynar.com`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/v1/submitMessage` | POST | Submit casts, profile updates (requires x402 payment header) |
| `/v1/onChainIdRegistryEventByAddress?address=<addr>` | GET | Check if FID is synced for address |
| `/v1/onChainSignersByFid?fid=<fid>` | GET | Check if signer keys are synced |

### Neynar REST API (`https://api.neynar.com`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/v2/farcaster/cast?identifier=<hash>&type=hash` | GET | Verify cast exists on network |

### Farcaster Fname Registry (`https://fnames.farcaster.xyz`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/transfers` | POST | Register or transfer an fname (requires EIP-712 signature) |
| `/transfers/current?name=<fname>` | GET | Check fname availability (404 = available) |

### x402 Payment
- **Address:** `0xA6a8736f18f383f1cc2d938576933E5eA7Df01A1`
- **Cost:** 0.001 USDC per API call (on Base)
- **Header:** `X-PAYMENT` with base64-encoded EIP-3009 `transferWithAuthorization` signature

## Common Errors

### "invalid hash"
Cause: Old library version. Fix: Run `npm install @farcaster/hub-nodejs@latest`

### "unknown fid"
Cause: Hub hasn't synced your registration yet. Fix: Wait 30-60 seconds and retry.

### Transaction reverts when adding signer
Cause: Metadata encoding issue. Fix: The code already uses the correct `SignedKeyRequestValidator.encodeMetadata()` method.

### "fname is not registered for fid"
Cause: Hub hasn't synced your fname registration. Fix: Wait 30-60 seconds (the code handles this automatically).

## Manual Step-by-Step (If Auto-Setup Fails)

If auto-setup fails partway through, you can run individual steps:

```bash
cd {baseDir}/..

# 1. Register FID (on Optimism)
PRIVATE_KEY=0x... node src/register-fid.js

# 2. Add signer key (on Optimism)
PRIVATE_KEY=0x... node src/add-signer.js

# 3. Swap ETH to USDC (on Base, for x402 payments)
PRIVATE_KEY=0x... node src/swap-to-usdc.js

# 4. Post cast
PRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 node src/post-cast.js "Hello!"

# 5. Set up profile
PRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 npm run profile username "Name" "Bio" "pfp-url"
```

## Programmatic API

All functions are available for import:

```javascript
const {
  // Full autonomous setup
  autoSetup,
  checkAllBalances,

  // Core functions
  registerFid,
  addSigner,
  postCast,
  swapEthToUsdc,

  // Profile setup
  setProfileData,
  registerFname,
  setupFullProfile,

  // Credential management
  saveCredentials,
  loadCredentials,
  listCredentials,
  setActiveAccount,
  updateCredentials,
  getCredentialsPath,

  // Utilities
  checkFidSync,
  checkSignerSync,
  getCast
} = require('{baseDir}/../src');
```

## Example: Full Autonomous Flow

```javascript
const { Wallet } = require('ethers');
const { autoSetup, setupFullProfile } = require('{baseDir}/../src');

// 1. Generate wallet (or use existing)
const wallet = Wallet.createRandom();
console.log('Fund this address with $1 ETH or USDC:', wallet.address);

// 2. After human funds the wallet, run setup
const result = await autoSetup(wallet.privateKey, 'gm farcaster!');

console.log('FID:', result.fid);
console.log('Signer:', result.signerPrivateKey);
console.log('Cast:', result.castHash);

// 3. Set up profile
await setupFullProfile({
  privateKey: wallet.privateKey,
  signerPrivateKey: result.signerPrivateKey,
  fid: result.fid,
  fname: 'myagent',
  displayName: 'My AI Agent',
  bio: 'Autonomous agent on Farcaster',
  pfpUrl: 'https://api.dicebear.com/7.x/bottts/png?seed=myagent'
});

console.log('Profile: https://farcaster.xyz/myagent');
```

## Source Code

The complete implementation is at: https://github.com/rishavmukherji/farcaster-agent

For detailed technical documentation, see the AGENT_GUIDE.md in that repository.

コンテンツ制作の人気スキル

文章去AI味工具コンテンツ制作

文章に残る AI らしさを見つけて取り除き、人が書いたように読める文章にします。

↓ 37.7万★ 688user_ab5ae6ee
Humanizerコンテンツ制作

AI が書いた文章の典型的な痕跡を見つけ、意味を保ったまま自然な文章に書き直す文章編集スキルです。

↓ 32万★ 1107B*T
humanizer-zhコンテンツ制作

AI が生成した文章の痕跡を見つけて取り除く中国語の編集スキルです。

↓ 10.5万★ 103liuxy951129-cpu
公众号热门文章查询コンテンツ制作

wechat-search は WeChat の人気記事を検索し、関連度、人気、鮮度で結果を整理します。

↓ 7.2万★ 118user_5f9c21aa
抖音文案一键提取コンテンツ制作

公開された短編動画の共有リンクからタイトル、概要、口播テキストを抽出し、改写版も作ります。

↓ 6.2万★ 183user_a41ae6c8
一键去AI味工具コンテンツ制作

humanizer は中国語と英語の文章を自然な表現に整えるための編集ガイドです。

↓ 4.8万★ 55user_ab5ae6ee
番茄小说写作助手(单章2200-2800字)コンテンツ制作

Web 小説の各章をファイルに書き、会話では要約と位置だけを返します。

↓ 4.5万★ 347user_634bbcdc
Marketing Skillsコンテンツ制作

複数のマーケティング手法をひとつのスキルにまとめ、依頼内容に合うモジュールへ振り分けるスキルです。

↓ 3.9万★ 158Jordan Chops

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。