Skip to content
Skill

Rails protobuf

Guides building Rails APIs on Protocol Buffers with Connect RPC, protobufable

Rails protobuf is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
31
Last commit
License
MIT
Listing updated

Similar skills

About Rails protobuf

This skill gives an agent the conventions for Rails apps whose .proto files are the schema of record, with requests, responses, errors and structured database columns handled as generated protobuf messages rather than hash literals. It covers the code generation layout and regeneration workflow, Connect RPC controllers routed from service descriptors, and request validation written as buf.validate rules on the proto fields.

It also explains the error model, mapping a protobuf enum of problem types to published URIs and HTTP statuses, and how those map onto Connect error codes. Further guidance covers Input messages for create and update RPCs, Alba resources bound to messages with with_protobuf, plain JSON endpoints that decode a body message, storing messages in jsonb columns, and testing RPCs through a client-like helper with descriptor-walking invariant specs.

The examples draw on the sponsor-app project, and any project-specific conventions in its own docs take priority. The skill expects a Ruby on Rails codebase using the connect_rpc_rails and protobufable gems alongside buf tooling.

When your agent uses it

This skill should be used when building, extending, or reviewing a Rails app whose API schema is Protocol Buffers, served with connect_rpc_rails (Connect RPC as controller actions) and protobufable (protobuf request bodies, responses, columns, errors). Use it when adding an RPC, a `.proto` message, a `buf.validate` rule, a protobuf-bound Alba resource, a message stored in a `jsonb` column, or a problem type in a protobuf enum, even if the user only says "add an endpoint" in such an app. Signs include `ConnectRpcRails::Controller`, `connect_service`, `connect_request`, `protobuf_body`, `message`, `render proto_json:`, `with_protobuf`, `Protobufable::JsonType`, `Protobufable::Problem::Typeable`, `buf.gen.yaml`, `*_pb.rb`, or the user mentioning "Connect", "protobuf", "protovalidate", "buf". Project-specific conventions always take priority.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (17 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the sorah-guides plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add sorah/config
/plugin install sorah-guides@sorah-marketplace

Or copy only this skill to ~/.claude/skills/rails-protobuf:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/rails-protobuf &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/rails-protobuf" ~/.claude/skills/rails-protobuf &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/rails-protobuf inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/rails-protobuf to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/rails-protobuf &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/rails-protobuf" ~/.agents/skills/rails-protobuf &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/rails-protobuf inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/rails-protobuf to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/rails-protobuf &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/rails-protobuf" ~/.cursor/skills/rails-protobuf &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/rails-protobuf inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/sorah/config.git --path claude/marketplace/plugins/sorah-guides/skills/rails-protobuf

Or copy the folder to ~/.gemini/skills/rails-protobuf yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/rails-protobuf:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/rails-protobuf &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/rails-protobuf" ~/.copilot/skills/rails-protobuf &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/rails-protobuf inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/sorah/config.git

Then copy config/claude/marketplace/plugins/sorah-guides/skills/rails-protobuf into your agent's skills folder as rails-protobuf. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Connect RPC controllers
Routes each service's RPCs to thin controller actions that return generated response messages.
Protobuf request validation
Places buf.validate rules on proto fields and wires them to invalid_argument responses.
Problem type error catalogue
Defines RFC 9457 style errors as a protobuf enum with URIs and HTTP statuses.
Alba resources bound to messages
Builds responses from Alba resources that check attributes against the message descriptor.
Messages stored in columns
Keeps structured data in jsonb columns typed by protobuf messages with validation.
Generation and testing workflow
Covers regenerating Ruby and TypeScript code from protos and testing RPCs with helper specs.

Good for

  • Add a new RPC endpoint to a Rails app that uses protobuf schemas
  • Define validation rules for a protobuf message field
  • Create a new problem type for API errors in the protobuf enum
  • Expose a model through a protobuf-bound Alba resource
  • Store a protobuf message in a jsonb column

Rails protobuf FAQ

What does Rails protobuf need to be useful?

It is written for Rails apps whose API schema is Protocol Buffers, using connect_rpc_rails and protobufable, with buf for generation.

Does Rails protobuf change how requests are validated?

It advises writing buf.validate rules on proto fields and registering them at boot, with database-dependent checks kept as model validations.

When does Rails protobuf apply?

It is meant for work such as adding an RPC, a .proto message, a validation rule, an Alba resource or a jsonb-stored message in such an app.

How do I install Rails protobuf in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/rails-protobuf to use it in all your projects, or to .claude/skills/rails-protobuf in one project. Or install the sorah-guides plugin, which includes it: /plugin marketplace add sorah/config, then /plugin install sorah-guides@sorah-marketplace.

Does Rails protobuf run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Rails protobuf?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Rails protobuf?

The closest alternatives to Rails protobuf are Protobuf GRPC API review, Go GRPC, API GraphQL GRPC, Rails problem and API design.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from sorah/config

  1. Guides an agent through maintaining sorah's aptly-managed APT repositories and their

    • Open source
    • 31 GitHub stars
    • Cloud and infrastructure
  2. Runs a chief-of-staff session that watches your coding agents and keeps work on track

    • Open source
    • 31 GitHub stars
    • Developer tools
  3. Applies language-agnostic coding conventions to code writing and review

    • Open source
    • 31 GitHub stars
    • Developer tools
  4. Guides the agent to write git commit messages and PR titles in a concise house style

    • Open source
    • 31 GitHub stars
    • Developer tools
  5. Guides an agent through building and testing Rails apps on Aurora DSQL

    • Open source
    • 31 GitHub stars
    • Developer tools
  6. Writes English text in the author's terse, direct technical voice for GitHub and email

    • Open source
    • 31 GitHub stars
    • Developer tools