CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of 39 AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, orchestration, and workflows. Includes 5 callable workflow skills (rails-tdd-loop, rails-review-flow, rails-setup-flow, rails-quality-flow, rails-engines-flow) for complete development cycles. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation.

95

1.20x
Quality

98%

Does it follow best practices?

Impact

95%

1.20x

Average score across 35 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

SKILL.mdskills/api/api-rest-collection/

name:
api-rest-collection
license:
MIT
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.
metadata:
{"version":"1.0.0"}

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)
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}} 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

Chain to rails-engine-author when the engine exposes HTTP endpoints.

skills

api

api-rest-collection

README.md

tile.json