Skip to content
Skill

Rails problem

Guides a Rails API to answer errors as RFC 9457 problem details via the problem gem

Rails problem 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 problem

This skill sets out conventions for handling errors in a Rails API that responds with RFC 9457 problem documents using the problem gem. Each error is modelled as a class whose type, status and title are declared once, while only the detail and machine-readable extension members vary per occurrence. It covers where errors should be raised, how a base controller renders them with Problem::Rescuable, and how hooks handle reporting and request-derived members.

The guide also covers configuring the type prefix and an exceptions app so that routing and middleware failures produce the same response shape, plus localized titles keyed by problem type. It describes an optional path where error types come from a protobuf enum via protobufable, and points to related skills for that setup.

It expects a Ruby on Rails API and the problem gem, and gives examples for request spec assertions on status, content type and type identifiers.

When your agent uses it

This skill should be used when designing, writing, or reviewing error handling in a Rails API that answers RFC 9457 / RFC 7807 problem details through the `problem` gem, or when adding an error class, a `rescue_from`, an exceptions app, or an error response shape to a Rails API. Signs include `Problem::Detailable`, `Problem::Rescuable`, `Problem::I18nable`, `Problem::ExceptionsApp`, `config.problem.type_prefix`, `application/problem+json`, an `Errors::ApiError` base class, or the user mentioning "problem details", "problem+json", "error catalogue", or "error response format". Provides the error class layout, rescuing, exceptions app, i18n titles, reporting, and machine-readable detail. 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 1 file (12 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-problem:

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

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

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/rails-problem 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-problem &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/rails-problem" ~/.agents/skills/rails-problem &&
rm -rf "$tmp"

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

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/rails-problem 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-problem &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/rails-problem" ~/.cursor/skills/rails-problem &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/rails-problem 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-problem

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

Gemini CLI docs on skills

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

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

For one project only, put the folder in .github/skills/rails-problem 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-problem into your agent's skills folder as rails-problem. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Error class layout
Shows how to model each error as a subclass that declares its type, status and title once.
Controller rendering
Explains rescuing every detailable error in a base controller and the hooks available for reporting and rendering.
Exceptions app setup
Covers configuring a type prefix and an exceptions app so escaped errors also return problem documents.
Localized titles
Describes keying problem titles by type in locale files and rendering them in the request locale.
Machine-readable extensions
Shows adding extension members for field errors and retry hints without parsing detail text.
Testing guidance
Recommends asserting status, problem content type and type identifiers in request specs.

Good for

  • Add a new domain error class for a failed order cancellation
  • Set up a Rails API to return application/problem+json for all errors
  • Localize problem titles for a multilingual API
  • Return field-level validation errors in a problem response
  • Review an API controller for error handling that bypasses the problem format

Rails problem FAQ

What does Rails problem need to work?

It is written for a Rails API that uses the problem gem, and it can optionally use protobufable for types taken from a protobuf enum.

Does Rails problem change how errors are raised?

It recommends raising domain-specific problem classes directly from the code that detects a failure, rather than rescuing and re-raising generic status errors in controllers.

Which parts of the response format does Rails problem define?

It defines the type, status, title and detail members, and extension members for machine-readable data, and it keeps type identifiers stable across environments.

Does Rails problem cover reporting errors?

Yes, it describes hooks for deciding which problems are reportable and where reports go, with an example that sends them to Sentry.

How do I install Rails problem in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/rails-problem to use it in all your projects, or to .claude/skills/rails-problem 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 problem 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 problem?

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 problem?

The closest alternatives to Rails problem are Rails protobuf, API design, Rails, API design 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