pikku-rpc

Enable typed RPC calls between Pikku functions with generated clients.

56|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/pikkujs/pikku --skill pikku-rpc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pikku-rpc
Source: https://github.com/pikkujs/pikku/tree/main/.claude/skills/pikku-rpc
Command: npx skills add https://github.com/pikkujs/pikku --skill pikku-rpc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enable internal Pikku function calls via a typed RPC layer that enforces contracts and enables safe cross-function orchestration.

Core Features & Use Cases

  • Typed RPC surface: invoke, remote, and expose functions across Pikku packages with strong typing.
  • Function composition: compose business logic by chaining calls through RPC boundaries.
  • Generated RPC client: consume a generated client to call exposed functions from other packages.
  • Practical scenarios: coordinate multi-function workflows while keeping concerns decoupled and type-safe.

Quick Start

Invoke an internal Pikku function via rpc.invoke to orchestrate business logic.

Frequently Asked Questions about pikku-rpc

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

FAQPage Schema
How do I make typed internal function calls across different Pikku packages?

You achieve typed internal function calls across Pikku packages by using a typed RPC layer that enforces contracts. This allows you to safely invoke and orchestrate functions across package boundaries with strong type safety.

What is the best way to expose RPC endpoints for function composition in Pikku?

The best way to expose RPC endpoints for function composition is by using the exposed method specification to define RPC methods like invoke, remote, and startWorkflow. This enables type-safe function composition by chaining calls through RPC boundaries.

How does a generated RPC client work with exposed Pikku functions?

A generated RPC client consumes exposed Pikku functions by calling them from other packages with strong typing. This mechanism allows you to coordinate multi-function workflows while keeping concerns decoupled and type-safe.

Can I integrate wire.rpc with Pikku function calls for cross-package orchestration?

Yes, you can integrate wire.rpc with Pikku function calls to orchestrate cross-package workflows. The typed RPC layer supports wire.rpc integration to invoke remote functions and compose business logic across boundaries safely.

Does Pikku RPC support starting workflows across decoupled functions?

Yes, Pikku RPC supports starting workflows across decoupled functions through the startWorkflow method. This allows you to coordinate multi-function workflows while keeping concerns decoupled and maintaining type safety.

When do I need a typed RPC layer for internal function composition?

You need a typed RPC layer when composing business logic requires chaining calls across Pikku packages. It enforces contracts and enables safe cross-function orchestration, ensuring type safety across RPC boundaries.