关于 bluesky
bluesky 是通过 `bsky` 命令行应用向 Bluesky 发布内容的技能,支持文本、媒体、回复和引用,并提供内容准备与隐私方面的指引。
主要功能
- 01发布文本帖子
- 02附加带替代文本的图片
- 03分享带替代文本的视频
- 04回复和引用帖子
- 05使用 `bsky` 命令
适用场景
- 01发布项目更新
- 02用图片或视频分享技术见解
- 03回复 Bluesky 帖子
- 04引用帖子并补充背景
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ maragudk/ skills --skill bluesky安装后在 Claude Code 中输入/bluesky确认已加载。
详细介绍
Bluesky
概述
使用终端应用 bsky 在 Bluesky 社交网络上发布内容。此技能支持创建文本帖子、分享带有替代文本的图片和视频、回复帖子以及引用帖子。
何时使用此技能
在以下场景中使用此技能:
- 明确要求 - 直接收到在 Bluesky 上发布内容的请求时
- 主动分享 - 在公共代码仓库中工作时,遇到以下情况:
- 值得宣布的已完成功能或重要里程碑
- 有趣的技术见解或发现
- 重大成就或项目发布
- 与社区相关的更新或公告
重要提示: 仅在公共代码仓库中主动建议发布内容。切勿建议发布私人或内部工作的相关内容。
核心功能
1. 文本帖子
使用 bsky post 命令创建简单的文本帖子:
bsky post "Your message here"
对于较长或多行的帖子,请使用标准输入:
echo "Your longer message
with multiple lines" | bsky post --stdin
最佳实践:
- 保持帖子简洁且引人入胜
- 使用恰当的格式和换行,提升可读性
- 可以在末尾添加相关话题标签
- URL 必须包含
https://协议前缀——像www.example.com/path这样的裸域名不会呈现为可点击链接。请始终使用https://www.example.com/path
2. 带图片的帖子
使用 --image 或 -i 标志在帖子中添加图片:
bsky post "Check out this screenshot!" --image /path/to/image.png
多张图片:
bsky post "Here are several images" \
--image image1.png \
--image image2.png \
--image image3.png
添加替代文本以提升无障碍性:
bsky post "New feature screenshot" \
--image screenshot.png \
--image-alt "Dashboard showing user analytics with graphs"
最佳实践:
- 始终使用
--image-alt提供替代文本,以提升无障碍性 - 替代文本应描述清晰且简洁
--image-alt标志的顺序应与--image标志一致
3. 带视频的帖子
使用 --video 或 -v 标志分享视频内容:
bsky post "Demo of the new feature" --video demo.mp4
添加替代文本:
bsky post "Feature demo" \
--video demo.mp4 \
--video-alt "Screen recording showing the login flow with OAuth"
4. 回复帖子
使用 -r 标志和 AT 协议 URI 回复现有帖子。
重要提示: 传入位置参数形式的文本时,-r 标志不起作用——CLI 会将其视为帖子文本的一部分。回复时请始终使用 --stdin。此外,-r 要求使用 AT 协议 URI(at://...),不能使用 Bluesky 网页 URL。
echo "Thanks for sharing!" | bsky post --stdin -r "at://did:plc:xyz/app.bsky.feed.post/abc123"
5. 引用帖子
使用 -q 标志引用现有帖子:
bsky post "Great point about Go modules!" -q at://did:plc:xyz/app.bsky.feed.post/abc123
工作流指南
创建帖子时:
- 确定内容类型 - 仅文本、带图片、带视频、回复或引用
- 准备消息 - 撰写清晰简洁、能提供背景信息的文本
- 准备媒体内容(如适用) - 确保图片/视频可访问,并撰写描述性替代文本
- 构造命令 - 根据内容类型使用相应标志
- 发布帖子 - 运行
bsky post命令 - 验证是否成功 - 检查命令输出以确认结果
内容指南
建议或创建帖子时:
- 保持真实 - 分享真诚的见解和成就
- 提供价值 - 确保帖子能为社区带来帮助
- 提供背景信息 - 不要假设所有人都了解相关背景
- 保持专业 - 在技术社交媒体上保持恰当的语气
- 尊重隐私 - 切勿分享敏感信息或私人代码仓库的详情
- 考虑时机 - 仅在工作成果足够重要、值得分享时才建议发布
场景示例
场景 1:宣布新功能
bsky post "Just shipped a new feature in my Go library: automatic retry logic with exponential backoff!
Makes handling transient failures much easier. Check it out: https://github.com/user/repo" \
--image feature-screenshot.png \
--image-alt "Code snippet showing the new retry configuration API"
场景 2:分享技术见解
echo "TIL: Go's io.Pipe() is incredibly useful for streaming data between goroutines without buffering.
Perfect for processing large files without loading everything into memory.
Example use case: streaming CSV parsing → transformation → JSON encoding" | bsky post --stdin
场景 3:项目里程碑
bsky post "Just reached 1,000 stars on my open source project!
Thanks to everyone in the community for the support and contributions. This wouldn't be possible without you!" \
--image milestone-screenshot.png \
--image-alt "GitHub repository page showing 1,000 stars"
场景 4:回复反馈
有人分享或评论你的工作时,直接回复:
echo "Thanks for the detailed feedback! I've opened an issue to track this enhancement." \
| bsky post --stdin -r "at://did:plc:xyz/app.bsky.feed.post/abc123"
注意事项
bsky命令会使用你之前登录时的已认证会话- 如果尚未登录,请先运行
bsky login - 可以通过其他
bsky命令(例如bsky timeline)或 Bluesky 网页界面查找帖子 URI - 可以重复使用标志来支持多张图片/多条替代文本
- 图片和视频应为该命令可访问的本地文件路径
评论
支持 Markdown