Validate server responses against the contract schema.
Scanned 9/12/2026
Install to Claude Code
npx -y skills add ali-master/skills --skill orpc-response-validation --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Orpc Response Validation?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/ali-master-orpc-response-validation)More formats (shields.io, HTML) on the badges page.
---
name: oRPC Response Validation Plugin
description: Validate server responses against the contract schema.
license: MIT
metadata:
author: Ali Torki
homepage: https://github.com/ali-master
version: "1.0.0"
---
# Response Validation Plugin
Validates server responses against your contract schema, ensuring data matches the expected types.
> Best suited for [Contract-First Development](/docs/contract-first/define-contract). [Minified Contract](/docs/contract-first/router-to-contract#minify-export-the-contract-router-for-the-client) is **not supported**.
## Setup
```ts
import { RPCLink } from '@orpc/client/fetch'
import { ResponseValidationPlugin } from '@orpc/contract/plugins'
const link = new RPCLink({
url: 'http://localhost:3000/rpc',
plugins: [
new ResponseValidationPlugin(contract),
],
})
const client: ContractRouterClient<typeof contract> = createORPCClient(link)
```
## Limitations
Schemas that transform data into different types than the expected schema types are not supported.
```ts
// Unsupported:
const unsupported = z.number().transform(value => value.toString())
```
The server transforms `number` to `string`, but the client receives a `string` that no longer matches the schema, causing validation to fail.
## Advanced Usage
Also useful for [Expanding Type Support for OpenAPI Link](/docs/openapi/advanced/expanding-type-support-for-openapi-link).
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!