Comprehensive tutorial series for OpenClaw AI agent gateway
Learn to post casts, build threads, embed content, and reply to conversations.
./skills/farcaster-skill/scripts/fc_cast.sh --text "Hello Farcaster!"
Constraints:
./skills/farcaster-skill/scripts/fc_cast.sh \
--text "Exploring onchain generative art" \
--channel "cryptoart"
Popular channels: base, cryptoart, dev, frames, memes
./skills/farcaster-skill/scripts/fc_cast.sh \
--text "Check out this project" \
--embed "https://example.com/cool-thing"
The URL automatically generates an OpenGraph preview card.
URLs ending in image extensions auto-display as images:
./skills/farcaster-skill/scripts/fc_cast.sh \
--text "New artwork" \
--embed "https://example.com/art.png"
A quote-cast embeds another cast with your commentary. Different from a recast (which just re-shares without comment).
Do quote-cast:
Don’t quote-cast:
./skills/farcaster-skill/scripts/fc_cast.sh \
--text "This thread on FIP-8 is worth reading" \
--embed-cast "0xabc123..." \
--embed-cast-fid 3
Required parameters:
--embed-cast: The hash of the cast to quote--embed-cast-fid: The FID of the cast’s authorFor convenience, use the wrapper script:
./skills/farcaster-skill/scripts/quote_cast.sh "Great analysis here" "0xabc123..."
This handles the FID lookup automatically.
Replies are casts with a --parent reference.
./skills/farcaster-skill/scripts/fc_cast.sh \
--text "Great point! I'd add that..." \
--parent "0xabc123..."
"@alice: Here's what I think...""Here's what I think..."./scripts/fc_get_conversation.sh "0xabc123..." --parent-casts
One at a time - Process replies sequentially, not in batch
# 1. Get conversation context
CONTEXT=$(./scripts/fc_get_conversation.sh "$CAST_HASH" --parent-casts)
# 2. Analyze context, formulate response
# (your agent logic here)
# 3. Post reply
./scripts/fc_cast.sh --text "$REPLY_TEXT" --parent "$CAST_HASH"
Build multi-cast threads with fc_thread.sh.
./skills/farcaster-skill/scripts/fc_thread.sh \
"Good morning! Some thoughts:" \
--text "First, the market is showing interesting patterns" \
--text "Second, new art dropped that's worth checking out" \
--text "Third, a reminder to touch grass today"
./skills/farcaster-skill/scripts/fc_thread.sh \
--channel cryptoart \
"A thread on generative art techniques:" \
--text "Let's talk about noise functions..." \
--text "And how they create organic patterns..."
./scripts/fc_thread.sh \
"Artworks I'm watching today:" \
--listing "@artist — Sunset https://example.com/auction"
Remove a cast you’ve posted:
./skills/farcaster-skill/scripts/fc_delete.sh --hash "0xabc123..."
Only works for casts from your signer’s FID.
Based on Farcaster culture:
Scripts include built-in safeguards:
If you see “Safeguard abort”, wait before retrying or vary your content.
| Mistake | Consequence | Fix |
|---|---|---|
| Username prefix in reply | Looks spammy | Just write reply text |
| Batch posting replies | Rate limits, looks bot-like | One at a time |
| Truncated text | Incomplete thoughts | Generate full text first |
| Wrong script path | Command not found | Use full workspace path |
#!/bin/bash
# Example: Agent curates and shares content
SKILL_PATH="./skills/farcaster-skill/scripts"
# 1. Find interesting content
RESULTS=$($SKILL_PATH/fc_search.sh --query "generative art" --limit 5)
# 2. Select best cast to highlight
# (agent analysis here)
CAST_HASH="0x..."
CAST_FID="12345"
# 3. Post quote-cast with commentary
$SKILL_PATH/fc_cast.sh \
--text "This approach to noise functions is fascinating" \
--embed-cast "$CAST_HASH" \
--embed-cast-fid "$CAST_FID" \
--channel "cryptoart"
Learn to read feeds and search content in 03-reading-feeds.md.