返回顶部
f

farcaster-skillFarcaster技能

Post, read, search, and engage on Farcaster via the Neynar API. Use when an agent needs to: (1) post casts with text, embeds, or in channels, (2) reply to or thread casts, (3) read a user's feed or a channel feed, (4) search casts by keyword, (5) look up user profiles by username or FID, (6) like or recast, (7) delete casts, (8) list or search channels. Pure bash+curl+jq — zero npm dependencies.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,059
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

farcaster-skill

Farcaster 技能(Neynar v2)

所有脚本均使用 Neynar v2 REST API。需要 curl 和 jq。

设置

设置以下环境变量(或传递 --api-key / --signer 参数):

bash
export NEYNARAPIKEY=your-api-key
export NEYNARSIGNERUUID=your-signer-uuid # 写操作必需

或者,将凭据放入 JSON 文件并引用:
bash
eval $(jq -r export NEYNARAPIKEY=\(.apiKey)\nexport NEYNARSIGNERUUID=\(.signerUuid) /path/to/neynar.json)

脚本

fc_cast.sh — 发布 Cast

发布文本,可附带嵌入、频道或回复。

bash

简单文本 cast


scripts/fc_cast.sh --text 你好 Farcaster!

带图片/视频嵌入的 cast

scripts/fc_cast.sh --text 看看这个 --embed https://example.com/image.png

带两个嵌入(最多 2 个)

scripts/fc_cast.sh --text 链接 --embed https://a.com --embed https://b.com

发布到频道

scripts/fc_cast.sh --text gm --channel base

回复 cast

scripts/fc_cast.sh --text 好观点! --parent 0xabcdef1234...

引用 cast(嵌入另一个 cast)

scripts/fc_cast.sh --text 这个 👆 --embed-cast 0xabcdef1234... --embed-cast-fid 12345

输出:JSON {success, hash}。

fc_feed.sh — 读取信息流

bash

按 FID 获取用户 cast


scripts/fc_feed.sh --fid 3 --limit 10

按用户名获取用户 cast

scripts/fc_feed.sh --username vitalik --limit 5

频道信息流

scripts/fc_feed.sh --channel base --limit 10

关注信息流(签名者关注的人的 cast)

scripts/fc_feed.sh --following --fid 3 --limit 10

Cast 回复/线程

scripts/fc_feed.sh --thread 0xabcdef...

带游标的分页

scripts/fc_feed.sh --fid 3 --cursor eyJwYWdlIjoxfQ==

输出:包含 {hash, author, text, timestamp, embeds, reactions, replies} 的 cast JSON 数组。

fc_user.sh — 用户查询

bash

按用户名


scripts/fc_user.sh --username dwr

按 FID

scripts/fc_user.sh --fid 3

按以太坊地址(已验证)

scripts/fc_user.sh --address 0x1234...

批量按 FID

scripts/fc_user.sh --fids 3,194,6131

输出:包含 {fid, username, displayname, bio, followercount, followingcount, verifiedaddresses} 的用户 JSON 对象。

fc_search.sh — 搜索 Cast

bash

按关键词搜索


scripts/fc_search.sh --query base chain

带作者筛选的搜索

scripts/fc_search.sh --query ethereum --author-fid 3

在频道中搜索

scripts/fc_search.sh --query gm --channel base

限制结果数量

scripts/fc_search.sh --query nft --limit 5

输出:匹配 cast 的 JSON 数组。

fc_react.sh — 点赞 / 转发

bash

点赞 cast


scripts/fc_react.sh --like 0xabcdef...

取消点赞

scripts/fc_react.sh --like 0xabcdef... --undo

转发

scripts/fc_react.sh --recast 0xabcdef...

取消转发

scripts/fc_react.sh --recast 0xabcdef... --undo

fc_delete.sh — 删除 Cast

bash
scripts/fc_delete.sh --hash 0xabcdef...

fc_channels.sh — 列出和搜索频道

bash

按关键词搜索频道


scripts/fc_channels.sh --search defi

按 ID 获取频道详情

scripts/fc_channels.sh --id base

列出热门频道

scripts/fc_channels.sh --trending --limit 10

常见模式

线程式多 cast 公告

bash
HASH1=$(scripts/fc_cast.sh --text 线程 🧵 1/3:重大消息! --channel base | jq -r .hash)
HASH2=$(scripts/fc_cast.sh --text 2/3:详情在此... --parent $HASH1 | jq -r .hash)
scripts/fc_cast.sh --text 3/3:下方链接 --parent $HASH2 --embed https://example.com

监控提及(轮询循环)

bash
while true; do
scripts/fc_search.sh --query @yourusername --limit 5
sleep 300
done

发布带媒体内容(先上传,后嵌入)

bash

先上传到 catbox/litterbox


URL=$(curl -sS -F reqtype=fileupload -F time=72h \
-F fileToUpload=@/path/to/image.png \
https://litterbox.catbox.moe/resources/internals/api.php)

然后嵌入 URL

scripts/fc_cast.sh --text 看看这个! --embed $URL

免费版与付费版

并非所有端点都在 Neynar 免费计划中可用。

功能脚本免费?
发布 castfccast.sh
用户 cast 信息流
fcfeed.sh --fid | ✅ |
| 用户查询(用户名/FID/地址) | fc_user.sh | ✅ |
| 点赞 / 转发 | fc_react.sh | ✅ |
| 关注信息流 | fc_feed.sh --following | ✅ |
| 频道信息流 | fc_feed.sh --channel | ❌ 付费 |
| Cast 搜索 | fc_search.sh | ❌ 付费 |
| 频道搜索/详情/热门 | fc_channels.sh | ❌ 付费 |
| 删除 cast | fc_delete.sh | ❌ 付费 |
| 线程/对话 | fc_feed.sh --thread | ✅ |

访问付费端点的脚本将以非零退出并显示明确的 402 PaymentRequired 错误。

错误处理

所有脚本成功时退出 0,失败时退出非零。错误以 JSON 格式输出到 stderr:
json
{error: message, status: 403}

常见错误:

  • - 401 — API 密钥无效
  • 402 — 功能需要付费 Neynar 计划
  • 403 — 签名者未批准或未与 API 密钥配对
  • 404 — 未找到 Cast/用户/频道
  • 429 — 请求频率限制(Neynar 免费版:300 次/分钟)

API 参考

完整端点列表和参数文档请参见 references/neynar_endpoints.md。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 farcaster-skill-1776335646 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 farcaster-skill-1776335646 技能

通过命令行安装

skillhub install farcaster-skill-1776335646

下载

⬇ 下载 farcaster-skill v1.0.1(免费)

文件大小: 15.11 KB | 发布时间: 2026-4-17 16:12

v1.0.1 最新 2026-4-17 16:12
Republish to fix registry visibility

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部