Comprehensive tutorial series for OpenClaw AI agent gateway
Learn to read user feeds, channel content, search casts, and explore Farcaster’s data.
The fc_feed.sh script supports multiple feed types:
| Option | Description |
|---|---|
--fid FID |
User’s casts by FID |
--username NAME |
User’s casts by username |
--channel ID |
Channel feed |
--following |
Following feed (requires --fid) |
--thread HASH |
Thread/replies for a cast |
./skills/farcaster-skill/scripts/fc_feed.sh --username "vitalik" --limit 10
./skills/farcaster-skill/scripts/fc_feed.sh --fid 3 --limit 5
./skills/farcaster-skill/scripts/fc_feed_user_popular.sh --username "dwr" --limit 10
./skills/farcaster-skill/scripts/fc_feed_user_recasts.sh --fid 3 --limit 10
./skills/farcaster-skill/scripts/fc_feed.sh --channel "base" --limit 20
# Search channels
./skills/farcaster-skill/scripts/fc_channels.sh --search "art"
# Get channel details
./scripts/fc_channels.sh --id "cryptoart"
# Trending channels
./scripts/fc_channels.sh --trending --limit 10
./skills/farcaster-skill/scripts/fc_search.sh --query "onchain art" --limit 20
# By author
./scripts/fc_search.sh --query "generative" --author-fid 3
# By channel
./scripts/fc_search.sh --query "auction" --channel "cryptoart"
# Combined
./scripts/fc_search.sh --query "base" --author-fid 3 --limit 5
Personalized algorithmic feed:
./skills/farcaster-skill/scripts/fc_feed_for_you.sh --fid 874249 --limit 20
Casts containing Farcaster Frames:
./skills/farcaster-skill/scripts/fc_feed_frames.sh --limit 10
Find casts embedding a specific domain:
./skills/farcaster-skill/scripts/fc_feed_parent_urls.sh \
--parent-url "github.com" --limit 20
./skills/farcaster-skill/scripts/fc_user.sh --username "alice"
./scripts/fc_user.sh --fid 12345
./scripts/fc_user.sh --address "0x1234..."
./scripts/fc_user.sh --fids "3,194,6131"
./skills/farcaster-skill/scripts/fc_user_fid.sh --address "0xabc..."
./skills/farcaster-skill/scripts/fc_user_active.sh --fid 12345
./skills/farcaster-skill/scripts/fc_user_location.sh --location "NYC" --limit 20
All feed scripts support pagination:
# First page
RESULT=$(./scripts/fc_feed.sh --channel "base" --limit 20)
# Extract cursor from response
CURSOR=$(echo "$RESULT" | jq -r '.next.cursor')
# Next page
./scripts/fc_feed.sh --channel "base" --limit 20 --cursor "$CURSOR"
./skills/farcaster-skill/scripts/fc_get_conversation.sh "0xabc123..."
./scripts/fc_get_conversation.sh "0xabc123..." \
--reply-depth 3 \
--parent-casts \
--viewer-fid 874249 \
--limit 50
Options:
--reply-depth N: How deep to fetch replies (default: 2)--parent-casts: Include parent casts in chronological order--viewer-fid FID: Respect mutes/blocks for this viewer--limit N: Max casts to fetch (1-50)Lighter alternative for simple context:
./skills/farcaster-skill/scripts/fc_reply_context.sh "0xabc123..."
See who quoted a specific cast:
./skills/farcaster-skill/scripts/fc_cast_quotes.sh \
--identifier "0xabc123..." \
--type hash \
--limit 50
All scripts output JSON. Use jq to extract what you need:
# Get just the cast text
./scripts/fc_feed.sh --username "dwr" --limit 5 | \
jq -r '.casts[].text'
# Get cast hashes
./scripts/fc_feed.sh --channel "base" --limit 10 | \
jq -r '.casts[].hash'
# Get author usernames
./scripts/fc_search.sh --query "crypto" --limit 10 | \
jq -r '.casts[].author.username'
#!/bin/bash
# Agent discovers and analyzes trending content
SKILL_PATH="./skills/farcaster-skill/scripts"
# 1. Get trending channels
CHANNELS=$($SKILL_PATH/fc_channels.sh --trending --limit 5)
# 2. For each channel, get top casts
for CHANNEL in $(echo "$CHANNELS" | jq -r '.channels[].id'); do
echo "=== Channel: $CHANNEL ==="
$SKILL_PATH/fc_feed.sh --channel "$CHANNEL" --limit 3 | \
jq -r '.casts[] | "\(.author.username): \(.text)"'
done
# 3. Search for specific topics
echo "=== Topic: onchain art ==="
$SKILL_PATH/fc_search.sh --query "onchain art" --limit 5 | \
jq -r '.casts[] | "[\(.hash)] \(.author.username): \(.text)"'
#!/bin/bash
# Research a specific user before engaging
USERNAME="$1"
SKILL_PATH="./skills/farcaster-skill/scripts"
echo "=== Profile ==="
$SKILL_PATH/fc_user.sh --username "$USERNAME" | \
jq '{fid: .user.fid, bio: .user.profile.bio.text, followers: .user.follower_count}'
echo "=== Recent Casts ==="
$SKILL_PATH/fc_feed.sh --username "$USERNAME" --limit 5 | \
jq -r '.casts[] | "- \(.text)"'
echo "=== Popular Casts ==="
$SKILL_PATH/fc_feed_user_popular.sh --username "$USERNAME" --limit 3 | \
jq -r '.casts[] | "- [\(.reactions.likes_count) likes] \(.text)"'
Learn engagement patterns (reactions, replies, conversation flow) in 04-engagement.md.