A Claude Code skill that automatically generates or updates Postman API collections by analyzing Rails application routes, controllers, and test specs.
- Postman Collection Format - Postman Collection v2.1 specification
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
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-collectionAfter 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.
- Checks for changes - Compares against main branch to detect API changes
- Reads routes - Parses
config/routes.rbto identify all API endpoints - Analyzes controllers - Inspects
app/controllers/api/for request/response details - Reviews specs - Extracts examples from
spec/requests/api/test files - 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
Contributions are welcome! If you'd like to improve the collection generation or add new features:
- Fork the repository
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
This skill is open source and available under the MIT License.
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.