orpc-context

Create type-safe dependency injection contexts for oRPC server procedures and middleware.

8|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ali-master/skills --skill orpc-context
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orpc-context
Source: https://github.com/ali-master/skills/tree/main/skills/orpc-context
Command: npx skills add https://github.com/ali-master/skills --skill orpc-context

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the creation of type-safe dependency injection patterns in oRPC, enabling developers to easily manage and reuse code in their applications.

Core Features & Use Cases

  • Type-safe Context Management: Offers a structured way to handle dependencies in oRPC applications.
  • Middleware Support: Integrates with middleware to dynamically manage context during procedure execution.
  • Initial and Execution Contexts: Provides both initial and execution contexts to support various use cases.

Quick Start

Implement dependency injection in your oRPC application by creating an initial context with required dependencies.

Frequently Asked Questions about orpc-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up type-safe dependency injection in oRPC?

Type-safe dependency injection in oRPC is set up by creating an initial context object with required dependencies. This structured context manages dependencies and supports reuse across server-side procedures and middleware.

What is the difference between initial and execution contexts in oRPC?

Initial context establishes base dependencies for oRPC applications, while execution context dynamically manages dependencies during procedure execution. Both contexts support type safety and integrate with middleware for different use cases.

Can I use oRPC middleware to manage dependencies dynamically?

Yes, oRPC middleware integrates with dependency injection to dynamically manage context during procedure execution. This allows dependencies to be resolved and injected dynamically as requests move through the middleware pipeline.

When do I need context management for oRPC server-side procedures?

Context management is needed for oRPC server-side procedures when you must handle dependencies type-safely. It provides a structured way to inject and reuse required dependencies across multiple procedures without losing type safety.

What is the best way to handle shared dependencies in an oRPC application?

The best way to handle shared dependencies is using a type-safe initial context. This approach simplifies dependency injection by structuring shared resources in a base context that propagates type-safely through middleware to procedures.

Why does my oRPC context lose type safety when passing dependencies?

Type safety is lost when context objects are not properly set up for dependency injection. Defining structured initial and execution contexts ensures that dependencies passed through middleware to procedures retain their type safety.