postman-collection-generator

Scan backend codebases to generate Postman Collection v2.1 and environment files.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/BearyDevs/dotfiles --skill postman-collection-generator-bearydevs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postman-collection-generator
Source: https://github.com/BearyDevs/dotfiles/tree/main/.config/opencode/skills/postman-collection-generator
Command: npx skills add https://github.com/BearyDevs/dotfiles --skill postman-collection-generator-bearydevs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This skill automatically converts a backend codebase into a ready-to-import Postman Collection (v2.1) plus a matching environment, eliminating the manual creation of API doc artifacts.

Core Features & Use Cases

  • Discovers every HTTP endpoint across NestJS, Express/Fastify, and FastAPI projects and groups them by controller/module for organized collections.
  • Outputs two files: ./postman/<project>.postman_collection.json and ./postman/<project>.postman_environment.json, with {{baseUrl}} and {{token}} variables to simplify environment switching.
  • Includes framework auto-detection and robust fallbacks, along with optional per-request test scripts and de-duplication to ensure consistent results.

Quick Start

Run the bundled Python script from the project root against your backend to generate the Postman files under postman/.

Frequently Asked Questions about postman-collection-generator

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

FAQPage Schema
How do I auto-generate a Postman collection from an existing API codebase?

To generate a Postman collection, run the bundled Python script from your backend project root to scan code and output ready-to-import Postman v2.1 JSON and matching environment files.

Does Postman collection generation work with NestJS, Express, and FastAPI frameworks?

Yes, Postman collection generation works with NestJS, Express/Fastify, and FastAPI. It auto-detects your backend framework or can be forced using a specific framework flag during execution.

How are authentication tokens and base URLs handled when generating Postman environments?

Generated Postman environments handle authentication tokens and base URLs by using {{baseUrl}} and {{token}} variables, simplifying environment switching for your API endpoints across different stages.

What is the output file structure when converting API code to a Postman collection?

The output file structure consists of two files saved under the postman directory: <project>.postman_collection.json and <project>.postman_environment.json, enabling immediate import into Postman or Insomnia.

Can I de-duplicate API routes and group endpoints by controller automatically?

Yes, the generator automatically de-duplicates routes and groups discovered HTTP endpoints by controller or module, ensuring organized and consistent Postman collections without redundant API requests.