返回顶部
b

bluesky-skill蓝天技能

>-

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

bluesky-skill

Bluesky 账户管理

通过 ./bsky <命令> [参数] 操作 Bluesky 社交媒体账户。所有输出均为 JSON 格式。从项目根目录运行。

设置

安装依赖:
bash
pip install atproto python-dotenv

需要在项目根目录创建 .env 文件:

BLUESKY_HANDLE=你的用户名.bsky.social
BLUESKYAPPPASSWORD=xxxx-xxxx-xxxx-xxxx

应用密码获取地址:https://bsky.app/settings/app-passwords。如需使用私信功能,请启用允许访问您的私信。

认证过程自动完成。会话缓存存储在 ~/.bsky_session.json(包含导出的会话令牌)。删除此文件可强制重新认证或在撤销访问权限时使用。

JSON 输出

每个命令向标准输出打印一个 JSON 对象。使用 json.loads() 解析。

响应结构

帖子对象(由 get 返回,以及 timeline、search-posts、my-posts、thread 的数组内):
json
{
uri: at://did:plc:abc/app.bsky.feed.post/xyz,
cid: bafyrei...,
author: {handle: alice.bsky.social, did: did:plc:abc, display_name: Alice, avatar: https://...},
text: 帖子内容,
created_at: 2026-03-14T10:00:00Z,
likecount: 5, repostcount: 2, reply_count: 1,
viewer: {liked: at://...点赞URI或null, reposted: at://...转发URI或null},
embed: {images: [{alt: ..., thumb: ..., fullsize: ...}], external: {uri: ..., title: ..., description: ...}, record: {uri: ..., text: ..., author: {...}}} 或 null,
reply: {parenturi: at://..., rooturi: at://...} // 仅回复帖子时存在
}

个人资料对象(由 profile 返回,以及 search-users 的数组内):
json
{
handle: alice.bsky.social, did: did:plc:abc,
display_name: Alice, description: 个人简介文本, avatar: https://...,
followerscount: 100, followscount: 50, posts_count: 200,
viewer: {following: at://...或null, followedby: at://...或null, blocking: null, blockedby: null, muted: null}
}

用户对象(简短个人资料,出现在帖子作者、粉丝/关注列表、通知作者中):
json
{handle: alice.bsky.social, did: did:plc:abc, display_name: Alice, avatar: https://...}

通知对象(在 notifications 的数组内):
json
{
reason: reply|like|repost|follow|mention|quote,
uri: at://..., cid: bafyrei..., is_read: false,
indexed_at: 2026-03-14T10:00:00Z,
author: {handle: ..., did: ..., display_name: ..., avatar: ...},
record_text: 他们的回复/帖子文本(如适用),
reason_subject: at://...他们点赞/转发/回复的帖子(如适用),
subjecttext: 主题帖子的文本(如果存在 reasonsubject)
}

会话对象(在 dm-list 的数组内):
json
{
id: 会话ID, unread_count: 2,
members: [{handle: ..., did: ..., display_name: ..., avatar: ...}],
lastmessage: {id: 消息ID, text: ..., sentat: ..., sender_did: did:plc:...} 或 null
}

私信消息对象(在 dm-read 的数组内):
json
{id: 消息ID, text: 消息文本, sentat: 2026-03-14T10:00:00Z, senderdid: did:plc:...}

信息流对象(在 feeds 的数组内):
json
{
uri: at://did:plc:abc/app.bsky.feed.generator/whats-hot,
cid: bafyrei..., did: did:web:...,
creator: {handle: ..., did: ..., display_name: ..., avatar: ...},
display_name: 热门内容, description: Bluesky 上的热门帖子,
avatar: https://..., likecount: 12345, indexedat: 2026-03-14T10:00:00Z
}

命令响应键

每个命令返回以下顶级键:

命令响应键
post{uri, cid}
delete
{deleted}(URI) |
| like | {liked, uri}(帖子URI + 点赞记录URI) |
| unlike | {unliked} |
| repost | {reposted, uri}(帖子URI + 转发记录URI) |
| unrepost | {unreposted} |
| timeline | {feed: [{post: <帖子>, reason: {type: repost, by: <用户>} 或 null}], cursor} |
| thread | {thread: <帖子,包含嵌套的 replies: [...]>} |
| search-posts | {posts: [<帖子>], cursor} |
| search-users | {actors: [<个人资料>], cursor} |
| follow | {followed, uri} |
| unfollow | {unfollowed} |
| followers | {followers: [<用户>], cursor} |
| following | {following: [<用户>], cursor} |
| mute | {muted} |
| unmute | {unmuted} |
| block | {blocked, uri} |
| unblock | {unblocked} |
| profile | <个人资料>(顶级,无包装) |
| get | <帖子>(顶级,无包装) |
| my-posts | {posts: [<帖子>], cursor} |
| user-posts | {posts: [<帖子>], cursor} |
| likes | {likes: [{actor: <用户>, created_at: ...}], cursor} |
| reposts | {reposted_by: [<用户>], cursor} |
| notifications | {notifications: [<通知>], cursor} |
| notif-read | {success: true} |
| dm-list | {conversations: [<会话>], cursor} |
| dm-read | {convo_id, messages: [<私信>], cursor} |
| dm-send | {sent: true, convoid, messageid} |
| dm-mark-read | {success: true} |
| update-profile | <个人资料>(顶级,无包装) |
| post-thread | {posts: [{uri, cid}, ...]} |
| feeds | {feeds: [<信息流>], cursor} |

重要提示: 注意 timeline 将帖子包装在 feed[].post 中(带有可选的 reason),而 search-posts 和 my-posts 直接使用 posts[]。

分页

列表命令支持 --cursor TOKEN。响应中包含 cursor(null = 没有更多结果)。

  1. 1. 首次调用:省略 --cursor
  2. 下一页:将返回的 cursor 作为

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 bluesky-skill-1776065223 技能

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

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

通过命令行安装

skillhub install bluesky-skill-1776065223

下载

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

文件大小: 12.23 KB | 发布时间: 2026-4-15 11:55

v1.0.1 最新 2026-4-15 11:55
**Initial public release with improved setup instructions and dependency management.**

- Added pip install instructions for required dependencies (`atproto`, `python-dotenv`)
- Detailed location and handling of session cache for authentication
- Clarified setup steps for `.env` usage and app passwords
- All other command references and response schemas remain unchanged

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

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

p2p_official_large
返回顶部