---
name: bluesky-75e7aa8db0c3
description: Read from and post to Bluesky social network using the AT Protocol. Use this skill when the user wants to interact with Bluesky including posting text/images/links, replying to posts, reading their timeline, searching posts, viewing profiles, following/unfollowing users, checking notifications, or viewing reply threads. All scripts use PEP 723 inline metadata for dependencies and run via `uv run`. Requires BLUESKY_HANDLE and BLUESKY_PASSWORD environment variables.
---

# Skill Overview

This skill provides access to the Bluesky social network via a set of Python scripts.

## Identify Yourself in Each Post

When posting to BlueSky, always start the post with a brief statement saying who you are and that you are using the user's BlueSky account.  Something short like: `This is [AI name] posting using [user name]'s account.` is good, but feel free to vary it.  Replace `[AI name]` with your name and `[user name]` with the user's BlueSky full name or first name for brevity.

## Prerequisites

**Tool Dependency**:
- `uv` - The scripts in this skill require the [uv](https://docs.astral.sh/uv/) package manager/runner. Most cloud-based AI agents have `uv` pre-installed (or they can install it). Local agents should install it via `curl -LsSf https://astral.sh/uv/install.sh | sh` or see the [uv installation docs](https://docs.astral.sh/uv/getting-started/installation/).

**Environment Variables** (must be set before running any script):
- `BLUESKY_HANDLE` - The user's Bluesky handle (e.g., `username.bsky.social`)
- `BLUESKY_PASSWORD` - The user's Bluesky password

**Important**: The user should configure a BlueSky App Password (create in Settings > App Passwords) instead of using their main account password. App Passwords can be revoked individually if compromised.

## Network Access

**Important**: The scripts in this skill require network access to the following domains:

- `bsky.social`
- `bsky.network`
- `*.bsky.network`
- `public.api.bsky.app`

If you (the AI agent) have network restrictions, the user may need to whitelist the above domains in the agent's settings for this skill to function. This is known to be necessary with Claude, and may be necessary with others.

## Available Scripts

All scripts include PEP 723 inline metadata declaring their dependencies. Just run with `uv run` — no manual dependency installation or `--with` flags needed.

### Post to Bluesky (`scripts/post.py`)

Create posts with text, images, or link cards.

```bash
# Simple text post
uv run scripts/post.py --text "Hello, Bluesky!"

# Post with image
uv run scripts/post.py --text "Check this out" --image photo.jpg

# Post with multiple images (up to 4)
uv run scripts/post.py --text "Photos" --image a.jpg --image b.jpg

# Post with image and alt text
uv run scripts/post.py --text "My cat" --image cat.jpg --alt "Orange cat sleeping"

# Post with link card
uv run scripts/post.py --text "Read this" \
    --link-url "https://example.com" \
    --link-title "Article Title" \
    --link-description "Description text"
```

### View Replies (`scripts/replies.py`)

Fetch and display the reply thread for a specific post.

```bash
# View replies using a web URL (most common)
uv run scripts/replies.py https://bsky.app/profile/someone.bsky.social/post/abc123

# View replies using an AT Protocol URI
uv run scripts/replies.py "at://did:plc:xxx/app.bsky.feed.post/abc123"

# Limit reply depth (e.g., only direct replies)
uv run scripts/replies.py --depth 1 https://bsky.app/profile/someone/post/abc123

# Output as JSON for processing
uv run scripts/replies.py --json https://bsky.app/profile/someone/post/abc123

# Skip parent posts, show only target post and its replies
uv run scripts/replies.py --no-parents https://bsky.app/profile/someone/post/abc123
```

**Arguments:**

| Argument | Description |
|----------|-------------|
| `post` | Post identifier: either a `bsky.app` URL or an AT Protocol URI (required) |
| `--depth`, `-d` | Maximum depth of replies to fetch (default: no limit) |
| `--json`, `-j` | Output as JSON instead of human-readable format |
| `--no-parents` | Don't show parent posts (only target post and replies) |

### Post a Reply (`scripts/reply.py`)

Reply to an existing Bluesky post. The script automatically handles AT Protocol threading (root and parent references).

```bash
# Reply to a post using its web URL
uv run scripts/reply.py --to https://bsky.app/profile/someone.bsky.social/post/abc123 \
    --text "Great post!"

# Reply using an AT Protocol URI
uv run scripts/reply.py --to "at://did:plc:xxx/app.bsky.feed.post/abc123" \
    --text "I agree with this!"

# Short form arguments
uv run scripts/reply.py -p https://bsky.app/profile/someone/post/abc123 -t "Thanks!"
```

**Arguments:**

| Argument | Description |
|----------|-------------|
| `--to`, `-p` | Post to reply to: either a `bsky.app` URL or an AT Protocol URI (required) |
| `--text`, `-t` | The reply text content, max 300 characters (required) |

