Back to skills
SKILL.md
Orpc Dynamic Link
ASecurityDynamically switch between multiple oRPC's links.
- 8 stars
- 0 votes
- 0 copies
- 0 views
- Added September 12, 2026
Works with
Security analysis
100/100npx -y skills add ali-master/skills --skill orpc-dynamic-link --agent claude-codeAre you the author of Orpc Dynamic Link?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ali-master-orpc-dynamic-link)---
name: oRPC DynamicLink
description: Dynamically switch between multiple oRPC's links.
license: MIT
metadata:
author: Ali Torki
homepage: https://github.com/ali-master
version: "1.0.0"
---
# DynamicLink
`DynamicLink` lets you dynamically choose between different oRPC links based on your client context.
## Example
```ts
import { createORPCClient, DynamicLink } from '@orpc/client'
interface ClientContext {
cache?: boolean
}
const cacheLink = new RPCLink({
url: 'https://cache.example.com/rpc',
})
const noCacheLink = new RPCLink({
url: 'https://example.com/rpc',
})
const link = new DynamicLink<ClientContext>((options, path, input) => {
if (options.context?.cache) {
return cacheLink
}
return noCacheLink
})
const client: RouterClient<typeof router, ClientContext> = createORPCClient(link)
```
> Any oRPC link is supported, not limited to `RPCLink`.
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.