/quality-skills:postman-newmanfrom quality-skills
Designs, organizes, and runs Postman collections locally or in CI via Newman. Helps structure collections, write test scripts, and avoid anti-patterns.
Ships in quality-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in Postman collections and Newman (the Postman CLI runner). Your goal is to help engineers structure collections that are useful in both Postman's UI and CI, write test scripts that catch real bugs, and avoid the common Postman anti-patterns (huge unmaintained collections, untested chains, hardcoded environments). Do not fabricate pm API methods, CLI flags, or collection schema fields. When uncertain, point the reader to learning.postman.com.
Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:
If the file does not exist, ask: solo or team usage, whether collections will run in CI via Newman, languages the team is fluent in, and whether Postman Cloud sync is allowed.
| Use Postman + Newman when… | Use a language-native client when… |
|---|---|
| QA owns the suite and prefers a GUI | Engineers own the suite and write code daily |
| You want fast exploratory + saved collection flow | You want refactoring, types, and IDE support |
| Auth flows are complex and you want UI assistance | You need test fixtures, parametrization, parallelism |
| Test data and chains live well in collections | Test data lives well in code/fixtures/factories |
| You're sharing collections with non-engineers (PMs, support) | Tests are tightly coupled to the application code |
Don't be religious about either — many teams keep Postman for exploration and run regression via supertest/pytest/rest-assured.
A Postman collection is a JSON file (Collection v2.1 schema is current). Recommended structure:
My API
├── 00 — Auth (folder)
│ ├── POST /auth/login
│ └── POST /auth/refresh
├── Users (folder)
│ ├── GET /users/:id
│ ├── POST /users
│ ├── PATCH /users/:id
│ └── DELETE /users/:id
├── Orders (folder)
│ └── ...
└── Smoke (folder, mirrors a CI subset)
Conventions that scale:
00 — Auth, 01 — Setup).| Scope | When to use |
|---|---|
| Global | Don't. Globals leak across collections and confuse readers. |
| Collection | Defaults that apply to every request in the collection (e.g., baseUrl placeholder, content-type). |
| Environment | Per-target values: baseUrl, secrets, IDs that differ between staging and prod. |
| Folder | Resource-specific (e.g., a precomputed user ID for the Users folder). |
| Local / data | Inside a script (pm.variables.set('foo', 'bar')) — request-scoped. |
| Data file (Newman / Runner) | CSV / JSON of test rows for iteration. |
Reference syntax: {{baseUrl}}/users/{{userId}}. Secrets should be stored as environment variables of type secret and never committed.
Postman exposes a sandboxed JS API. The most-used surface:
// Pre-request script — runs before sending the request
pm.environment.set('correlationId', 'req-' + Date.now());
// Test script — runs after the response is received
pm.test('status is 200', () => {
pm.response.to.have.status(200);
});
pm.test('payload schema', () => {
const body = pm.response.json();
pm.expect(body).to.have.property('id');
pm.expect(body.email).to.be.a('string');
});
// Chain a value into a later request
const token = pm.response.json().token;
pm.environment.set('authToken', token);
Keep scripts short. If a script grows beyond ~30 lines, either move logic into a helper request that runs earlier in the folder, or accept that this flow probably belongs in code rather than a collection.
Newman is the Node-based CLI for collections.
npx newman run collection.json \
-e staging.env.json \
--iteration-data users.csv \
--reporters cli,junit,htmlextra \
--reporter-junit-export results.xml \
--reporter-htmlextra-export results.html
Common flags (verify against your installed version with newman run --help):
| Flag | Purpose |
|---|---|
-e <file> / --environment | Environment file. |
-d <file> / --iteration-data | Data file for data-driven runs. |
-n <count> / --iteration-count | Number of iterations. |
--folder <name> | Run only one folder. |
--reporters cli,junit | Multiple reporters. |
--bail | Stop on first failure. |
--timeout-request <ms> | Per-request timeout. |
--insecure | Skip TLS verification — use sparingly. |
The newman-reporter-htmlextra reporter produces a much richer HTML report than the built-in HTML reporter.
# GitHub Actions example
- run: npm install -g newman newman-reporter-htmlextra
- run: |
newman run collection.json \
-e ${{ github.workspace }}/postman/staging.env.json \
--reporters cli,junit,htmlextra \
--reporter-junit-export newman-results.xml \
--reporter-htmlextra-export newman-report.html
- if: always()
uses: actions/upload-artifact@v4
with:
name: newman-report
path: |
newman-results.xml
newman-report.html
Secrets go in CI secret stores, not in committed env files. Use --env-var "key=value" overrides at runtime for sensitive values.
Collections are JSON. Diff them in Git like any other file. This means:
File → Export → Collection v2.1) and commit it.For teams that struggle to keep collections in sync, the postman-collection-transformer and CLI export workflows help.
pm.test(...) blocks isn't a test suite; it's a saved request log.{{baseUrl}}/...; every ID should come from a variable or a previous request.--env-var at runtime.When helping with Postman, ask:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aks-builds/quality-skills --plugin quality-skills56 skills in this plugin
/accessibility-testingWhen the user wants to design, implement, or operate accessibility (a11y) testing — automated scans, manual audits, screen-reader testing, WCAG conformance, Section 508 / EAA compliance. Use when the user mentions "accessibility," "a11y," "WCAG," "Section 508," "EAA," "ADA compliance," "axe," "axe-core," "pa11y," "Lighthouse," "aXe DevTools," "screen reader," "NVDA," "JAWS," "VoiceOver," "TalkBack," "WAVE," or "AT testing." For visual diff see visual-regression. For overall test strategy see test-strategy./ai-augmented-testingWhen the user wants to evaluate, adopt, or operate AI-augmented testing tools and approaches — autonomous test generation, self-healing locators, AI-assisted authoring, vision-based testing, agentic test runners. Use when the user mentions "AI testing," "AI-augmented testing," "Testim," "Mabl," "Functionize," "Reflect," "TestRigor," "Tricentis Copilot," "Cypress AI," "Playwright codegen with AI," "AI test generation," "self-healing tests," or "vision-based test automation." For LLM-product evals see llm-eval-testing. For overall strategy see test-strategy./appiumWhen the user wants to design, implement, debug, or scale Appium tests for iOS and Android mobile automation. Use when the user mentions "Appium," "Appium 2," "UiAutomator2," "XCUITest driver," "appium:capabilities," "AppiumServer," "accessibility id," "TouchAction," "W3C Actions," "Appium inspector," "real device cloud," or "App Center / BrowserStack / Sauce mobile." For Android-native frameworks see espresso. For iOS-native see xcuitest. For React Native specifically see detox. For YAML-driven mobile flows see maestro. For desktop web automation see selenium / playwright / webdriverio.