---
name: "postman-collection-v2-generator"
description: "Generate and maintain automated Postman Collections and environment variable suites."
metadata:
  author: "Postman"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "generate postman collection json"
  - "write postman test scripts"
  - "export openapi to postman"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Postman Collection v2.1 Automated Exporter

Builds Postman Collection v2.1 JSON specifications: nested request folders, pre-request authentication scripts, test assertion scripts, and dynamic environment variables.

## When to Invoke
Invoke this skill whenever you need to:
- generate postman collection json
- write postman test scripts
- export openapi to postman

## Execution SOP & Rules
1. Structure collection JSON conforming strictly to schema https://schema.getpostman.com/json/collection/v2.1.0/.
2. Group endpoints logically into descriptive folders (Auth, Users, Billing).
3. Use environment variables ({{baseUrl}}, {{jwtToken}}) to decouple configs across environments.
4. Validate collections using Postman Newman CLI runner in CI test pipelines.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
