From qaas
Write a valid QaaS mocker YAML (Servers/Stubs/Controller) that serves stubbed HTTP responses.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qaas:author-mocker-yamlWhen to use
When a task needs a mock HTTP server with configurable stub responses for a runner test.
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use when you must produce a `.mocker.yaml` that boots a QaaS.Mocker HTTP server with at least one stub.
Use when you must produce a .mocker.yaml that boots a QaaS.Mocker HTTP server with at least one stub.
Servers:
- Http:
Port: 8080 # unique across all servers; duplicates = fail-fast (FB s03)
# IsLocalhost: false # omit or false → binds 0.0.0.0; true → 127.0.0.1 only (BAD in Docker)
Endpoints:
- Path: /hello # Path on Mocker side HAS the leading slash (FB s03). ALL-LOWERCASE — mocker lowercases this but matches the request case-sensitively (FB s13#5b)
Actions:
- Name: HelloOk
Method: Get # Get|Post|Put|Delete|Head|Options|Patch|Trace|Connect (FB s03)
TransactionStubName: HelloStub
Path on Endpoints uses a leading slash; Route in runner YAML does NOT (FB s13#5).Path: and the runner Route: — the mocker lowercases the configured Path then matches the request path case-sensitively, so Path: /myRoute + Route: myRoute → 404 (FB s13#5b).TransactionStubName.Stubs:
- Name: HelloStub
Processor: StaticResponseProcessor # simple class name (FB s03)
ProcessorConfiguration: # NEVER TransactionData (FB s13#1)
Body: hello
StatusCode: 200
ContentType: "text/plain; charset=utf-8"
ProcessorConfiguration is the only correct key. Using TransactionData produces:
Property TransactionData in path Stubs:0 - not found in TransactionStubConfig object (FB s13#1).QaaS.Common.Processors — see references/processors-summary.md.Built 4 transaction stub(s) including default not-found and internal-error stubs (FB s03, LAB L5).DataSources:
- Name: MyData
Generator: FromFileSystem
GeneratorConfiguration:
DataArrangeOrder: AsciiAsc
FileSystem: { Path: TestData }
Reference in stub: DataSourceNames: [MyData] inside the Stubs entry (FB s03).
Controller:
ServerName: HelloMocker # byte-match with Runner MockerCommands[].ServerName (FB s03, LAB L6)
Redis:
Host: "127.0.0.1:6379" # single "host:port" string (FB s14#7, LAB L6)
Boot log when configured: Initialized Redis controller for server 'HelloMocker' with instance id '...'
and Started control handler 'CommandHandler' ... 'runner-to-mocker:command:hellomocker:<id>' (FB s13#11, LAB L6).
When omitted: Controller startup skipped because 'Controller.ServerName' is not configured (LAB L5).
Servers:
- Http:
Port: 8080
Endpoints:
- Path: /hello
Actions:
- Name: HelloOk
Method: Get
TransactionStubName: HelloStub
Stubs:
- Name: HelloStub
Processor: StaticResponseProcessor
ProcessorConfiguration:
Body: hello
StatusCode: 200
ContentType: "text/plain; charset=utf-8"
Start: dotnet run --project Mocker -- run hello.mocker.yaml. Requires QaaS.Common.Processors in csproj.
Controller:
ServerName: HelloMocker
Redis: {Host: "127.0.0.1:6379"}
Runner side adds MockerCommands[].ServerName: HelloMocker and Redis: {Host: "127.0.0.1:6379"}.
dotnet run --project Mocker -- template hello.mocker.yaml # exit 0, no unknown-property warnings
dotnet run --project Mocker -- run hello.mocker.yaml # wait for "HTTP Server started"
curl.exe http://127.0.0.1:8080/hello # body: hello, status: 200
Expected startup log: HTTP Server started. Listening on http://0.0.0.0:8080 (LAB L3).
| # | Trap | Fix |
|---|---|---|
| s13#1 | TransactionData: key | Use ProcessorConfiguration: |
| s13#5 | Runner Route:/hello → //hello → 404 | Runner Route has NO leading slash; Mocker Path /hello is correct |
| s13#7 | Dockerfile runtime:10.0 → "Microsoft.AspNetCore.App not found" | Use aspnet:10.0 |
| s13#8 | Missing QaaS.Common.Processors → FTL + exit -532462766 | Add PackageReference |
| s13#11 | Docs claim Controller channel ready: HelloMocker | Real logs differ — see step 4 |
| LAB L6 | IsLocalhost:true in Docker container | Omit or set false → binds 0.0.0.0 |
Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub eldarush/qaas-copilot --plugin qaas