xrpc-server
Skill by bluesky-social
Guides an assistant in building or editing XRPC routes on AT Protocol services that use @atproto/xrpc-server. It is for developers working in packages such as pds, bsky and ozone.
Install xrpc-server
Built from the published package, never by AI.
git clone --depth 1 https://github.com/bluesky-social/atproto /tmp/atproto && mkdir -p ~/.claude/skills && cp -r /tmp/atproto/.agents/skills/xrpc-server ~/.claude/skills/xrpc-serverRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/bluesky-social/atproto /tmp/atproto && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/atproto/.agents/skills/xrpc-server ~/.gemini/antigravity-cli/skills/xrpc-serverAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill covers the server side of the AT Protocol XRPC stack, using the @atproto/xrpc-server package. It explains how to create a server, wire it into Express, and register endpoints by passing generated lexicon schemas to server.add(). It also covers reading params, input and auth in handlers, returning JSON, binary, streamed or empty responses, and throwing XRPC error classes.
The skill also documents per-route rate limits, body limits, schema accessors such as $lxm and $type, and WebSocket subscriptions built with async generators. It names the reference files in packages/pds, packages/bsky and packages/ozone. It is aimed at developers maintaining AT Protocol services. It points to other skills for legacy server migration and for outbound client calls.
Written from the project's SKILL.md and checked against it.
What it can do
- Create a serverShows how to call createServer and mount server.router on an Express app.
- Register routesExplains server.add() with a bare handler or an object form that sets auth, rateLimit and opts.
- Read request dataDescribes the handler context with params, input, auth, req and res.
- Return responsesCovers JSON, binary, streamed, buffered and empty responses, plus custom headers.
- Throw XRPC errorsLists XRPCError subclasses and their HTTP status codes, such as InvalidRequestError (400).
- Apply rate and body limitsExplains per-route rate limit entries and jsonLimit, textLimit and blobLimit overrides.
- Expose subscriptionsShows how to register a WebSocket subscription with an async generator and abort signal.
- Use schema accessorsExplains $lxm, $type, $token and $build for working with generated lexicon objects.
What you need
- An AT Protocol service that uses @atproto/xrpc-server
- Express
Try asking
- Add a new XRPC query endpoint to the bsky service with auth
- Set a custom response header in a PDS handler that returns a blob
- Expose a WebSocket subscription for a new lexicon event
Good to know
- Method handlers have no signal. Only subscription handlers receive one.
- @atproto/xrpc-server is not re-exported by @atproto/lex, so it must be imported directly.
- Legacy generated servers use server.xrpc.router. This skill does not cover that migration.
- Responses are validated against the schema unless validateResponse is set to false.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/xrpc-server/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to xrpc-server
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
xrpc-server: common questions
Which package do I import the server from?
The source says to import InvalidRequestError and the Server type directly from @atproto/xrpc-server. It is not re-exported by @atproto/lex.
What is the difference between XRPCError and XrpcError?
XRPCError is the server-side class thrown in handlers. XrpcError is the client-side class from @atproto/lex-client.
Which skill should I use to migrate a legacy service?
The source says to use the lexification-server skill to migrate a service off the legacy generated server stack.
How do I install xrpc-server?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is xrpc-server free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is xrpc-server safe to use?
It scores 78 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to xrpc-server?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
