CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of AI agent skills for Ruby on Rails development. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and workflow automation.

98

1.38x
Quality

99%

Does it follow best practices?

Impact

98%

1.38x

Average score across 26 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

SKILL.mdapi-rest-collection/

name:
api-rest-collection
description:
Use when creating or modifying REST API endpoints (Rails controllers, engine routes, API actions). Requires generating or updating an API Collection file (e.g., Postman Collection v2.1) so the new or changed endpoints can be tested. Trigger words: endpoint, API route, controller action, API collection, request collection.

REST API Collection

Core principle: Every API surface (Rails app or engine) has a single API collection file that stays in sync with its endpoints.

Quick Reference

AspectRule
WhenCreate or update collection when creating or modifying any REST API endpoint (route + controller action)
FormatPostman Collection JSON v2.1 (schema or info.schema references v2.1) is a good default standard
LocationOne file per app or engine — docs/api-collections/<app-or-engine-name>.json or spec/fixtures/api-collections/; if a collection folder already exists, update the existing file
LanguageAll request names, descriptions, and variable names must be in English
VariablesUse {{base_url}} (or equivalent) for the base URL so the collection works across environments
Per requestmethod, URL (with variables for base URL), headers (Content-Type, Authorization if needed), body example when applicable
ValidationSee validation steps in the HARD-GATE section below

HARD-GATE: Generate on Endpoint Change

When you create or modify a REST API endpoint (new or changed route and controller action),
you MUST also create or update the corresponding API collection file so the
flow can be tested. Do not leave the collection missing or outdated.

EXCEPTION: GraphQL endpoints — use rails-graphql-best-practices instead.

After generating or updating the collection, validate the output:

  • Confirm the JSON is syntactically valid.
  • Verify the collection can be imported into a compatible API client (e.g. Postman) without errors.
  • Confirm all new or changed endpoints are represented and that {{base_url}} (or equivalent) is used consistently.

Collection Structure

Minimum per request — method, url with {{base_url}}, headers, body for POST/PUT:

{
  "name": "Create order",
  "request": {
    "method": "POST",
    "header": [{ "key": "Content-Type", "value": "application/json" }],
    "url": "{{base_url}}/orders",
    "body": { "mode": "raw", "raw": "{\"product_id\": 1}" }
  }
}

See EXAMPLES.md for a multi-endpoint collection with auth token variables.

Common Mistakes

MistakeReality
Missing Content-Type or body for POST/PUTInclude headers and example body so the request works out of the box
Skipping validation after generationAlways verify the JSON is well-formed and imports correctly before committing (see HARD-GATE)

Integration

SkillWhen to chain
rails-engine-authorWhen the engine exposes HTTP endpoints
rails-engine-docsWhen documenting engine API or how to test endpoints
rails-code-reviewWhen reviewing API changes (ensure collection was updated)
rails-engine-testingWhen adding request/routing specs (collection can mirror those flows)

api-rest-collection

EXAMPLES.md

SKILL.md

README.md

tile.json