@postman/postman-plugin 0.2.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +58 -10
  2. package/dist/hosts/antigravity.js +47 -0
  3. package/dist/hosts/copilot.js +60 -0
  4. package/dist/hosts/index.js +3 -1
  5. package/dist/hosts/opencode-config.js +147 -0
  6. package/dist/hosts/opencode.js +315 -34
  7. package/dist/hosts/shared.js +10 -3
  8. package/dist/source.js +19 -5
  9. package/dist/system.js +20 -1
  10. package/hooks/session-start-context.md +1 -1
  11. package/mcp.pi.json +2 -2
  12. package/package.json +1 -1
  13. package/skills/ai-readiness/SKILL.md +40 -44
  14. package/skills/api-discovery/SKILL.md +64 -129
  15. package/skills/api-discovery/reference/orbit.md +17 -5
  16. package/skills/api-documentation/SKILL.md +38 -25
  17. package/skills/api-engineer/SKILL.md +78 -23
  18. package/skills/api-mocking/SKILL.md +117 -135
  19. package/skills/api-monitoring/SKILL.md +52 -129
  20. package/skills/api-simulation/SKILL.md +138 -0
  21. package/skills/api-simulation/reference/sim_yaml_schema.md +50 -0
  22. package/skills/api-testing/SKILL.md +48 -95
  23. package/skills/bootstrap/SKILL.md +123 -210
  24. package/skills/bootstrap/reference/cli_installation.md +4 -3
  25. package/skills/ci-integration/SKILL.md +53 -112
  26. package/skills/collection-schema-v3/SKILL.md +43 -204
  27. package/skills/collection-schema-v3/reference/http.md +150 -0
  28. package/skills/datasets/SKILL.md +89 -314
  29. package/skills/datasets/reference/spreadsheets.md +25 -0
  30. package/skills/flows/SKILL.md +57 -206
  31. package/skills/flows/reference/flow_cli_flags.md +3 -2
  32. package/skills/performance-testing/SKILL.md +46 -62
  33. package/skills/performance-testing/references/jmeter-import/README.md +113 -0
  34. package/skills/performance-testing/references/jmeter-import/import-report.md +52 -0
  35. package/skills/performance-testing/references/jmeter-import/mapping-table.md +97 -0
  36. package/skills/performance-testing/references/jmeter-import/postman-perf-capabilities.md +56 -0
  37. package/skills/performance-testing/references/jmeter-import/script-translation.md +98 -0
  38. package/skills/performance-testing/references/jmeter-import/scripts/groovy_to_js.py +83 -0
  39. package/skills/performance-testing/references/jmeter-import/scripts/jmx_to_postman.py +1433 -0
  40. package/skills/postman-mcp-server/SKILL.md +53 -59
  41. package/skills/postman-mcp-server/references/docs.md +0 -1
  42. package/skills/postman-mcp-server/references/learn.md +10 -9
  43. package/skills/postman-mcp-server/references/mock.md +0 -1
  44. package/skills/postman-mcp-server/references/search.md +0 -1
  45. package/skills/postman-mcp-server/references/security.md +0 -1
  46. package/skills/postman-mcp-server/references/setup.md +0 -1
  47. package/skills/postman-mcp-server/references/sync.md +0 -1
  48. package/skills/postman-mcp-server/references/test.md +0 -1
  49. package/skills/variables/SKILL.md +63 -0
  50. package/skills/webhook-testing/SKILL.md +103 -0
  51. package/skills/webhook-testing/reference/forwarding.md +10 -0
  52. package/skills/webhook-testing/reference/outbound_webhooks.md +25 -0
  53. package/skills/webhook-testing/reference/webhook_scripts.md +163 -0
@@ -1,50 +1,46 @@
1
1
  ---
2
2
  name: ai-readiness
3
- description: Scores a Postman collection or an OpenAPI spec for how well an AI agent can discover, understand, call, and recover from errors with it — missing examples, undocumented errors, and ambiguous parameters all cost points. Use when the user asks "is my API agent-ready," "can AI agents use my API," "how agent-friendly is my API," or wants to scan, score, or improve a collection or spec for AI/agent consumption. Covers `postman collection ai-readiness` and `postman spec ai-readiness`.
3
+ description: Use when assessing or improving how well AI agents can discover, call, and recover from errors with an API. Scores an existing Postman collection or OpenAPI spec and turns measured gaps into contract improvements; supports a separate CI readiness threshold. Use for requests such as "is this API ready for agents".
4
4
  ---
