cf-worker-rpc-turbo

Configure WorkerRef/WorkerStub RPCs with cycle-free imports in Cloudflare worker monorepos.

10|Updated May 22, 2025
One-click install
npx skills add https://github.com/firtoz/cf-multiworker-starter-kit --skill cf-worker-rpc-turbo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cf-worker-rpc-turbo
Source: https://github.com/firtoz/cf-multiworker-starter-kit/tree/main/agents/skills/cf-worker-rpc-turbo
Command: npx skills add https://github.com/firtoz/cf-multiworker-starter-kit --skill cf-worker-rpc-turbo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cross-package RPC typing, export wiring, and Turbo-cycle avoidance for Cloudflare worker monorepos.

Core Features & Use Cases

  • Typing-based WorkerRef/WorkerStub RPCs across workers and durable objects without import-time cycles.
  • Centralized exports and aligned wrappers to prevent circular dependencies in Turbo.
  • Root dev/destroy wiring guidance to ensure proper startup and teardown order in a monorepo.

Quick Start

Configure a new Worker RPC package and run the root dev workflow to verify proper wiring and cycle-free imports.

Frequently Asked Questions about cf-worker-rpc-turbo

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

FAQPage Schema
How do I set up cross-worker RPC typing in a Cloudflare monorepo without creating import cycles?

Apply type-only WorkerRef and WorkerStub exports to ensure cross-package imports remain cycle-free. This enforces env-free rules and correct package re-exports to align with Turbo monorepo constraints.

What's the best way to avoid Turbo cycles when wiring Cloudflare workers and durable objects?

Use centralized exports and aligned wrappers to prevent circular dependencies between workers and durable objects. This ensures proper root dev and destroy wiring for startup and teardown order.

Why does my Turbo monorepo build fail with circular dependencies when adding Cloudflare worker RPCs?

Standard imports between workers create circular dependencies. Enforce type-only exports and apply WorkerRef or WorkerStub patterns to keep cross-package imports strictly cycle-free.

Do I need to configure root dev and destroy workflows for Cloudflare worker RPC packages?

Yes, configuring root dev and destroy workflows verifies proper wiring and ensures correct startup and teardown order. Running the root dev workflow validates that cross-package imports are cycle-free.

Can I use WorkerRef and WorkerStub for RPCs across both Cloudflare workers and durable objects?

Yes, apply WorkerRef and WorkerStub to define RPCs across both Cloudflare workers and durable objects. This typing-based approach ensures cross-package communication remains strongly typed and cycle-free.