Generate a Postman Collection from Your Route Files
Keeping a Postman or Insomnia collection in sync with your actual routes is a chore that almost nobody does consistently. Claude can generate an importable collection directly from your route definitions.
Read routes/api.php and generate a Postman collection v2.1 JSON
file. Group endpoints by resource, include example request bodies
for POST/PUT routes based on the validation rules in the
corresponding FormRequest classes, and add a Bearer token
auth variable.
Claude reads your route file, infers HTTP methods, groups by resource, and cross-references your request validation rules to build realistic example payloads — no hand-crafting required.
The output is a valid .json file you can import straight into Postman:
{
"info": { "name": "My API", "schema": "...postman_collection.json" },
"item": [
{
"name": "Products",
"item": [
{ "name": "List products", "request": { "method": "GET", "url": "{{base_url}}/api/products" } },
{ "name": "Create product", "request": { "method": "POST", "body": { "mode": "raw", "raw": "{\"name\": \"...\", \"price\": 0}" } } }
]
}
]
}
You can also ask Claude to generate an Insomnia export format, or add pre-request scripts for token refresh if your API uses short-lived JWTs.
Your route file is the source of truth — generate your API collection from it, not the other way around.
Log in to leave a comment.
The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.
The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.
Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.