5
5
 
6
6
  # AI Readiness
7
7
 
8
- ## Overview
9
-
10
- An "agent-ready" API is one that an AI agent can discover, understand, call correctly, and recover from errors without human intervention. Most APIs aren't there yet.
11
-
12
- Two ways to run this check, same rubric family, different target — pick by what exists:
13
-
14
- - `collection ai-readiness <collectionId/path>` scores a Postman collection
15
- — by cloud ID, local file path, or a `postman/collections/<name>`
16
- local-mode directory.
17
- - `spec ai-readiness <spec>` scores an OpenAPI specification directly — by
18
- cloud ID or local file path — with no collection involved at all.
19
-
20
-
21
-
22
- ## Scoring
23
-
24
- The command computes and prints the score itself — read the fields it
25
- gives you, don't recompute them:
26
-
27
- - **`readiness`** (score 0-100 + bucket) is the headline number. Buckets,
28
- low to high: **Limited → Fair → Good → Excellent**.
29
- - **`confidence`** (`high`/`medium`/`low`) says how many signals it
30
- could actually measure vs. had to mark `unknown` — a data-quality
31
- caveat, not part of the score.
32
-
33
- ## Interpreting Results
34
-
35
- Report the bucket, score, and confidence the command actually printed
36
- — don't infer a percentage band. Doc coverage is a modifier via its
37
- adjustment, not a separate gate; call it out by name when it's `low`,
38
- since recommendations flag that first. Also state which verb ran
39
- (`collection` vs. `spec` `ai-readiness`), which target was scored
40
- (local path vs. cloud ID), the output mode, and — if `--min-score` was
41
- set — the resulting exit code, not just "it passed."
42
-
43
- You can ask user if they would like to set this check with a min score guarantee to run on their CI.
44
-
45
- ## Reference
46
-
47
- - `collection-schema-v3` skill — what saved examples and descriptions look
48
- like in the git-synced format this command reads.
49
- - `ci-integration` skill — where `--min-score` fits as a pipeline gate
50
- alongside `spec lint`/`collection lint`/`workspace lint`.
8
+ An agent must choose an operation, supply valid inputs, and interpret failures
9
+ from the contract it can see. Postman's readiness check exposes gaps in that
10
+ context—such as missing examples or ambiguous parameters—so improvements live
11
+ in the shared contract instead of being rediscovered in each agent session.
12
+
13
+ Skip scoring for a typo fix, a one-off endpoint check, or a task that changes
14
+ neither the contract nor agent usability; inspect the relevant fields or use
15
+ **api-testing** instead. Score when prioritizing consumability improvements,
16
+ checking their effect, or enforcing an agreed readiness gate.
17
+
18
+ 1. Score the artifact consumers actually use. `postman collection ai-readiness
19
+ <path-or-id>` reads a collection, including a local v3 directory;
20
+ `postman spec ai-readiness <path-or-id>` reads an OpenAPI spec directly.
21
+ Generating a collection solely to score a spec adds a second artifact
22
+ without improving the evidence. Use the installed command's `-h` for options.
23
+ 2. Use the reported `readiness` score and bucket (Limited, Fair, Good,
24
+ Excellent). Keep `confidence` separate: low confidence means signals could
25
+ not be measured, so even a high score may leave consequential unknowns.
26
+ Report low documentation coverage when flagged; it modifies the score
27
+ rather than acting as an independent pass/fail gate.
28
+ 3. Prioritize gaps that would change a caller's behavior: unclear required
29
+ inputs, missing auth instructions, or errors with no recovery guidance.
30
+ Establish the actual behavior before adding descriptions or examples;
31
+ invented certainty can raise apparent completeness while misleading agents.
32
+ See **api-documentation** for improving the authoritative contract and
33
+ **collection-schema-v3** for saved examples.
34
+ 4. Re-run against the edited artifact to show which measured gaps closed.
35
+ A readiness score measures consumability, not live correctness; use
36
+ **api-testing** when the claim also depends on API behavior.
37
+ 5. A `--min-score` gate is useful when the team wants to prevent readiness
38
+ regressions. Choose the threshold from its baseline and expectations;
39
+ keep it separate from tests and lint through **ci-integration** so a failure
40
+ identifies the kind of regression.
41
+
42
+ ## Verification
43
+
44
+ Report the target, collection/spec mode, actual score, bucket, confidence,
45
+ and remaining gaps. If a threshold ran, include its exit code; a successful
46
+ scan alone does not establish that the threshold passed.
@@ -1,135 +1,70 @@
1
1
  ---