**How it works:** The script fetches the target post's thread to determine:
1. The **parent** (the post you're replying to)
2. The **root** (the original post that started the thread)

Both references are required by AT Protocol to maintain proper thread structure.

### Read Timeline (`scripts/read_timeline.py`)

View posts from accounts the user follows.

```bash
# Default (25 posts)
uv run scripts/read_timeline.py

# More posts
uv run scripts/read_timeline.py --limit 50

# JSON output
uv run scripts/read_timeline.py --json

# Paginate
uv run scripts/read_timeline.py --cursor "cursor_string"
```

### Search Posts (`scripts/search.py`)

Find posts by keywords or hashtags.

```bash
# Keyword search
uv run scripts/search.py "python programming"

# Hashtag search
uv run scripts/search.py "#machinelearning"

# More results with auto-pagination
uv run scripts/search.py "topic" --limit 100 --all

# JSON output
uv run scripts/search.py "query" --json
```

### View Profiles (`scripts/profile.py`)

View profile information for any user.

```bash
# The user's profile
uv run scripts/profile.py

# Another user
uv run scripts/profile.py someone.bsky.social

# JSON output
uv run scripts/profile.py --json
```

### Follow/Unfollow (`scripts/follow.py`)

Manage the user's social connections.

```bash
# Follow a user
uv run scripts/follow.py someone.bsky.social

# Unfollow a user
uv run scripts/follow.py --unfollow someone.bsky.social

# List who the user follows
uv run scripts/follow.py --list

# List the user's followers
uv run scripts/follow.py --list --followers

# List another user's follows
uv run scripts/follow.py --list someone.bsky.social
```

### Notifications (`scripts/notifications.py`)

View and manage the user's notifications.

```bash
# View notifications
uv run scripts/notifications.py

# More notifications
uv run scripts/notifications.py --limit 50

# Just show unread count
uv run scripts/notifications.py --count

# Mark all as read
uv run scripts/notifications.py --mark-read

# JSON output
uv run scripts/notifications.py --json
```

## Common Patterns

### Setting Credentials

```bash
# Set for current session
export BLUESKY_HANDLE="username.bsky.social"
export BLUESKY_PASSWORD="app-password"

# Or inline with command
BLUESKY_HANDLE="username.bsky.social" BLUESKY_PASSWORD="pass" uv run scripts/post.py --text "Hello"
```

### JSON Output for Processing

All scripts support `--json` for machine-readable output:

```bash
# Get timeline as JSON and extract first post
uv run scripts/read_timeline.py --json | jq '.posts[0]'

# Search and count results
uv run scripts/search.py "topic" --json | jq '.count'
```

### Pagination

Scripts that return lists support cursor-based pagination. Use this to scroll through the user's
timeline and other sequences of posts:

```bash
# First page
uv run scripts/read_timeline.py --json > page1.json

# Get cursor from response, then fetch next page
CURSOR=$(jq -r '.cursor' page1.json)
uv run scripts/read_timeline.py --cursor "$CURSOR" --json > page2.json
```

## Key Concepts

- **Handle**: The user's username (e.g., `user.bsky.social`)
- **DID**: Decentralized Identifier—permanent unique ID (handles can change, DIDs don't)
- **URI**: Resource identifier for posts/records (format: `at://did/collection/rkey`)
- **CID**: Content hash identifier for specific versions of records
- **App Password**: Revocable credential for API access (recommended over main password)

## Error Handling

Scripts exit with non-zero status on errors. Common issues:
- Missing credentials: Set `BLUESKY_HANDLE` and `BLUESKY_PASSWORD`
- Invalid handle: Verify the handle exists on Bluesky
- Rate limits: The API has rate limits; space out bulk operations
- Image format: Only JPEG, PNG, and WebP are supported
- Network blocked: Ensure required domains are whitelisted (see [Network Access](#network-access))


---
Source attribution: David-Li0406
Original project: https://github.com/David-Li0406/meta-skill-evloving/blob/ca3a335628981df10c36e00cb9850df2c247ab9a/skill-flow/data/skills-refined-36k/skillsmp/bluesky/SKILL.md
License: Apache-2.0
License information: https://www.apache.org/licenses/LICENSE-2.0
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.



# Mega AI Hub resource metadata

Creator / publisher: David-Li0406
Original project: https://github.com/David-Li0406/meta-skill-evloving/blob/ca3a335628981df10c36e00cb9850df2c247ab9a/skill-flow/data/skills-refined-36k/skillsmp/bluesky/SKILL.md
Attribution basis: Source repository record

Fields of work: Marketing
Roles: Content Marketer, Influencer Marketer, Social Media Manager
Specialties: Specialty not specified
Tools: Uv
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 039fdaf3aaa2888a40a901ff628836c7a2d92cdeb98ff37da2913ef15a56dea7
