update-chat-lexicons

Sync chat.bsky Lexicon JSON from the chat repo and regenerate derived TypeScript code.

9.6k|915|Updated Dec 17, 2021
One-click install
npx skills add https://github.com/bluesky-social/atproto --skill update-chat-lexicons
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-chat-lexicons
Source: https://github.com/bluesky-social/atproto/tree/main/.agents/skills/update-chat-lexicons
Command: npx skills add https://github.com/bluesky-social/atproto --skill update-chat-lexicons

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeping the mirrored lexicons/chat/ directory in the atproto monorepo in sync with the private bluesky-social/chat repo is error-prone: a plain copy leaves generated clients stale, wrong mtimes make builds skip regeneration, and missing changesets break release conventions. This Skill walks through the full copy-plus-codegen-plus-changeset workflow so nothing is silently left out of date.

Core Features & Use Cases

  • Safe mirroring: Refreshes the sibling ../chat checkout first, then uses rsync -a --delete scoped strictly to lexicons/chat/, never touching app/, com/, or tools/ lexicons.
  • Correct regeneration: Runs pnpm codegen instead of pnpm build so packages/api and packages/ozone regenerate unconditionally despite preserved source mtimes.
  • Release conventions: Adds a .changeset/ file with a patch bump on @atproto/api (or minor for breaking removals), then verifies with package builds, tests, and full root checks.
  • Use Case: A maintainer is asked to "update chat lexicons" after new chat convo or moderation definitions land upstream; the Skill performs the sync, regenerates types, adds the changeset, and validates the result before commit.

Quick Start

Ask the assistant to update the chat lexicons from the chat repo and regenerate the derived code with a changeset.

Frequently Asked Questions about update-chat-lexicons

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update chat lexicons in the atproto repo?

Pull the latest bluesky-social/chat checkout, rsync its lexicons/chat directory into lexicons/chat with --delete, run pnpm codegen from the repo root, add a changeset bumping @atproto/api, then build and test packages/api and packages/ozone.

Why use pnpm codegen instead of pnpm build after syncing lexicons?

packages/api and packages/ozone regenerate only when a lexicon file is newer than their generated index, and rsync -a preserves source mtimes, so a build can skip regeneration. pnpm codegen invokes the generators unconditionally.

What if the ../chat checkout does not exist locally?

The bluesky-social/chat repo is private and not web-fetchable, so clone it with gh repo clone bluesky-social/chat ../chat, or ask the user where their checkout lives and substitute that path in the rsync command.

Why did the lexicon sync delete files unexpectedly?

Unexpected deletions after rsync --delete almost always mean the source checkout is behind upstream, not that definitions were removed. Run git -C ../chat pull --ff-only first and check git status immediately after copying.

Which package should the changeset bump when updating chat lexicons?

Add a patch bump on @atproto/api only, which is the established convention. @atproto/ozone picks up an automatic dependency bump, and you should use minor instead of patch if the sync removes or renames a definition.