How to build RESTful JSON APIs in a Rails 8 application following OpenAPI standards. Use when creating, modifying, or debugging API endpoints, serializers, authentication, documentation, or any code under the Api:: namespace. Also use when the user mentions "api", "endpoint", "api key", "serializer", "openapi", "swagger", "api documentation", "cors", "rate limit", "pagination cursor", "api versioning", or asks about exposing data to external consumers. Proactively apply these rules whenever touching API controllers, routes, or serializers, even if the user doesn't explicitly ask.
$npx -y skills add mattsears/rails-cto --skill rails-cto-apiInstalls into the current project.
Run `npx skills use "https://github.com/mattsears/rails-cto" --skill "mattsears/rails-cto/rails-cto-api"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/mattsears/rails-cto" that are relevant to the current task. Run `npx skills add "https://github.com/mattsears/rails-cto"` and select the relevant skills, then follow their instructions.