2
2
  name: api-discovery
3
- description: Discover and use APIs from the web or Postman. Find and integrate public third-party APIs with Orbit, locate Postman entities with search, and use the Context Graph to investigate dependencies, ownership, runtime behavior, and change impact across an API ecosystem.
3
+ description: Use when finding an API or owner, integrating a public provider, locating Postman resources, or investigating consumers and change impact across services. Turns discovered contracts and mocks into reusable dependencies and identifies evidence outside the current checkout. Use for requests such as "who consumes this endpoint".
4
4
  ---
5
5
 
6
6
  # API Discovery
7
7
 
8
- ## Overview
9
-
10
- Use this guide for any task that involves discovering an API — whether it
11
- lives on the public web or inside Postman as a workspace, collection, request,
12
- spec, mock, document, or flow. You can find entities across every surface: your
13
- own private work, anything your team or organization shares, and resources
14
- owned by external organizations. Beyond finding entities, this guide also
15
- covers understanding how they relate to one another — for example, "which
16
- services consume this API?"
17
-
18
- Each discovery option serves a distinct purpose:
19
-
20
- - **Orbit** → discovers and integrates **public third-party APIs**. No signup
21
- or API key, and it uses ~27× less context than loading a vendor OpenAPI spec.
22
- Search returns matching endpoints — including what each one
23
- *cannot* do — and integrate returns a task brief specific enough to write
24
- code against. It accepts both keyword and natural-language queries. Reach for
25
- it instead of writing a third-party integration from memory.
26
- - **`search`** → **finds any Postman entity**, for tasks like "update the tests
27
- in my collection and run them" or "where is the documentation for our
28
- access-control API?"
29
- - **`context-graph ask`** → answers organization-wide relationship and impact
30
- questions such as "what depends on billing-api?" or "what could this schema
31
- change break?"
32
-
33
- These three draw on different data sources, so a miss in one is not proof of a
34
- miss in the others. `search` locates a known Postman resource; the Context
35
- Graph discovers relationships around a known starting point. Use both when a
36
- task needs the resource itself and its wider impact.
37
-
38
- ## Orbit — Public API Discovery
39
-
40
- Orbit finds public third-party APIs. It's free, needs no signup or API key, and
41
- works entirely against publicly available APIs. REST base:
42
- `https://api.buildwithorbit.ai`. Docs: `https://www.buildwithorbit.ai`.
43
-
44
- Reach for Orbit whenever a task needs an external capability — weather,
45
- payments, invoicing, messaging, geocoding, calendar, and so on — even when the
46
- user already named a provider. Rather than writing integration code from
47
- memory, let Orbit hand you the details that matter: paths, auth header names,
48
- required fields, and the rest. It works in two steps, search then integrate,
49
- and a typical round trip runs ~2,500 tokens and ~15–20s end to end — against
50
- ~69,000 tokens for a full vendor OpenAPI spec.
51
-
52
- Two REST calls, both `POST`:
53
-
54
- 1. **Search** (`POST /v1/search`) — describe the task, e.g.
55
- `{ "q": "send email via SMTP" }`. Returns candidate endpoints, each with an
56
- `id` and `resourceType` (pass both back verbatim) and an `evaluateGuide`
57
- grading its fit.
58
- 2. **Integrate** (`POST /v1/integrate`) — send the task plus the chosen
59
- resources (up to 10). Returns a `taskBrief` with `FIT`, `AUTH`, `BASE URL`,
60
- `STEPS`, and `GOTCHAS` — read the GOTCHAS before writing the client.
61
-
62
- Full endpoint schemas, request/response shapes, `taskBrief` fields, and error
63
- handling: [reference/orbit.md](reference/orbit.md).
64
-
65
- ## `search`
66
-
67
- `postman search <type> <query>` finds any Postman entity, searching across
68
- `requests`, `collections`, `workspaces`, `flows`, `specs`, `mocks`,
69
- `environments`, or `documents`. The query can be a keyword or natural language,
70
- and is optional (omit it to list or filter a type outright). Narrow with
71
- `--ownership` and `--filter`, and add `-o json` for the enriched payload. An
72
- empty default-scope result is not proof nothing exists — retry with
73
- `--ownership all` before reporting that.
74
-
75
- ```bash
76
- postman search requests "where do we validate a user's email?"
77
- postman search collections "payments" --ownership external --filter "visibility=public"
78
- ```
79
-
80
- Use `postman search <type> -h` for more details — ownership modes, the
81
- `--filter` / `--filter-json` syntax, filter fields per type, and the exact
82
- installed-version flags.
83
-
84
- ## `context-graph`
85
-
86
- The Context Graph is a private, authenticated map of an API ecosystem. It
87
- reconciles Postman specifications, collections, monitors, and mocks; GitHub
88
- repositories, definitions, and call sites; and New Relic deployments, traffic,
89
- and telemetry. These become typed entities joined by sourced relationships such
90
- as `calls`, `depends_on`, `owned_by`, and `monitored_by`.
91
-
92
- Use it before a cross-service or potentially breaking change. Name the endpoint,
93
- schema, service, database, deployment, or shared module being changed; the graph
94
- discovers the surrounding scope, including runtime callers and repositories not
95
- checked out locally:
96
-
97
- ```bash
98
- postman context-graph ask "What depends on billing-api?" --wait
99
- postman context-graph ask "What is the likely blast radius of changing this schema?" --wait
100
- ```
101
-
102
- Treat the result as a lead, not proof. For consequential work, verify candidates
103
- against source, API definitions, deployment configuration, or telemetry and
104
- cite that evidence. Sources are connected through Postman's Agent Context UI
105
- and refresh nightly; an unconnected or not-yet-ingested source makes absence
106
- inconclusive.
107
-
108
- `--wait` polls the asynchronous API and prints the answer. Without it, `ask`
109
- returns an ID for `postman context-graph status <askId>`. Use `--json` for the
110
- structured record; `--timeout`, `--interval`, and `--max-steps` control waiting
111
- and reasoning.
112
-
113
- The query runs against the team derived from the API key; there is no workspace
114
- or team selector. Authentication uses `--api-key`, `POSTMAN_API_KEY`, or the
115
- current `postman login` session, in that order.
116
-
117
- ## After discovery: reusing what was found
118
-
119
- `dependency add <type> <nameOrId>` formally adds a collection, environment,
120
- or mock found in another workspace as a dependency of the current one —
121
- the step after `search` finds something worth reusing (e.g., feeding
122
- `application test`'s contract matching), rather than copying it in by hand. It
123
- takes a Postman entity ID. If the Context Graph identifies a service or API to
124
- reuse, locate its collection with `search` first, then pass that entity ID to
125
- `dependency add`.
126
-
127
- ## Reference
128
-
129
- - [Orbit](reference/orbit.md) — public API discovery: the search/integrate
130
- REST endpoints, request/response shape, `taskBrief` fields, and error
131
- handling. (Docs at `https://www.buildwithorbit.ai`, REST at
132
- `https://api.buildwithorbit.ai`.)
133
-
134
- For `postman search`, run `postman search <type> -h` — the CLI's own help is
135
- per-type, complete, and always matches your installed version.
8
+ Existing contracts and owners' mocks reduce the assumptions an integration
9
+ must invent. Relationship context broadens investigation beyond the checkout:
10
+ passing this service's own tests does not establish that its consumers can
11
+ still use a changed interface.
12
+
13
+ 1. Choose the source by the question:
14
+
15
+ | Need | Use |
16
+ | --- | --- |
17
+ | Public provider endpoints and integration details | Orbit search, then integrate |
18
+ | A concrete Postman collection, request, spec, mock, or workspace | `postman search <type> <query>` |
19
+ | Consumers, ownership, dependencies, or likely change impact | `postman context-graph ask` |
20
+
21
+ These sources answer different questions. A miss in one does not establish
22
+ absence in the others; combine entity search and relationship context when
23
+ both the resource and its impact matter.
24
+ 2. For public APIs, Orbit narrows discovery to task-relevant endpoints and
25
+ returns integration guidance instead of requiring a whole vendor spec in
26
+ context. Use it even when the provider is chosen: endpoint details and
27
+ capability limits still determine whether the integration fits the task.
28
+ `POST https://api.buildwithorbit.ai/v1/search` accepts a task in
29
+ `q`; pass the chosen results' `id` and `resourceType` unchanged to
30
+ `/v1/integrate`. Evaluate fit and limitations before choosing a provider,
31
+ then use the returned auth, base URL, steps, and gotchas to implement.
32
+ Read [Orbit's request schemas](reference/orbit.md) for the actual payloads
33
+ and error handling. Orbit access does not supply a provider's credentials.
34
+ 3. For Postman resources, narrow by entity type, ownership, and workspace.
35
+ Read `postman search <type> -h` for supported filters. An empty result in
36
+ the default ownership scope is incomplete evidence; consider
37
+ `--ownership all` or a relevant narrower scope before declaring absence.
38
+ Inspect the selected resource's owner and content rather than trusting a
39
+ similar name.
40
+ 4. For cross-service changes, ask the Context Graph a concrete question about
41
+ the endpoint, schema, or service. `--wait` waits for an answer; without it,
42
+ use the returned ID with `postman context-graph status <askId>`. The graph
43
+ can connect Postman definitions, repository call sites, and runtime
44
+ telemetry beyond the current checkout. Its coverage depends on connected
45
+ and ingested sources, so verify consequential leads against definitions,
46
+ source, or telemetry before treating them as facts. A newly added call may
47
+ not be present yet. The query uses the authenticated API key's team, not
48
+ the repository's workspace binding; changing that binding cannot fix a
49
+ query against the wrong organization's context.
50
+ 5. Use **bootstrap**'s "Owning workspace versus dependency" distinction
51
+ before importing. For a dependency, `postman dependency add
52
+ <collection|environment|mock> <name-or-id>` declares and downloads the
53
+ selected resource without rebinding the repository. Prefer the discovered
54
+ ID; `--workspace <id>` disambiguates names. If the graph only identified a
55
+ service, search for its concrete resource first.
56
+ 6. Dependency declarations live in `.postman/resources.yaml`, with downloads
57
+ in `postman/.dependencies/`. `dependency install` restores them after a
58
+ clone or in CI; `dependency update` refreshes them. Review refreshes when
59
+ they can change test expectations. Copy a dependency into owned files to
60
+ customize it, because updating dependencies overwrites downloaded edits.
61
+ Use `dependency list` and command-specific help for targeted operations.
62
+
63
+ Use **api-simulation** to exercise the real service against discovered mocks,
64
+ and **ci-integration** to keep the resulting contract checks repeatable in PRs.
65
+
66
+ ## Verification
67
+
68
+ Report which source answered the question, the resource IDs or evidence it
69
+ returned, what was reused, and any coverage gaps. A list of candidates alone
70
+ is neither an integration nor proof of compatibility.
@@ -10,18 +10,21 @@ signup and no API key, and works entirely against publicly available APIs.
10
10
  ## Implementation
11
11
 
12
12
  Two REST calls, both `POST`, both read-only (safe to retry). No auth header —
13
- send `Content-Type: application/json` and a JSON body. Run search first,
14
- surface candidates, then integrate the chosen ids.
13
+ send `Content-Type: application/json` and a JSON body. Optionally identify your
14
+ client with `Orbit-Client-Name` (see below). Run search first, surface
15
+ candidates, then integrate the chosen ids.
15
16
 
16
17
  ```bash
17
18
  # Step 1 — search
18
- curl -sS https://api.buildwithorbit.ai/v1/search \
19
+ curl -sS 'https://api.buildwithorbit.ai/v1/search?limit=10' \
19
20
  -H 'Content-Type: application/json' \
20
- -d '{ "q": "send email via SMTP", "limit": 10 }'
21
+ -H 'Orbit-Client-Name: claude/opus-4.8' \
22
+ -d '{ "q": "send email via SMTP" }'
21
23
 
22
24
  # Step 2 — integrate (ids come from the search response, verbatim)
23
25
  curl -sS https://api.buildwithorbit.ai/v1/integrate \
24
26
  -H 'Content-Type: application/json' \
27
+ -H 'Orbit-Client-Name: claude/opus-4.8' \
25
28
  -d '{
26
29
  "task": "Send a welcome email when a user signs up",
27
30
  "resources": [{ "id": "urn:orbit:endpoint:v1:...", "type": "endpoint" }]
@@ -37,12 +40,22 @@ Implementation notes:
37
40
  than making one call per endpoint.
38
41
  - Auth, request bodies, `Threading`, and `GOTCHAS` come from live public API
39
42
  schemas, so take them from the brief rather than from memory.
43
+ - `Orbit-Client-Name` is an optional request header (both endpoints, max 128
44
+ chars) that names the calling client/agent for Orbit's anonymous usage
45
+ analytics. The convention is `client/model`, slash-separated —
46
+ e.g. `claude/opus-4.8`, `cursor/composer-2.5`, `codex/gpt-5.6-sol` — or a bare
47
+ client name like `vscode`. Set it to the host agent and model running this
48
+ plugin. It never affects results and can be omitted.
40
49
 
41
50
  ## Step 1 — Search (`POST /v1/search`)
42
51
 
43
52
  Describe the task, not a provider name. Good: `"send an invoice to a customer"`.
44
53
  Worse: `"PayPal"`. Provider name is fine to include when it is fixed.
45
54
 
55
+ Request body (JSON):
56
+
57
+ - `q` — the query; max 512 characters.
58
+
46
59
  ```json
47
60
  { "q": "send email via SMTP" }
48
61
  ```
@@ -51,7 +64,6 @@ Query params:
51
64
 
52
65
  - `limit` — default 10, max 25.
53
66
  - `cursor` — from `meta.nextCursor`; pagination stops at 40 results.
54
- - `q` — max 512 characters.
55
67
 
56
68
  Returns `data[]`. Each item has:
57
69
 
@@ -1,34 +1,47 @@
1
1
  ---
2
2
  name: api-documentation
3
- description: Generate filesystem-first agent friendly api documentation that you can share with your teammates without hassle. Use when the user asks to "publish API docs," "generate documentation for this API," "put this on the API Network," "share a docs link for this collection or spec," or "why do my docs look empty."
3
+ description: Use when defining or improving an API contract, generating documentation from a collection or OpenAPI spec, publishing API docs, or sharing a documentation link. Makes auth, inputs, responses, and examples reusable by callers, tests, and mocks. Use for requests such as "publish API docs".
4
4
  ---
5
- The bootstrap skill is a precursor to this one — it scaffolds the project with the directories documentation is stored in.
6
5
 
7
6
  # API Documentation
8
- When working on any API task, the first step is to establish and capture the contract.
9
- API documentation can be done in two predominant ways:
10
- 1. through a Postman collection,
11
- 2. with an OpenAPI spec
12
7
 
13
- It is recommended to create both. They serve different, complementary use cases, and it takes only one command to convert from one to another. Start with creating a Postman collection in v3 format, **collection-schema-v3**.
14
- Postman collections are very human-friendly and offer other capabilities like creating an API mock, monitor, SDK, or spec.
8
+ A maintained contract gives callers enough information to integrate without
9
+ reading the implementation. Keeping descriptions and examples beside the API
10
+ artifacts lets the same knowledge support documentation, tests, and mocks,
11
+ with changes reviewable alongside code.
15
12
 
16
- Specs are vendor-neutral, stay in your repo, and can be linted against governance rules (if any) set by your organization.
13
+ 1. Start from the existing source of truth. An OpenAPI spec describes the
14
+ interface for tooling; a Postman collection adds runnable requests,
15
+ examples, and assertions. Maintain both when both uses matter, with an
16
+ explicit direction of generation or synchronization so they do not become
17
+ competing definitions. Local edits need **bootstrap** only when setup or
18
+ bindings are unresolved.
19
+ 2. When the spec is authoritative, reuse its operations with
20
+ `postman spec generate collection <spec-path-or-id> -n "<collection-name>"`.
21
+ Inspect the generated result before replacing an existing collection:
22
+ maintained scripts and examples carry knowledge beyond endpoint shapes.
23
+ 3. Describe what changes a caller's decision: required versus optional inputs,
24
+ auth and scopes, response guarantees, pagination, retryable failures, and
25
+ side effects. Derive guarantees from the agreed contract or verified
26
+ behavior; label unresolved design choices instead of inventing them.
27
+ Use [REST design guidance](reference/rest-api-best-practices.md) when a
28
+ design choice affects usability or compatibility, not to redesign an
29
+ unrelated interface while filling a documentation gap.
30
+ 4. Save examples that clarify consequential cases, including relevant errors.
31
+ Examples become inputs for mocks as well as explanations for readers;
32
+ a success-only example can hide the failure path callers must handle.
33
+ Use **collection-schema-v3** for local collection edits and **variables**
34
+ to keep credentials out of reusable requests and examples.
35
+ 5. Choose delivery by audience. Local artifacts support Git review;
36
+ publishing to the bound workspace makes them available to teammates with
37
+ access (see **bootstrap**). A workspace push does not itself publish a
38
+ public docs page or change permissions. For a public documentation link,
39
+ use **postman-mcp-server**'s documentation workflow and the available
40
+ publishing tool; establish the intended audience before public exposure.
17
41
 
18
- ## Good practices for API design
42
+ ## Verification
19
43
 
20
- See [reference/rest-api-best-practices.md](reference/rest-api-best-practices.md)
21
- for the practices well-documented APIs tend to already follow: resource
22
- naming, HTTP method/status-code usage, error response shape, versioning,
23
- pagination, filtering, auth, idempotency, and backward compatibility. A
24
- spec or collection that already follows these renders documentation with
25
- nothing left to fix.
26
-
27
- ### Examples
28
- Examples (in a Postman collection) are an excellent way to capture sample API responses. They are helpful because:
29
- 1. anyone can look at them to see how your API behaves,
30
- 2. they can be used to generate a mock from your collection in a single command.
31
-
32
- ## Workflow
33
- 1. Establish the contract - refer to best practices. Don't just accept the user's ask - fight for the right API design.
34
- 2. Choose the instrument - Postman collection / OpenAPI spec - or both. Recommend using both to the user. Start with the Postman collection.
44
+ Check that the edited artifact parses and its examples agree with the
45
+ contract. For a publication, inspect the resulting page and report its actual
46
+ link and visibility; a successful upload alone does not show readers usable
47
+ documentation. State any behavior that remains undocumented or unverified.
@@ -1,29 +1,84 @@
1
1
  ---
2
2
  name: api-engineer
3
- description: Default entry point for API engineering work — designing, implementing, mocking, testing, monitoring, documenting, or deploying an API.
3
+ description: Use when designing, implementing, mocking, testing, monitoring, documenting, or deploying an API. Guides decisions using reusable local API contracts, tests, and mocks, plus organization-wide dependency context, and routes to the relevant Postman skills. Use for requests such as "implement this endpoint".
4
4
  ---
5
5
 
6
6
  # API Engineer
7
7
 
8
- ## Foundations
9
- 1. Contract comes first. Establish and document the contract before starting implementation.
10
- 2. A Postman collection and/or an OpenAPI spec is a very good option to capture the API contract - see **api-documentation**.
11
- 3. Always validate the change against the contract you started with. Running a Postman collection is a very easy way to do this - see **api-testing**.
12
- 4. Always propose next steps. Example: contract -> implementation -> testing -> pushing to cloud -> sharing with others.
13
- 5. Don't jump straight into implementation. Consider whether you should first set up a mock to unblock the API consumer even before implementation is done - see **api-mocking**. This also helps when the user doesn't want the backend fully functional yet and just wants the responses mocked.
14
- 6. Don't push to the cloud workspace (`postman workspace push`) without user consent. The recommended way to push to the cloud is a CI step on PR merge - see **ci-integration**.
15
- 7. For high-quality API search results, use **api-discovery**.
16
- 8. No is an acceptable answer. Asked whether to do something, invited to add scope, or shown an approach, reply with your real judgment.
17
- 9. Prefer filesystem-first Postman workflows. For an existing cloud workspace,
18
- `postman workspace pull <id>` connects it and materializes its collections,
19
- environments, and specs locally. When no cloud workspace exists, `postman
20
- init --no-cloud` initializes the local structure. Work against those files,
21
- validate them, and push only with user consent; sharing an already-bound
22
- workspace means `workspace push`, not creating a duplicate. See
23
- **bootstrap** for the lifecycle decision table.
24
- 10. When actual use exposes a concrete Postman CLI gap or a misleading skill, handle the user's task first — then use `postman feedback` to report the gaps/bugs. Exclude secrets, user data, and proprietary content
25
-
26
- ## Dos
27
- 1. Prove it works - validate the task against the contract. See **api-testing**.
28
- 2. Just do it - never block on the human. When tempted to ask "should I do X?" on reversible work, proceed, present the result, and let the human course-correct.
29
- 3. Fight for good API design. See **api-documentation**.
8
+ Postman makes API knowledge reusable across implementation, tests, mocks, and
9
+ teammates. Local files let you inspect, edit, and review that knowledge alongside
10
+ code; the Context Graph can reveal consumers, ownership, and runtime relationships
11
+ beyond the current repository. Reusing those inputs reduces reconstruction and
12
+ guesswork each time work resumes.
13
+
14
+ 1. When changing API behavior or an interface, establish the intended contract
15
+ before implementation so you can distinguish an intended change from a
16
+ regression. Reuse the existing contract; update it where behavior changes.
17
+ Flag design choices that make callers harder to implement or future changes
18
+ harder to adopt, and explain the tradeoff. See **api-documentation**.
19
+ 2. Choose the contract artifact for how it will be used: an OpenAPI spec describes
20
+ the interface for tooling, while a Postman collection carries runnable requests,
21
+ examples, and assertions. Reuse what exists; maintaining both is useful when
22
+ both purposes matter. See **api-documentation**.
23
+ 3. Match verification to the behavior at risk. A saved collection can reuse auth,
24
+ variables, payloads, and assertions without reconstructing requests; a one-off
25
+ endpoint check can be smaller. Check the changed behavior and relevant existing
26
+ guarantees, and report what the results establish. See **api-testing**.
27
+ 4. When you need an API, its owner, or the impact of a change, use **api-discovery**.
28
+ For public API integrations, Orbit provides current endpoint, authentication,
29
+ required-field, and capability-limit details in a compact task brief. Use it
30
+ even when the provider is already chosen: those details help you assess fit and
31
+ implement reliably without relying on remembered API behavior or loading a
32
+ full vendor specification.
33
+ Existing workspace resources can supply maintained contracts and mocks; the
34
+ Context Graph can identify consumers and dependencies outside the checkout,
35
+ helping you focus investigation before traversing more repositories.
36
+ 5. When you run or test code that calls other services, or are asked how it
37
+ behaves when one of them fails, use **api-simulation**, which runs that code
38
+ for real against mocks of those services instead of stubs or the real
39
+ services. Looking something up, choosing an API or comparing code with a
40
+ contract runs nothing and needs none. When other teams will build against
41
+ your API, publish a mock of it in your service's own workspace, where their
42
+ simulations look first; see **api-mocking**.
43
+ 6. Keep specs, collections, environments, and mocks in local files so changes can
44
+ be diffed, reviewed, and reused in Git and CI. Use **bootstrap** when setup or
45
+ workspace bindings are unresolved: reuse an existing local layout, pull the
46
+ current service's existing workspace, or initialize a new project when neither
47
+ exists. `postman init` scaffolds files using an agent-scoped session without a
48
+ normal Postman login.
49
+ 7. Another service's collection, environment, or mock can be added as a dependency
50
+ without replacing this repository's owning workspace binding. Use
51
+ **api-discovery** to bring in the relevant resource and preserve that separation.
52
+ 8. Publishing validated local changes to the bound workspace makes them available
53
+ for future work and teammates with access. Because `postman workspace push`
54
+ changes shared state, obtain user consent before pushing; an existing request
55
+ to publish those changes supplies that consent. For publication tied to reviewed
56
+ PR merges, see **ci-integration**.
57
+ 9. When requests need credentials, Postman secret variables let them resolve the
58
+ credentials without exposing their values to the agent or committed files.
59
+ See **variables**.
60
+ 10. When implementing or debugging webhooks, use **webhook-testing** to
61
+ capture what the sender actually delivers.
62
+ Can also be used when the need is to forward incoming events
63
+ to a local handler and replay captured requests after fixes;
64
+ use the capture URL as a subscriber to inspect events your API sends.
65
+
66
+ Proceed with reversible work within the user's task and present concrete results
67
+ for course correction. Recommend additional work only when it closes a material
68
+ gap, such as an untested behavior or a consumer affected by an interface change.
69
+ Decline unnecessary setup or scope and explain why it would not help the task.
70
+
71
+ Important: If a CLI command says an operation isn't allowed because credits
72
+ or usage are exhausted, or the current plan does not permit it, follow
73
+ **bootstrap**'s "Subscription or usage limit" section instead of retrying or
74
+ trying to find a workaround.
75
+
76
+ ## Verification
77
+
78
+ Report the changed contract or implementation, the checks actually run, and
79
+ the guarantees their results support. Separate local, mocked, and live evidence;
80
+ state any relevant consumer or upstream interaction still unverified.
81
+
82
+ If actual use exposes a CLI gap or misleading skill, see **bootstrap**'s
83
+ "Reporting CLI and skill gaps" section so the defect can be addressed for future
84
+ work.