reviewing-restate-handlers

Audit Restate handler code for incorrect context usage in Run closures.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/RiemaLabs/unkey --skill reviewing-restate-handlers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reviewing-restate-handlers
Source: https://github.com/RiemaLabs/unkey/tree/main/.agents/skills/reviewing-restate-handlers
Command: npx skills add https://github.com/RiemaLabs/unkey --skill reviewing-restate-handlers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps prevent subtle bugs and determinism issues in Restate handlers by identifying incorrect usage of the Restate context within specific closure types.

Core Features & Use Cases

  • Context Misuse Detection: Identifies when the outer Restate context is incorrectly used inside restate.Run, restate.RunVoid, or restate.RunAsync closures.
  • Code Auditing: Essential for reviewing Restate handler code, ensuring adherence to best practices for deterministic replay.
  • Use Case: When reviewing new or modified Restate worker service code, use this Skill to automatically flag any potential violations of Restate's context usage rules, preventing runtime errors.

Quick Start

Review the Restate handler code in svc/ctrl/worker/ for incorrect context usage.

Frequently Asked Questions about reviewing-restate-handlers

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

FAQPage Schema
Why does my Restate handler break determinism during replay?

Restate handler determinism breaks when the outer Restate context is incorrectly used for service calls or state access inside restate.Run, restate.RunVoid, or restate.RunAsync closures. These operations must remain outside closures to ensure deterministic replay.

How do I audit Restate handler code for incorrect context usage?

Audit Restate handler code by scanning for service calls, state access, and other Restate operations nested within restate.Run, restate.RunVoid, or restate.RunAsync closures. Identifying these violations prevents runtime errors and maintains deterministic replay.

What Restate operations should not be nested inside restate.Run closures?

Service calls, state access, and other Restate context operations should not be nested inside restate.Run, restate.RunVoid, or restate.RunAsync closures. Using the outer Restate context within these closures violates determinism rules and causes subtle bugs.

Can I use this to review Restate worker service code in any Go directory?

This Skill audits Restate handler code specifically within the svc/ctrl/worker/ directory. It checks Go code for incorrect Restate context usage inside closures, ensuring adherence to best practices for deterministic replay in that target path.

What is the best way to prevent Restate context misuse in Go handlers?

The best way to prevent Restate context misuse is automated code auditing that flags service calls and state access inside restate.Run, restate.RunVoid, or restate.RunAsync closures. This catches determinism violations before runtime errors occur.

When should I avoid using the Restate context inside restate.RunAsync?

You should always avoid using the outer Restate context for state access or service calls inside restate.RunAsync, restate.Run, and restate.RunVoid closures. Nesting these operations breaks determinism guarantees required for consistent Restate handler replay.