Back to skills
SKILL.md
Orpc Implement Contract
ASecurityImplement a contract for contract-first development in oRPC.
- 8 stars
- 0 votes
- 0 copies
- 1 view
- Added September 12, 2026
Security analysis
96/100- Installs packages at runtime which could introduce malicious dependencies
npx -y skills add ali-master/skills --skill orpc-implement-contract --agent claude-codeAre you the author of Orpc Implement Contract?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ali-master-orpc-implement-contract)---
name: oRPC Implement Contract
description: Implement a contract for contract-first development in oRPC.
license: MIT
metadata:
author: Ali Torki
homepage: https://github.com/ali-master
version: "1.0.0"
---
# Implement Contract
After defining your contract, implement it in your server code. oRPC enforces your contract at runtime.
## Installation
```sh
npm install @orpc/server@latest
```
## The Implementer
The `implement` function converts your contract into an implementer instance.
```ts
import { implement } from '@orpc/server'
const os = implement(contract) // fully replaces the os from @orpc/server
```
## Implementing Procedures
```ts
export const listPlanet = os.planet.list
.handler(({ input }) => {
return []
})
```
## Building the Router
```ts
const router = os.router({
planet: {
list: listPlanet,
find: findPlanet,
create: createPlanet,
},
})
```
## Full Implementation Example
```ts
const os = implement(contract)
export const listPlanet = os.planet.list
.handler(({ input }) => [])
export const findPlanet = os.planet.find
.handler(({ input }) => ({ id: 123, name: 'Planet X' }))
export const createPlanet = os.planet.create
.handler(({ input }) => ({ id: 123, name: 'Planet X' }))
export const router = os.router({
planet: {
list: listPlanet,
find: findPlanet,
create: createPlanet,
},
})
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.