← PostmanCONTENT HISTORY

Update to Postman

Snapshot Oct 28, 2026 · 18:05 UTC · version 0.5.1

Collection source: downloaded plugin package.

WHAT CHANGED

Instructions updated for api-simulation

Full description — Now says: services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add...

Observed in instructions or declared skills. Runtime behavior has not been tested.

Save Postman and check future changes in Following.

Up to 3 plugins free · no card required.

All fields and original values.

Full description

Before

Oct 26, 2026 · 18:05 UTC

your code for real against stand-ins for the HTTP services it calls, served together as one environment on one local port or one deployed URL, whether that code is a service you're changing, a frontend, a test suite or a demo. Use when y...

After

Oct 28, 2026 · 18:05 UTC

services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add or change code that calls other services and need to run it, test it, prove a fix...

Skill instructions

Before

Oct 26, 2026 · 18:05 UTC

your code for real against stand-ins for the HTTP services it calls, served together as one environment on one local port or one deployed URL, whether that code is a service you're changing, a frontend, a test suite or a demo. Use when y...

After

Oct 28, 2026 · 18:05 UTC

services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add or change code that calls other services and need to run it, test it, prove a fix...

Supporting files

Before

Oct 26, 2026 · 18:05 UTC

[{"relative_path":"reference/context_file.md","size_in_bytes":9005},{"relative_path":"reference/sim_yaml_schema.md","size_in_bytes":3833}]

After

Oct 28, 2026 · 18:05 UTC

[{"relative_path":"reference/context_file.md","size_in_bytes":10413},{"relative_path":"reference/sim_yaml_schema.md","size_in_bytes":3835}]

Compare saved observations

Download comparison JSON

SKILL.md text changes

− removed · + added

--- before
+++ after
@@ -1,27 +1,50 @@
 ---
 name: api-simulation
-description: Runs your code for real against stand-ins for the HTTP services it calls, served together as one environment on one local port or one deployed URL, whether that code is a service you're changing, a frontend, a test suite or a demo. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors ("what happens to a booking if the email service is down?"), by running each failure instead of reading the code. Applies even when nobody says mock or simulation. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`.
+description: Runs services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors ("what happens to a booking if the email service is down?"), by exercising relevant failures and observing caller outcomes. Applies even when nobody says mock or simulation, and a `postman/simulations/` directory in the repository is itself a reason to load this before changing code it covers. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`.
 ---
 
 # API Simulation
 
-A simulation serves several mocks as one environment, each reached by its
-routeKey: as a path prefix by default, or as an `x-mock-slug` header when the
-caller's paths can't change.
-
-Run your code against it rather than stubbing its HTTP client in tests or
-calling the real services. A stub skips the client, config, timeouts and
-error handling that will run in production; the real services need
-credentials and leave side effects. A simulation runs that code over real
-HTTP, the same way in CI, and its log shows what each dependency was asked.
-
-Do only what the task needs. If a `.sim.yaml` in `postman/simulations/`
-already covers it, run that one, and read the `<name>.context.md` beside it
-first: it holds the commands, the preconditions and the failures earlier runs
-hit, so reading it costs less than rebuilding any of that from the `.sim.yaml`
-and the handlers. One request through the changed path proves a change; build
-failure variants only when asked how the code fails or when it must survive a
-failure.
+Simulation lets you control how dependencies behave and explore how your code
+responds to different outcomes. This makes it easier to test assumptions
+repeatedly without real calls changing data, spending money, or notifying
+someone. Simulation context records those assumptions, the evidence supporting
+them, and what remains unknown. As sessions build on this context, it helps
+surface incorrect assumptions and avoid repeated investigation.
+
+Together, the simulation and its context provide a place to explore changes
+and identify what still needs validation against the real dependencies.
+
+Check whether an existing simulation in `postman/simulations/` covers the
+dependency interactions relevant to the task. Reusing its mocks and wiring
+can avoid rebuilding an environment; extend it only where the behavior you
+need to exercise is missing.
+
+The `<name>.context.yaml` beside a simulation records those assumptions, their
+supporting evidence, and unresolved questions so later sessions can build on
+earlier findings. For example, a timeout from `/payments` does not establish
+whether the payment failed or completed before the response arrived. The
+context file will document what has been established about the real provider
+and identify what still needs verification.
+
+A simulation serves several mocks as one environment: by default behind a
+proxy that answers for the dependencies' own hostnames, so the code under test
+keeps the base URLs it ships with, or on one local port where each member is
+reached by its routeKey.
+
+Simulation adds value when the result depends on real HTTP behavior, such as
+client configuration, serialization, timeouts or retries, and the real
+dependencies are unavailable or unsuitable for the exercise. Stubbing the
+HTTP client can bypass those behaviors. Choose verification that exercises
+what matters to the task: an existing test may already answer a local logic
+question, while a claim about the provider may need its contract or a real
+service check. A simulation's log shows what each stand-in was asked.
+
+Define the expected outcome and what observation would distinguish correct
+from incorrect behavior, including side effects when relevant. A request
+through the changed path shows that it ran; its response and resulting state
+determine whether the expectation held. Choose boundary and failure cases
+from the behavior changed and the consequences of getting it wrong.
 
 `postman simulation` needs CLI 1.70.0 or later (`postman --version`; an older
 CLI answers `postman simulation -h` with its general help).
@@ -52,45 +75,37 @@
 Start it in the background, its log in a file:
 
 ```bash
