generate-postman-collection
Installation
SKILL.md
Generate Postman Collection
Automatically generate or update the Postman API collection by analyzing the Rails application routes, controllers, and test specs.
Task Instructions
You are tasked with generating or updating the Postman collection file postman_collection.json based on the current state of the Rails API.
Follow these steps:
If there is no existing Postman collection file postman_collection.json,
skip to Step 2.
- Check for API-related changes first (to avoid unnecessary work):
- Use
git diffto check if there are any changes to API-related files compared to the main branch - Check these paths:
config/routes.rb,app/controllers/api/,spec/requests/api/ - Also check for staged and unstaged changes in the current working directory
- If NO changes are found in any of these locations, output "No API changes detected - skipping Postman collection update"
- If changes ARE found, continue to step 2
- Use