Skip to content
Back to skills

Orpc Response Validation

ASecurity

Validate server responses against the contract schema.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 12, 2026
businessgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-response-validation --agent claude-code

Installs 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 with every re-scan.

Security grade badge for Orpc Response Validation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-response-validation/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-response-validation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.