-postman simulation run postman/simulations/checkout-dev.sim.yaml --port 4900 --output ndjson > sim.ndjson 2> sim.err &
+postman simulation run postman/simulations/checkout-dev.sim.yaml --proxy --output ndjson > sim.ndjson 2> sim.err &
 ```
 
-`--port` is optional. It's up when `sim.ndjson` has a `listening` event; a
-start-up error is in `sim.err`. That event carries the bound port and each
-member's address, so take the base URLs from it rather than from the port you
-asked for. Stop it with
+`--proxy` is how to run it unless something below rules it out: nothing about
+the code changes for the run — not a base URL, not a config file, not an SDK's
+built-in host — and because nothing the proxy answers for has to resolve, an
+internal hostname with no DNS record works.
+
+It's up when `sim.ndjson` has a `listening` event; a start-up error is in
+`sim.err`, a busy proxy port among them. Stop it with
 `pkill -INT -f "simulation run .*<file>.sim.yaml"`. Nothing reloads: restart
 it after a mock edit.
 
-Point the caller at it without changing what the code does once deployed.
-Under path routing, swap only the host and keep the path:
-`https://catalog.internal.example.com/v2` becomes
-`http://127.0.0.1:4900/catalog/v2`; a dropped `/v2` is the usual cause of a
-`404`. A hard-coded base URL should read an environment variable with
-today's value as the default. If the code mustn't change at all, run it
-behind the proxy instead, below.
-
-## Through a proxy, when no base URL can change
-
-`simulation run <file.sim.yaml> --proxy` puts the members behind a local
-forward proxy that answers for the dependencies' own hostnames, so the code
-keeps the base URLs it ships with. Any other host passes through to the real
-service. Reach for it when hostnames are hard-coded, built from config the
-change shouldn't touch, or owned by an SDK — and because nothing it answers
-for has to resolve, an internal hostname with no DNS record works.
-
 Read `postman simulation run --help` before driving it. The flags, what the
 caller's own process needs in order to reach the proxy, and what to do about a
 client that ignores it are all there and change with the CLI, so take them
 from the command rather than from here.
 
-Two things decide whether a proxied run proves anything. A member with no
-`origin:` in the `.sim.yaml` is never matched, so its traffic reaches the real
+What decides whether a proxied run proves anything is `origin:`. A member with
+none in the `.sim.yaml` is never matched, so its traffic reaches the real
 service and a run can come up having intercepted nothing — `simulation create`
 copies that field from the mock's manifest, so editing the manifest alone
 won't fix it ([reference/sim_yaml_schema.md](reference/sim_yaml_schema.md)).
-And conditions don't apply here: member `scenarios` are ignored, so failures
-need the one-port run.
+
+## Running it on one port instead
+
+`--port` puts every member on one local port, each addressable by its routeKey,
+with the code under test pointed at that port. Reach for it when a client has
+no proxy setting to honour, and when you want to address a member yourself —
+each one keeps a stable URL for the whole run, so a mock's control routes and
+its individual responses are a curl away.
 
 ## Reading the log
 
@@ -98,8 +113,8 @@
 `sim.ndjson`. A member with no `request` events isn't wired or isn't on this
 path. Some answers come from the simulation itself and mean wiring, not code:
 
-- `404 Unknown simulation member`: a base URL lost its routeKey, or a client
-  sent the wrong `x-mock-slug`.
+- `404 Unknown simulation member`, on a one-port run: a base URL lost its
+  routeKey, or a client sent the wrong `x-mock-slug`.
 - `501`, or a generated mock's `404 Endpoint not defined`: a call the mock
   doesn't model yet.
 - `502 Proxy error`: the member's process died, usually an async throw in a
@@ -108,12 +123,20 @@
 
 ## When a dependency goes down
 
-Run it rather than reason from the code: each way of going down takes a
-different path through the caller, and a stub skips the client code that
-picks the path. Fail the one dependency in each shape that matters, a run
-each, with the others answering normally:
+Choose failures from the outcome the user needs to understand. A failure
+before a write, a timeout after a write may have completed, and a failure
+during compensation can expose different risks: lost work, duplicate writes
+or unreleased resources. Read the caller to identify relevant paths, then
+exercise the ones whose runtime behavior remains uncertain.
+
+Isolating one failure helps attribute the result. Combine failures or model
+partial completion when the question depends on their interaction. The
+injection must represent the event being investigated: delaying a response
+alone does not establish whether a write completed before the timeout.
+Examples of available techniques:
 
-- **Unreachable:** point its base URL at a port nothing listens on.
+- **Unreachable:** point its base URL at a port nothing listens on. This one
+  needs the one-port run, since under `--proxy` the base URLs are the point.
 - **Hanging:** give its member a `latency` condition longer than the
   client's timeout. If the client sets none, that is the finding: Node's
   `fetch` waits about five minutes, so say so rather than wait it out.
@@ -131,19 +154,24 @@
 
 ## Its context document
 
-Every simulation is created with a `<name>.context.md` beside it, holding what
-running this one has taught: the commands that start it and prove it's up, the
-preconditions and what breaks when one fails, what it takes for granted about
-the dependencies themselves, the data seeded to test with, the failures earlier
-runs already hit, and what a passing run still doesn't prove. The `.sim.yaml` says what the simulation is, not how it behaves, so
-this is the file that saves a session the search. A new one is mostly
-`@todo`s, which are the questions a first real run answers.
-
-Every line passes one test — the repo doesn't already state it — so it stays
-about a screenful, and a claim carries the date and the run that established
-it, because the log it came from isn't committed. Its sections and conventions
-are in [reference/context_file.md](reference/context_file.md); read that
-before writing it back.
+Every simulation is created with a `<name>.context.yaml` beside it, holding
+what the code is believed to rely on about the dependencies it calls — who the
+caller is taken to be, which plan or permission is assumed, the order calls go
+in, what gets retried, the shape of the data — and what each belief rests on.
+The `.sim.yaml` says what the simulation is, not what the services it stands in
+for do, so this is the record that saves a session the search.
+
+Read relevant claims before investigating the dependencies, and assess whether
+their evidence still applies to this task. Write what you established back
+into the document before you finish. Each claim carries a `status`,
+the `reason` the evidence adds up to it, the `verification` that was done and
+what it showed, and a `source` to re-check it against, so the next session can
+tell a claim a contract promises from one a request actually demonstrated.
+Preserve existing claims and their evidence when updating the file, including
+unresolved assumptions and historical findings. Its fixed schema and guidance
+on evidence and reuse are in
+[reference/context_file.md](reference/context_file.md); read that before
+writing to it.
 
 ## Keeping it
 
