Skip to content
Back to skills

Orpc Implement Contract

ASecurity

Implement a contract for contract-first development in oRPC.

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

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-implement-contract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Implement Contract?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Implement Contract
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-implement-contract/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-implement-contract)

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 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

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.