Skip to content

thoughtbot/generate-postman-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Generate Postman Collection

A Claude Code skill that automatically generates or updates Postman API collections by analyzing Rails application routes, controllers, and test specs.

Quick links

Table of contents

Overview

This skill analyzes your Rails API and generates a complete Postman collection including:

  • All API endpoints from config/routes.rb
  • Request parameters and body structures from controllers
  • Example requests and responses from RSpec tests
  • Authentication requirements and headers
  • Auto-generated test scripts for token management

Installation

Copy the skill directory to your Claude Code skills folder:

cp -r generate-postman-collection ~/.claude/skills/

Or clone directly:

git clone https://github.com/thoughtbot/generate-postman-collection ~/.claude/skills/generate-postman-collection

Usage

After installing, restart Claude Code for the skill to be detected. You can verify the skill is available by running:

/skills

Invoke the skill using the slash command:

/generate-api-postman-collection

The skill will automatically check for API-related changes before running to avoid unnecessary work.

What it does

  1. Checks for changes - Compares against main branch to detect API changes
  2. Reads routes - Parses config/routes.rb to identify all API endpoints
  3. Analyzes controllers - Inspects app/controllers/api/ for request/response details
  4. Reviews specs - Extracts examples from spec/requests/api/ test files
  5. Generates collection - Creates or updates postman_collection.json

The generated collection includes:

  • Endpoints organized in logical folders
  • Request body examples in JSON format
  • Query parameters and headers
  • Authentication configuration with {{base_url}} and {{api_token}} variables
  • Test scripts that auto-save tokens after login

Contributing

Contributions are welcome! If you'd like to improve the collection generation or add new features:

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

This skill is open source and available under the MIT License.

About thoughtbot

thoughtbot

This skill is maintained by thoughtbot.

The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software! See thoughtbot's other projects.

About

This repo contains a Claude Skill that you can add to your Rails project to generate a postman collection from your codebase.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors