Index of every page on this site: llms.txt
All skills
bluesky-social avatar

/lexification-server

@d9cdc54
by bluesky-socialbluesky-social/atproto9.7k stars
941
Run it yourself

Migrate a service package off the legacy server stack — `lex gen-server` codegen, a committed `src/lexicon/` tree, `server.<ns>.<method>()` route chains, `@atproto/api` inside service code — onto `@atproto/lex` and `@atproto/xrpc-server`. Use when asked to lexify, modernize, or migrate a server package; when a route file imports `Server` or `createServer` from `../lexicon/index.js`; when replacing `ids.*` constants, generated `isX()` guards, `server.xrpc.router`, or `QueryParams`/`OutputSchema` type imports; and when a package still runs `lex gen-server` in its `codegen:lex` script. For the calls a service makes *out* to other services, use lexification-client. For writing new routes on an already-migrated package, use xrpc-server.

  • 4 files
  • 25.4 KB
  • Updated 3 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/bluesky-social/atproto/lexification-server

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesproject-config.md

≈633 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Project configuration

Read this for step 1 of the migration: replacing lex gen-server codegen with lex install and lex build, fixing dependencies, and deleting the legacy generated tree.

packages/pds, packages/bsky and packages/ozone are the "after".

Codegen

Before (note the hand-maintained glob list and the staleness check):

"codegen:lex": "lex gen-server --yes ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/*",
"prebuild": "[ -f ./src/lexicon/index.ts ] && [ -z \"$(find ../../lexicons -newer ./src/lexicon/index.ts -type f -print -quit)\" ] || pnpm run codegen:lex",

After: a committed lexicons.json manifest, the lex:install / lex:build scripts and the .gitignore entries from the lex-setup skill's Wiring a package in this monorepo and Removing legacy @atproto/lex-cli codegen. The glob list becomes the manifest's roots: run pnpm lex:install <nsid>… for the methods and records the package uses, which adds their dependencies too.

Dependencies

Add to dependencies:

  • Each @atproto/lex-* package the migrated code imports from (lex-client, lex-schema, lex-data, lex-json, lex-cbor), and only those
  • @atproto/xrpc-server (already present in every service — verify, don't add blindly)

Add @atproto/lex to devDependencies only, for its lex bin and for tests: production code must not import it (see the lex-setup skill).

Remove:

  • @atproto/lexicon — dependencies
  • @atproto/xrpc — dependencies
  • multiformats — dependencies; CIDs come from @atproto/lex-data
  • @atproto/lex-cli — devDependencies

Keep @atproto/api only where it is genuinely still used. It stays a devDependency of pds (tests) and a runtime dependency of bsky (two source files import getAgeAssuranceRegionConfig and age-assurance helpers from it).

Deleting the legacy tree

rm -rf ./src/lexicon

Safe because it was gitignored and regenerated. Note singular → plural: src/lexicon was the legacy output, src/lexicons is the new one. Check what still imports it before deleting, and expect the package not to compile until step 3 is done.

Do not touch the repo-root lexicons/ directory. It is canonical committed source shared by every package and the interop fixtures.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at d9cdc54. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 weeks ago
disable-model-invocation
false

README badge

README badge for bluesky-social/atproto/lexification-server