Generate Postman Collection

Generate Postman v2.1 collections from Rails routes, controllers, and request specs.

8|1|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/thoughtbot/generate-postman-collection --skill generate-postman-collection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Generate Postman Collection
Source: https://github.com/thoughtbot/generate-postman-collection/tree/main
Command: npx skills add https://github.com/thoughtbot/generate-postman-collection --skill generate-postman-collection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeping a Postman collection up to date for a changing Rails API is time-consuming and error-prone, especially when endpoints, params, and auth requirements evolve.

Core Features & Use Cases

  • Route-to-collection generation: Builds Postman requests for every Rails endpoint found in config/routes.rb.
  • Controller-aware request/response modeling: Extracts parameters, request/response shapes, status codes, and authentication requirements from app/controllers/api/.
  • Spec-driven examples: Uses RSpec request specs from spec/requests/api/v1/ to populate example request bodies and responses.
  • Auth-ready workflows: Includes {{base_url}} and {{api_token}} variables and generates login-related test scripts that auto-save tokens.

Quick Start

Run the slash command /generate-api-postman-collection after installing the skill and restarting Claude Code so it can generate or update postman_collection.json from your Rails API and specs.

Frequently Asked Questions about Generate Postman Collection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate a Postman collection from a Rails API?

You can auto-generate a Postman collection from a Rails API by translating routes, controllers, and RSpec request specs into a valid Postman v2.1 postman_collection.json file with complete requests and example responses.

How do I keep my Postman collection updated when my Rails API changes?

You can keep your Postman collection updated by checking git diffs for config/routes.rb, app/controllers/api/, and spec/requests/api/; the generation process skips updates entirely when no API-related changes are detected.

Can I generate Postman test scripts for API authentication from Rails?

Yes, you can generate Postman test scripts for API authentication from Rails. The output postman_collection.json includes login-related test scripts that auto-save tokens into Postman's {{api_token}} variables for authenticated API workflows.

Does Postman collection generation work with RSpec request specs?

Postman collection generation works with RSpec request specs by extracting data from spec/requests/api/ to populate example request bodies and response shapes, ensuring the generated Postman requests reflect your actual Rails API behavior.

What's the best way to document Rails API endpoints in Postman automatically?

The best way to document Rails API endpoints in Postman automatically is by translating routes and controller parameters into Postman requests, using RSpec specs to model responses, and preserving existing collection names and variables during updates.

Why does my Postman collection skip updates sometimes?

Your Postman collection generation skips updates when the git diff detects no changes in config/routes.rb, app/controllers/api/, or spec/requests/api/, optimizing the workflow by avoiding unnecessary postman_collection.json rewrites.