@@ -173,16 +201,21 @@
 
 ## Before you say it works
 
-Claim nothing until what you're testing actually ran: a service printed
-that it's listening and answered your request, or the frontend or test
-suite finished, and its calls are in the log. If its start command exited
-or hung, the run proved nothing; say so and why. Say what a pass proves,
+Claim a simulation passes only after the code under test ran and you observed
+the expected response or state change. Use its calls in the log to confirm
+the dependency path was exercised; for injected failures, use the caller
+outcomes described above. If startup failed or the relevant path never ran,
+report that limitation. Say what a pass proves,
 your code against these stand-ins rather than the real services, what still
 needs the real service before release, and where each mock came from,
 including when you skipped the owner's.
 
-Then write the run back into `<name>.context.md`, so the next session starts
-where this one ended: the `@todo`s it answered, whatever it found wrong, a
-precondition you had to discover, what broke and why, and which members served
-or stayed silent — the last is a line every run adds, so a member silent across
-several runs reads as a pattern rather than a one-off.
+Then write what you established back into `<name>.context.yaml`, so the next
+session starts where this one ended. Add or update claims that help a later
+session reuse the findings. For each claim the run settled or contradicted,
+update its `status`, the `verification` that was done and the `source` to
+re-check it against. Scope what you claim to what you actually
+exercised — "held in the scenarios run" rather than "works" — since the record
+is read later as evidence, and the two don't mean the same thing.
+[reference/context_file.md](reference/context_file.md) has what each field is
+for.
Full technical diff · 3 changed fields

changed /description

BEFORE
"Runs your code for real against stand-ins for the HTTP services it calls, served together as one environment on one local port or one deployed URL, whether that code is a service you're changing, a frontend, a test suite or a demo. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors (\"what happens to a booking if the email service is down?\"), by running each failure instead of reading the code. Applies even when nobody says mock or simulation. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`."
AFTER
"Runs services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors (\"what happens to a booking if the email service is down?\"), by exercising relevant failures and observing caller outcomes. Applies even when nobody says mock or simulation, and a `postman/simulations/` directory in the repository is itself a reason to load this before changing code it covers. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`."

changed /included_files

BEFORE
[
  {
    "relative_path": "reference/context_file.md",
    "size_in_bytes": 9005
  },
  {
    "relative_path": "reference/sim_yaml_schema.md",
    "size_in_bytes": 3833
  }
]
AFTER
[
  {
    "relative_path": "reference/context_file.md",
    "size_in_bytes": 10413
  },
  {
    "relative_path": "reference/sim_yaml_schema.md",
    "size_in_bytes": 3835
  }
]

changed /skill_md_contents

