plugins/postman-testgen/skills/postman-schema/SKILL.md
This skill should be used when generating, validating, or editing Postman Collection v2.1.0 JSON files, when writing Postman test scripts (pre-request or test events), when structuring collection items, folders, variables, or auth configuration, or when the user asks to "create a postman collection", "generate postman tests", "validate collection format", or mentions "postman schema" or "v2.1.0".
npx skillsauth add hicaosen/skills Postman Collection SchemaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provide authoritative structure knowledge for generating valid Postman Collection v2.1.0 JSON.
A valid collection requires two top-level fields: info and item.
{
"info": {
"name": "Collection Name",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [],
"variable": [],
"event": []
}
info.schema must be exactly https://schema.getpostman.com/json/collection/v2.1.0/collection.jsonitem is a recursive array — elements are either items (requests) or item-groups (folders)item array, supporting unlimited depthevent, variable, and auth attach at collection, folder, or item level — inner levels override outer{{variableName}} syntaxEach item must have a name and request:
{
"name": "Request Name",
"request": {
"method": "GET",
"url": { "raw": "{{baseUrl}}/path", "host": ["{{baseUrl}}"], "path": ["path"] },
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": { "mode": "raw", "raw": "{}", "options": { "raw": { "language": "json" } } }
},
"event": [
{ "listen": "prerequest", "script": { "type": "text/javascript", "exec": ["// code"] } },
{ "listen": "test", "script": { "type": "text/javascript", "exec": ["// code"] } }
]
}
Body modes: raw, urlencoded, formdata, file, graphql.
Events carry scripts executed at specific lifecycle points:
prerequest — runs before the HTTP request is senttest — runs after the response is receivedexec is an array of strings (one per line) or a single string. Scripts use Postman's pm object.
Three scopes with inheritance: Collection > Folder > Item.
{ "key": "baseUrl", "value": "http://localhost:8080", "type": "string" }
{ "key": "vtUrl", "value": "http://localhost:10428", "type": "string" }
{ "key": "vlUrl", "value": "http://localhost:9428", "type": "string" }
Types: string, boolean, any, number.
Separate JSON file passed to newman via -e flag:
{
"id": "uuid",
"name": "dev",
"values": [
{ "key": "baseUrl", "value": "http://localhost:8080", "type": "default", "enabled": true },
{ "key": "vtUrl", "value": "http://localhost:10428", "type": "default", "enabled": true },
{ "key": "vlUrl", "value": "http://localhost:9428", "type": "default", "enabled": true }
],
"_postman_variable_scope": "environment"
}
npx -y newman run collection.json -e environment.json --bail
Common flags: -n iterations, -d data file, --folder run specific folder, -r reporters, --suppress-exit-code.
After generating a collection, validate structure by checking:
info.name exists and is non-emptyinfo.schema matches the v2.1.0 URL exactlyname and requestmethod and urlevent objects have listen and script.execFor complete field reference and examples, consult:
references/collection-structure.md — Full schema with all fields, body modes, auth types, environment format, and newman flagsdevelopment
VictoriaTraces HTTP API reference for querying distributed traces via Jaeger-compatible API. This skill should be used when searching traces, listing services/operations, getting trace details by ID, querying service dependencies, constructing HTTP requests to VictoriaTraces, or working with Jaeger API endpoints for distributed tracing analysis.
development
VictoriaMetrics HTTP API reference for querying metrics, exporting/importing data, TSDB stats, and administrative operations. This skill should be used when constructing HTTP requests to VictoriaMetrics, understanding query endpoints (/api/v1/query, /api/v1/query_range, /api/v1/export, /api/v1/import), response formats, checking cardinality, creating snapshots, or integrating with VictoriaMetrics API.
development
VictoriaLogs HTTP API reference for querying logs, hits stats, field discovery, live tailing, and log statistics. This skill should be used when constructing HTTP requests to VictoriaLogs, understanding query endpoints (/select/logsql/query, /select/logsql/tail, /select/logsql/hits, /select/logsql/field_names), response formats, or integrating with VictoriaLogs API for log search and analysis.
testing
PromQL query language fundamentals for Prometheus and Prometheus-compatible systems. Use for understanding PromQL instant/range vectors, label matchers, aggregation operators, offset/@ modifiers, or when targeting non-VictoriaMetrics Prometheus systems. For VictoriaMetrics-specific features like default_rollup, rollup, or outlier detection, use the metricsql skill.