BEFORE
"---\nname: api-simulation\ndescription: Runs your code for real against stand-ins for the HTTP services it calls, served together as one environment on one local port or one deployed URL, whether that code is a service you're changing, a frontend, a test suite or a demo. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors (\"what happens to a booking if the email service is down?\"), by running each failure instead of reading the code. Applies even when nobody says mock or simulation. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`.\n---\n\n# API Simulation\n\nA simulation serves several mocks as one environment, each reached by its\nrouteKey: as a path prefix by default, or as an `x-mock-slug` header when the\ncaller's paths can't change.\n\nRun your code against it rather than stubbing its HTTP client in tests or\ncalling the real services. A stub skips the client, config, timeouts and\nerror handling that will run in production; the real services need\ncredentials and leave side effects. A simulation runs that code over real\nHTTP, the same way in CI, and its log shows what each dependency was asked.\n\nDo only what the task needs. If a `.sim.yaml` in `postman/simulations/`\nalready covers it, run that one, and read the `<name>.context.md` beside it\nfirst: it holds the commands, the preconditions and the failures earlier runs\nhit, so reading it costs less than rebuilding any of that from the `.sim.yaml`\nand the handlers. One request through the changed path proves a change; build\nfailure variants only when asked how the code fails or when it must survive a\nfailure.\n\n`postman simulation` needs CLI 1.70.0 or later (`postman --version`; an older\nCLI answers `postman simulation -h` with its general help).\n\n## Building it\n\n- **Members are the code's HTTP dependencies.** Databases, queues and caches\n  aren't; run them locally. **api-discovery** can find calls made through\n  shared code; ask about the repo by its `git remote` name, because a close\n  name matches another repo.\n- **Each member needs a mock: see `api-mocking`,** which looks for the owning\n  team's published mock before building one. For a question, one built from\n  the contract will do; one that invents responses can send the caller down a\n  path the real service never would. In a mock you build, answer `501` for calls this path\n  doesn't make: a `404` reads to the caller like a real \"not found\".\n- **Bring in each mock you don't own as a dependency first, then build the\n  simulation over them.** `postman dependency add mock <name-or-id>` declares\n  it in `.postman/resources.yaml` and materialises it under\n  `postman/.dependencies/`, and the member's `path:` points there; `-w\n  <workspace>` resolves a name from the workspace that owns it.\n- **Prefix each mock's `pm.state` keys with its name.** As of CLI 1.73.0,\n  members of a local run read each other's keys, so two mocks storing\n  `orders` overwrite each other.\n\n## Running it\n\nThe run is a server that never exits, so a foreground command never returns.\nStart it in the background, its log in a file:\n\n```bash\npostman simulation run postman/simulations/checkout-dev.sim.yaml --port 4900 --output ndjson > sim.ndjson 2> sim.err &\n```\n\n`--port` is optional. It's up when `sim.ndjson` has a `listening` event; a\nstart-up error is in `sim.err`. That event carries the bound port and each\nmember's address, so take the base URLs from it rather than from the port you\nasked for. Stop it with\n`pkill -INT -f \"simulation run .*<file>.sim.yaml\"`. Nothing reloads: restart\nit after a mock edit.\n\nPoint the caller at it without changing what the code does once deployed.\nUnder path routing, swap only the host and keep the path:\n`https://catalog.internal.example.com/v2` becomes\n`http://127.0.0.1:4900/catalog/v2`; a dropped `/v2` is the usual cause of a\n`404`. A hard-coded base URL should read an environment variable with\ntoday's value as the default. If the code mustn't change at all, run it\nbehind the proxy instead, below.\n\n## Through a proxy, when no base URL can change\n\n`simulation run <file.sim.yaml> --proxy` puts the members behind a local\nforward proxy that answers for the dependencies' own hostnames, so the code\nkeeps the base URLs it ships with. Any other host passes through to the real\nservice. Reach for it when hostnames are hard-coded, built from config the\nchange shouldn't touch, or owned by an SDK — and because nothing it answers\nfor has to resolve, an internal hostname with no DNS record works.\n\nRead `postman simulation run --help` before driving it. The flags, what the\ncaller's own process needs in order to reach the proxy, and what to do about a\nclient that ignores it are all there and change with the CLI, so take them\nfrom the command rather than from here.\n\nTwo things decide whether a proxied run proves anything. A member with no\n`origin:` in the `.sim.yaml` is never matched, so its traffic reaches the real\nservice and a run can come up having intercepted nothing — `simulation create`\ncopies that field from the mock's manifest, so editing the manifest alone\nwon't fix it ([reference/sim_yaml_schema.md](reference/sim_yaml_schema.md)).\nAnd conditions don't apply here: member `scenarios` are ignored, so failures\nneed the one-port run.\n\n## Reading the log\n\nA passing test command doesn't show the dependency path ran: read\n`sim.ndjson`. A member with no `request` events isn't wired or isn't on this\npath. Some answers come from the simulation itself and mean wiring, not code:\n\n- `404 Unknown simulation member`: a base URL lost its routeKey, or a client\n  sent the wrong `x-mock-slug`.\n- `501`, or a generated mock's `404 Endpoint not defined`: a call the mock\n  doesn't model yet.\n- `502 Proxy error`: the member's process died, usually an async throw in a\n  mock without `interceptRequests: true`. It stays down and logs nothing\n  until you restart; run that mock alone with `postman mock run` to see why.\n\n## When a dependency goes down\n\nRun it rather than reason from the code: each way of going down takes a\ndifferent path through the caller, and a stub skips the client code that\npicks the path. Fail the one dependency in each shape that matters, a run\neach, with the others answering normally:\n\n- **Unreachable:** point its base URL at a port nothing listens on.\n- **Hanging:** give its member a `latency` condition longer than the\n  client's timeout. If the client sets none, that is the finding: Node's\n  `fetch` waits about five minutes, so say so rather than wait it out.\n- **An error with a JSON body:** the `error` condition.\n- **An error with an HTML body,** as proxies send: a copy of its mock whose\n  default handler answers `500` with HTML. No condition can do this.\n\nOnly `overrides.conditions` on a member change it. Members always serve\ntheir default handler and ignore `x-mock-scenario`, and a `scenarios` entry\nwith just a `path`, as the Postman app writes, does nothing. Fields and the\nother conditions are in [reference/sim_yaml_schema.md](reference/sim_yaml_schema.md). An injected\nfailure never reaches the mock and isn't logged, so judge it by what the\ncaller did, and check the other members' logs for side effects, such as\nstock reserved and never released.\n\n## Its context document\n\nEvery simulation is created with a `<name>.context.md` beside it, holding what\nrunning this one has taught: the commands that start it and prove it's up, the\npreconditions and what breaks when one fails, what it takes for granted about\nthe dependencies themselves, the data seeded to test with, the failures earlier\nruns already hit, and what a passing run still doesn't prove. The `.sim.yaml` says what the simulation is, not how it behaves, so\nthis is the file that saves a session the search. A new one is mostly\n`@todo`s, which are the questions a first real run answers.\n\nEvery line passes one test — the repo doesn't already state it — so it stays\nabout a screenful, and a claim carries the date and the run that established\nit, because the log it came from isn't committed. Its sections and conventions\nare in [reference/context_file.md](reference/context_file.md); read that\nbefore writing it back.\n\n## Keeping it\n\nCommit your own mocks, the `.sim.yaml`, its context document and what\n`postman dependency add` changed, so the next session or CI reruns it in one\ncommand. Don't commit\n`postman/.dependencies/`: a copy goes stale when its owner updates theirs,\nand `postman dependency install` restores it. Don't commit `sim.ndjson`: the\nCLI redacts common auth headers and fields, but other headers and bodies are\nlogged as sent. In CI, `postman dependency install` needs `POSTMAN_API_KEY`,\nand `postman collection run <collection> --simulation <file> --port <n>`\nstarts and stops the simulation around a collection run.\n\n`postman simulation push` uploads every member to the workspace, so ask\nfirst. It fails on a pulled member, which keeps its owner's `id:`; copy it to\n`postman/mocks/` and delete that line.\n\n## Rules\n\n1. **What you're testing is never a member.** It must run for real, or the\n   test only proves the mock.\n2. **Pull the owner's mock even if it's deployed.** Only members take\n   conditions and appear in the log, and a private mock server wants a key\n   your code won't send.\n3. **`simulation deploy` is public by default,** unlike `mock deploy`. Ask\n   before deploying without `--private`; a local run needs no deploy.\n\n## Before you say it works\n\nClaim nothing until what you're testing actually ran: a service printed\nthat it's listening and answered your request, or the frontend or test\nsuite finished, and its calls are in the log. If its start command exited\nor hung, the run proved nothing; say so and why. Say what a pass proves,\nyour code against these stand-ins rather than the real services, what still\nneeds the real service before release, and where each mock came from,\nincluding when you skipped the owner's.\n\nThen write the run back into `<name>.context.md`, so the next session starts\nwhere this one ended: the `@todo`s it answered, whatever it found wrong, a\nprecondition you had to discover, what broke and why, and which members served\nor stayed silent — the last is a line every run adds, so a member silent across\nseveral runs reads as a pattern rather than a one-off.\n"
AFTER
"---\nname: api-simulation\ndescription: Runs services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors (\"what happens to a booking if the email service is down?\"), by exercising relevant failures and observing caller outcomes. Applies even when nobody says mock or simulation, and a `postman/simulations/` directory in the repository is itself a reason to load this before changing code it covers. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`.\n---\n\n# API Simulation\n\nSimulation lets you control how dependencies behave and explore how your code\nresponds to different outcomes. This makes it easier to test assumptions\nrepeatedly without real calls changing data, spending money, or notifying\nsomeone. Simulation context records those assumptions, the evidence supporting\nthem, and what remains unknown. As sessions build on this context, it helps\nsurface incorrect assumptions and avoid repeated investigation.\n\nTogether, the simulation and its context provide a place to explore changes\nand identify what still needs validation against the real dependencies.\n\nCheck whether an existing simulation in `postman/simulations/` covers the\ndependency interactions relevant to the task. Reusing its mocks and wiring\ncan avoid rebuilding an environment; extend it only where the behavior you\nneed to exercise is missing.\n\nThe `<name>.context.yaml` beside a simulation records those assumptions, their\nsupporting evidence, and unresolved questions so later sessions can build on\nearlier findings. For example, a timeout from `/payments` does not establish\nwhether the payment failed or completed before the response arrived. The\ncontext file will document what has been established about the real provider\nand identify what still needs verification.\n\nA simulation serves several mocks as one environment: by default behind a\nproxy that answers for the dependencies' own hostnames, so the code under test\nkeeps the base URLs it ships with, or on one local port where each member is\nreached by its routeKey.\n\nSimulation adds value when the result depends on real HTTP behavior, such as\nclient configuration, serialization, timeouts or retries, and the real\ndependencies are unavailable or unsuitable for the exercise. Stubbing the\nHTTP client can bypass those behaviors. Choose verification that exercises\nwhat matters to the task: an existing test may already answer a local logic\nquestion, while a claim about the provider may need its contract or a real\nservice check. A simulation's log shows what each stand-in was asked.\n\nDefine the expected outcome and what observation would distinguish correct\nfrom incorrect behavior, including side effects when relevant. A request\nthrough the changed path shows that it ran; its response and resulting state\ndetermine whether the expectation held. Choose boundary and failure cases\nfrom the behavior changed and the consequences of getting it wrong.\n\n`postman simulation` needs CLI 1.70.0 or later (`postman --version`; an older\nCLI answers `postman simulation -h` with its general help).\n\n## Building it\n\n- **Members are the code's HTTP dependencies.** Databases, queues and caches\n  aren't; run them locally. **api-discovery** can find calls made through\n  shared code; ask about the repo by its `git remote` name, because a close\n  name matches another repo.\n- **Each member needs a mock: see `api-mocking`,** which looks for the owning\n  team's published mock before building one. For a question, one built from\n  the contract will do; one that invents responses can send the caller down a\n  path the real service never would. In a mock you build, answer `501` for calls this path\n  doesn't make: a `404` reads to the caller like a real \"not found\".\n- **Bring in each mock you don't own as a dependency first, then build the\n  simulation over them.** `postman dependency add mock <name-or-id>` declares\n  it in `.postman/resources.yaml` and materialises it under\n  `postman/.dependencies/`, and the member's `path:` points there; `-w\n  <workspace>` resolves a name from the workspace that owns it.\n- **Prefix each mock's `pm.state` keys with its name.** As of CLI 1.73.0,\n  members of a local run read each other's keys, so two mocks storing\n  `orders` overwrite each other.\n\n## Running it\n\nThe run is a server that never exits, so a foreground command never returns.\nStart it in the background, its log in a file:\n\n```bash\npostman simulation run postman/simulations/checkout-dev.sim.yaml --proxy --output ndjson > sim.ndjson 2> sim.err &\n```\n\n`--proxy` is how to run it unless something below rules it out: nothing about\nthe code changes for the run — not a base URL, not a config file, not an SDK's\nbuilt-in host — and because nothing the proxy answers for has to resolve, an\ninternal hostname with no DNS record works.\n\nIt's up when `sim.ndjson` has a `listening` event; a start-up error is in\n`sim.err`, a busy proxy port among them. Stop it with\n`pkill -INT -f \"simulation run .*<file>.sim.yaml\"`. Nothing reloads: restart\nit after a mock edit.\n\nRead `postman simulation run --help` before driving it. The flags, what the\ncaller's own process needs in order to reach the proxy, and what to do about a\nclient that ignores it are all there and change with the CLI, so take them\nfrom the command rather than from here.\n\nWhat decides whether a proxied run proves anything is `origin:`. A member with\nnone in the `.sim.yaml` is never matched, so its traffic reaches the real\nservice and a run can come up having intercepted nothing — `simulation create`\ncopies that field from the mock's manifest, so editing the manifest alone\nwon't fix it ([reference/sim_yaml_schema.md](reference/sim_yaml_schema.md)).\n\n## Running it on one port instead\n\n`--port` puts every member on one local port, each addressable by its routeKey,\nwith the code under test pointed at that port. Reach for it when a client has\nno proxy setting to honour, and when you want to address a member yourself —\neach one keeps a stable URL for the whole run, so a mock's control routes and\nits individual responses are a curl away.\n\n## Reading the log\n\nA passing test command doesn't show the dependency path ran: read\n`sim.ndjson`. A member with no `request` events isn't wired or isn't on this\npath. Some answers come from the simulation itself and mean wiring, not code:\n\n- `404 Unknown simulation member`, on a one-port run: a base URL lost its\n  routeKey, or a client sent the wrong `x-mock-slug`.\n- `501`, or a generated mock's `404 Endpoint not defined`: a call the mock\n  doesn't model yet.\n- `502 Proxy error`: the member's process died, usually an async throw in a\n  mock without `interceptRequests: true`. It stays down and logs nothing\n  until you restart; run that mock alone with `postman mock run` to see why.\n\n## When a dependency goes down\n\nChoose failures from the outcome the user needs to understand. A failure\nbefore a write, a timeout after a write may have completed, and a failure\nduring compensation can expose different risks: lost work, duplicate writes\nor unreleased resources. Read the caller to identify relevant paths, then\nexercise the ones whose runtime behavior remains uncertain.\n\nIsolating one failure helps attribute the result. Combine failures or model\npartial completion when the question depends on their interaction. The\ninjection must represent the event being investigated: delaying a response\nalone does not establish whether a write completed before the timeout.\nExamples of available techniques:\n\n- **Unreachable:** point its base URL at a port nothing listens on. This one\n  needs the one-port run, since under `--proxy` the base URLs are the point.\n- **Hanging:** give its member a `latency` condition longer than the\n  client's timeout. If the client sets none, that is the finding: Node's\n  `fetch` waits about five minutes, so say so rather than wait it out.\n- **An error with a JSON body:** the `error` condition.\n- **An error with an HTML body,** as proxies send: a copy of its mock whose\n  default handler answers `500` with HTML. No condition can do this.\n\nOnly `overrides.conditions` on a member change it. Members always serve\ntheir default handler and ignore `x-mock-scenario`, and a `scenarios` entry\nwith just a `path`, as the Postman app writes, does nothing. Fields and the\nother conditions are in [reference/sim_yaml_schema.md](reference/sim_yaml_schema.md). An injected\nfailure never reaches the mock and isn't logged, so judge it by what the\ncaller did, and check the other members' logs for side effects, such as\nstock reserved and never released.\n\n## Its context document\n\nEvery simulation is created with a `<name>.context.yaml` beside it, holding\nwhat the code is believed to rely on about the dependencies it calls — who the\ncaller is taken to be, which plan or permission is assumed, the order calls go\nin, what gets retried, the shape of the data — and what each belief rests on.\nThe `.sim.yaml` says what the simulation is, not what the services it stands in\nfor do, so this is the record that saves a session the search.\n\nRead relevant claims before investigating the dependencies, and assess whether\ntheir evidence still applies to this task. Write what you established back\ninto the document before you finish. Each claim carries a `status`,\nthe `reason` the evidence adds up to it, the `verification` that was done and\nwhat it showed, and a `source` to re-check it against, so the next session can\ntell a claim a contract promises from one a request actually demonstrated.\nPreserve existing claims and their evidence when updating the file, including\nunresolved assumptions and historical findings. Its fixed schema and guidance\non evidence and reuse are in\n[reference/context_file.md](reference/context_file.md); read that before\nwriting to it.\n\n## Keeping it\n\nCommit your own mocks, the `.sim.yaml`, its context document and what\n`postman dependency add` changed, so the next session or CI reruns it in one\ncommand. Don't commit\n`postman/.dependencies/`: a copy goes stale when its owner updates theirs,\nand `postman dependency install` restores it. Don't commit `sim.ndjson`: the\nCLI redacts common auth headers and fields, but other headers and bodies are\nlogged as sent. In CI, `postman dependency install` needs `POSTMAN_API_KEY`,\nand `postman collection run <collection> --simulation <file> --port <n>`\nstarts and stops the simulation around a collection run.\n\n`postman simulation push` uploads every member to the workspace, so ask\nfirst. It fails on a pulled member, which keeps its owner's `id:`; copy it to\n`postman/mocks/` and delete that line.\n\n## Rules\n\n1. **What you're testing is never a member.** It must run for real, or the\n   test only proves the mock.\n2. **Pull the owner's mock even if it's deployed.** Only members take\n   conditions and appear in the log, and a private mock server wants a key\n   your code won't send.\n3. **`simulation deploy` is public by default,** unlike `mock deploy`. Ask\n   before deploying without `--private`; a local run needs no deploy.\n\n## Before you say it works\n\nClaim a simulation passes only after the code under test ran and you observed\nthe expected response or state change. Use its calls in the log to confirm\nthe dependency path was exercised; for injected failures, use the caller\noutcomes described above. If startup failed or the relevant path never ran,\nreport that limitation. Say what a pass proves,\nyour code against these stand-ins rather than the real services, what still\nneeds the real service before release, and where each mock came from,\nincluding when you skipped the owner's.\n\nThen write what you established back into `<name>.context.yaml`, so the next\nsession starts where this one ended. Add or update claims that help a later\nsession reuse the findings. For each claim the run settled or contradicted,\nupdate its `status`, the `verification` that was done and the `source` to\nre-check it against. Scope what you claim to what you actually\nexercised — \"held in the scenarios run\" rather than \"works\" — since the record\nis read later as evidence, and the two don't mean the same thing.\n[reference/context_file.md](reference/context_file.md) has what each field is\nfor.\n"
Full snapshot data
{
  "description": "Runs services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors (\"what happens to a booking if the email service is down?\"), by exercising relevant failures and observing caller outcomes. Applies even when nobody says mock or simulation, and a `postman/simulations/` directory in the repository is itself a reason to load this before changing code it covers. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`.",
  "included_files": [
    {
      "relative_path": "reference/context_file.md",
      "size_in_bytes": 10413
    },
    {
      "relative_path": "reference/sim_yaml_schema.md",
      "size_in_bytes": 3835
    }
  ],
  "name": "api-simulation",
  "skill_md_contents": "---\nname: api-simulation\ndescription: Runs services, frontends, tests or demos against stand-ins for their HTTP dependencies, served as one environment locally or at a deployed URL. Use when you add or change code that calls other services and need to run it, test it, prove a fix or reproduce an upstream failure (timeouts, 5xx, 409, 429) end to end, locally or in CI, without the real services because they're unreachable, need credentials, cost money, have side effects or don't exist yet. Also answers what happens to a request, or to the data it writes, when a service it calls goes down, is slow or returns errors (\"what happens to a booking if the email service is down?\"), by exercising relevant failures and observing caller outcomes. Applies even when nobody says mock or simulation, and a `postman/simulations/` directory in the repository is itself a reason to load this before changing code it covers. To give a frontend or another team a stand-in for an API, use api-mocking. Covers `postman simulation`.\n---\n\n# API Simulation\n\nSimulation lets you control how dependencies behave and explore how your code\nresponds to different outcomes. This makes it easier to test assumptions\nrepeatedly without real calls changing data, spending money, or notifying\nsomeone. Simulation context records those assumptions, the evidence supporting\nthem, and what remains unknown. As sessions build on this context, it helps\nsurface incorrect assumptions and avoid repeated investigation.\n\nTogether, the simulation and its context provide a place to explore changes\nand identify what still needs validation against the real dependencies.\n\nCheck whether an existing simulation in `postman/simulations/` covers the\ndependency interactions relevant to the task. Reusing its mocks and wiring\ncan avoid rebuilding an environment; extend it only where the behavior you\nneed to exercise is missing.\n\nThe `<name>.context.yaml` beside a simulation records those assumptions, their\nsupporting evidence, and unresolved questions so later sessions can build on\nearlier findings. For example, a timeout from `/payments` does not establish\nwhether the payment failed or completed before the response arrived. The\ncontext file will document what has been established about the real provider\nand identify what still needs verification.\n\nA simulation serves several mocks as one environment: by default behind a\nproxy that answers for the dependencies' own hostnames, so the code under test\nkeeps the base URLs it ships with, or on one local port where each member is\nreached by its routeKey.\n\nSimulation adds value when the result depends on real HTTP behavior, such as\nclient configuration, serialization, timeouts or retries, and the real\ndependencies are unavailable or unsuitable for the exercise. Stubbing the\nHTTP client can bypass those behaviors. Choose verification that exercises\nwhat matters to the task: an existing test may already answer a local logic\nquestion, while a claim about the provider may need its contract or a real\nservice check. A simulation's log shows what each stand-in was asked.\n\nDefine the expected outcome and what observation would distinguish correct\nfrom incorrect behavior, including side effects when relevant. A request\nthrough the changed path shows that it ran; its response and resulting state\ndetermine whether the expectation held. Choose boundary and failure cases\nfrom the behavior changed and the consequences of getting it wrong.\n\n`postman simulation` needs CLI 1.70.0 or later (`postman --version`; an older\nCLI answers `postman simulation -h` with its general help).\n\n## Building it\n\n- **Members are the code's HTTP dependencies.** Databases, queues and caches\n  aren't; run them locally. **api-discovery** can find calls made through\n  shared code; ask about the repo by its `git remote` name, because a close\n  name matches another repo.\n- **Each member needs a mock: see `api-mocking`,** which looks for the owning\n  team's published mock before building one. For a question, one built from\n  the contract will do; one that invents responses can send the caller down a\n  path the real service never would. In a mock you build, answer `501` for calls this path\n  doesn't make: a `404` reads to the caller like a real \"not found\".\n- **Bring in each mock you don't own as a dependency first, then build the\n  simulation over them.** `postman dependency add mock <name-or-id>` declares\n  it in `.postman/resources.yaml` and materialises it under\n  `postman/.dependencies/`, and the member's `path:` points there; `-w\n  <workspace>` resolves a name from the workspace that owns it.\n- **Prefix each mock's `pm.state` keys with its name.** As of CLI 1.73.0,\n  members of a local run read each other's keys, so two mocks storing\n  `orders` overwrite each other.\n\n## Running it\n\nThe run is a server that never exits, so a foreground command never returns.\nStart it in the background, its log in a file:\n\n```bash\npostman simulation run postman/simulations/checkout-dev.sim.yaml --proxy --output ndjson > sim.ndjson 2> sim.err &\n```\n\n`--proxy` is how to run it unless something below rules it out: nothing about\nthe code changes for the run — not a base URL, not a config file, not an SDK's\nbuilt-in host — and because nothing the proxy answers for has to resolve, an\ninternal hostname with no DNS record works.\n\nIt's up when `sim.ndjson` has a `listening` event; a start-up error is in\n`sim.err`, a busy proxy port among them. Stop it with\n`pkill -INT -f \"simulation run .*<file>.sim.yaml\"`. Nothing reloads: restart\nit after a mock edit.\n\nRead `postman simulation run --help` before driving it. The flags, what the\ncaller's own process needs in order to reach the proxy, and what to do about a\nclient that ignores it are all there and change with the CLI, so take them\nfrom the command rather than from here.\n\nWhat decides whether a proxied run proves anything is `origin:`. A member with\nnone in the `.sim.yaml` is never matched, so its traffic reaches the real\nservice and a run can come up having intercepted nothing — `simulation create`\ncopies that field from the mock's manifest, so editing the manifest alone\nwon't fix it ([reference/sim_yaml_schema.md](reference/sim_yaml_schema.md)).\n\n## Running it on one port instead\n\n`--port` puts every member on one local port, each addressable by its routeKey,\nwith the code under test pointed at that port. Reach for it when a client has\nno proxy setting to honour, and when you want to address a member yourself —\neach one keeps a stable URL for the whole run, so a mock's control routes and\nits individual responses are a curl away.\n\n## Reading the log\n\nA passing test command doesn't show the dependency path ran: read\n`sim.ndjson`. A member with no `request` events isn't wired or isn't on this\npath. Some answers come from the simulation itself and mean wiring, not code:\n\n- `404 Unknown simulation member`, on a one-port run: a base URL lost its\n  routeKey, or a client sent the wrong `x-mock-slug`.\n- `501`, or a generated mock's `404 Endpoint not defined`: a call the mock\n  doesn't model yet.\n- `502 Proxy error`: the member's process died, usually an async throw in a\n  mock without `interceptRequests: true`. It stays down and logs nothing\n  until you restart; run that mock alone with `postman mock run` to see why.\n\n## When a dependency goes down\n\nChoose failures from the outcome the user needs to understand. A failure\nbefore a write, a timeout after a write may have completed, and a failure\nduring compensation can expose different risks: lost work, duplicate writes\nor unreleased resources. Read the caller to identify relevant paths, then\nexercise the ones whose runtime behavior remains uncertain.\n\nIsolating one failure helps attribute the result. Combine failures or model\npartial completion when the question depends on their interaction. The\ninjection must represent the event being investigated: delaying a response\nalone does not establish whether a write completed before the timeout.\nExamples of available techniques:\n\n- **Unreachable:** point its base URL at a port nothing listens on. This one\n  needs the one-port run, since under `--proxy` the base URLs are the point.\n- **Hanging:** give its member a `latency` condition longer than the\n  client's timeout. If the client sets none, that is the finding: Node's\n  `fetch` waits about five minutes, so say so rather than wait it out.\n- **An error with a JSON body:** the `error` condition.\n- **An error with an HTML body,** as proxies send: a copy of its mock whose\n  default handler answers `500` with HTML. No condition can do this.\n\nOnly `overrides.conditions` on a member change it. Members always serve\ntheir default handler and ignore `x-mock-scenario`, and a `scenarios` entry\nwith just a `path`, as the Postman app writes, does nothing. Fields and the\nother conditions are in [reference/sim_yaml_schema.md](reference/sim_yaml_schema.md). An injected\nfailure never reaches the mock and isn't logged, so judge it by what the\ncaller did, and check the other members' logs for side effects, such as\nstock reserved and never released.\n\n## Its context document\n\nEvery simulation is created with a `<name>.context.yaml` beside it, holding\nwhat the code is believed to rely on about the dependencies it calls — who the\ncaller is taken to be, which plan or permission is assumed, the order calls go\nin, what gets retried, the shape of the data — and what each belief rests on.\nThe `.sim.yaml` says what the simulation is, not what the services it stands in\nfor do, so this is the record that saves a session the search.\n\nRead relevant claims before investigating the dependencies, and assess whether\ntheir evidence still applies to this task. Write what you established back\ninto the document before you finish. Each claim carries a `status`,\nthe `reason` the evidence adds up to it, the `verification` that was done and\nwhat it showed, and a `source` to re-check it against, so the next session can\ntell a claim a contract promises from one a request actually demonstrated.\nPreserve existing claims and their evidence when updating the file, including\nunresolved assumptions and historical findings. Its fixed schema and guidance\non evidence and reuse are in\n[reference/context_file.md](reference/context_file.md); read that before\nwriting to it.\n\n## Keeping it\n\nCommit your own mocks, the `.sim.yaml`, its context document and what\n`postman dependency add` changed, so the next session or CI reruns it in one\ncommand. Don't commit\n`postman/.dependencies/`: a copy goes stale when its owner updates theirs,\nand `postman dependency install` restores it. Don't commit `sim.ndjson`: the\nCLI redacts common auth headers and fields, but other headers and bodies are\nlogged as sent. In CI, `postman dependency install` needs `POSTMAN_API_KEY`,\nand `postman collection run <collection> --simulation <file> --port <n>`\nstarts and stops the simulation around a collection run.\n\n`postman simulation push` uploads every member to the workspace, so ask\nfirst. It fails on a pulled member, which keeps its owner's `id:`; copy it to\n`postman/mocks/` and delete that line.\n\n## Rules\n\n1. **What you're testing is never a member.** It must run for real, or the\n   test only proves the mock.\n2. **Pull the owner's mock even if it's deployed.** Only members take\n   conditions and appear in the log, and a private mock server wants a key\n   your code won't send.\n3. **`simulation deploy` is public by default,** unlike `mock deploy`. Ask\n   before deploying without `--private`; a local run needs no deploy.\n\n## Before you say it works\n\nClaim a simulation passes only after the code under test ran and you observed\nthe expected response or state change. Use its calls in the log to confirm\nthe dependency path was exercised; for injected failures, use the caller\noutcomes described above. If startup failed or the relevant path never ran,\nreport that limitation. Say what a pass proves,\nyour code against these stand-ins rather than the real services, what still\nneeds the real service before release, and where each mock came from,\nincluding when you skipped the owner's.\n\nThen write what you established back into `<name>.context.yaml`, so the next\nsession starts where this one ended. Add or update claims that help a later\nsession reuse the findings. For each claim the run settled or contradicted,\nupdate its `status`, the `verification` that was done and the `source` to\nre-check it against. Scope what you claim to what you actually\nexercised — \"held in the scenarios run\" rather than \"works\" — since the record\nis read later as evidence, and the two don't mean the same thing.\n[reference/context_file.md](reference/context_file.md) has what each field is\nfor.\n"
}

SHA-256 of public snapshot: e4d350e3d8ca157e77d69021a0f0b0258f16b331278d58499254fb22dd0dd7cc