KS
Killer-Skills

reviewing-restate-handlers — how to use reviewing-restate-handlers how to use reviewing-restate-handlers, what is reviewing-restate-handlers, reviewing-restate-handlers alternative, reviewing-restate-handlers vs restate, reviewing-restate-handlers install, reviewing-restate-handlers setup guide, restate handler code audit, deterministic replay in restate

v1.0.0
GitHub

About this Skill

Perfect for Modern API Agents needing advanced restate handler auditing and deterministic code analysis. reviewing-restate-handlers is a skill that audits restate handler code for deterministic replay, ensuring correct usage of restate context inside closures.

Features

Audits restate handler code for deterministic replay
Ensures outer restate context is not used inside restate.Run closures
Supports restate.RunVoid and restate.RunAsync functions
Wraps non-deterministic side effects into a single journaled step
Ensures correct usage of restate context inside closures

# Core Topics

unkeyed unkeyed
[0]
[0]
Updated: 3/7/2026

Quality Score

Top 5%
54
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add unkeyed/unkey/reviewing-restate-handlers

Agent Capability Analysis

The reviewing-restate-handlers MCP Server by unkeyed is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use reviewing-restate-handlers, what is reviewing-restate-handlers, reviewing-restate-handlers alternative.

Ideal Agent Persona

Perfect for Modern API Agents needing advanced restate handler auditing and deterministic code analysis.

Core Value

Empowers agents to ensure the outer restate context is never used inside restate.Run, restate.RunVoid, or restate.RunAsync closures, guaranteeing deterministic replay and benefiting developers working with Modern APIs using restate journals and non-deterministic side effects like DB queries and HTTP calls.

Capabilities Granted for reviewing-restate-handlers MCP Server

Auditing restate handler code for deterministic replay
Debugging non-deterministic side effects in restate.Run closures
Validating restate context usage inside restate.RunVoid and restate.RunAsync functions

! Prerequisites & Limits

  • Requires access to restate handler code
  • Limited to restate journals and Modern API interactions
Project
SKILL.md
3.8 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Reviewing Restate Handlers

Audit restate handler code to ensure the outer restate context is never used inside restate.Run, restate.RunVoid, or restate.RunAsync closures.

Background

Restate journals every interaction with its context for deterministic replay. The restate.Run / restate.RunVoid / restate.RunAsync functions wrap non-deterministic side effects (DB queries, HTTP calls, etc.) into a single journaled step. Inside these closures, the only context available is restate.RunContext, which is a plain context.Context — it has no restate capabilities.

If the outer restate context (the handler's ctx parameter, typed as restate.Context, restate.ObjectContext, restate.WorkflowContext, restate.WorkflowSharedContext, etc.) is used inside a Run closure, it can break replay determinism and cause subtle bugs that are very hard to diagnose.

What to check

Scan all .go files under svc/ctrl/worker/ for closures passed to:

  • restate.Run(ctx, func(rc restate.RunContext) ...)
  • restate.RunVoid(ctx, func(rc restate.RunContext) ...)
  • restate.RunAsync(ctx, func(rc restate.RunContext) ...)

Inside each closure body, flag any reference to the outer restate context variable. The outer context is typically the handler function's first parameter (often named ctx) whose type is one of:

  • restate.Context
  • restate.ObjectContext
  • restate.ObjectSharedContext
  • restate.WorkflowContext
  • restate.WorkflowSharedContext

Violations — using the outer ctx inside the closure

These are forbidden inside restate.Run / restate.RunVoid / restate.RunAsync:

  1. Service calls via the restate context: e.g., hydrav1.NewVersioningServiceClient(ctx, ...) — the first argument to generated service client constructors is the restate context
  2. State access: restate.Get(ctx, ...), restate.Set(ctx, ...)
  3. Sleep: restate.Sleep(ctx, ...)
  4. Nested Run: restate.Run(ctx, ...) inside another restate.Run
  5. Key access: restate.Key(ctx)
  6. Async operations: restate.RunAsync(ctx, ...), sending messages via .Send()
  7. Any other method or function that takes the outer ctx where ctx is a restate context type

Allowed — using the closure's RunContext

Inside the closure, code should use the restate.RunContext parameter (often named rc, runCtx, or stepCtx) for:

  • Database queries: db.Query.Something(runCtx, ...)
  • Transactions: db.TxRetry(runCtx, ...)
  • External API calls: s.vault.Encrypt(runCtx, ...)
  • Any operation that needs a context.Context

Not a violation

  • Using the outer ctx outside of restate.Run closures is correct and expected
  • Passing plain values (not the context) captured from outer scope into the closure is fine
  • Using restate.TerminalError(...) inside a closure is fine (it doesn't take a context)

Procedure

  1. Use Grep to find all files containing restate.Run, restate.RunVoid, or restate.RunAsync under svc/ctrl/worker/
  2. Read each file
  3. For each closure passed to Run/RunVoid/RunAsync, identify:
    • The outer restate context variable name and type (from the enclosing handler function signature)
    • The closure's RunContext parameter name
  4. Check if the outer context variable appears anywhere in the closure body
  5. Report each violation with file, line, and what the fix should be (either move the call outside the closure, or replace ctx with the closure's RunContext if the call only needs a context.Context)

Output format

For each violation found, report:

FILE:LINE — `ctx` used inside restate.Run/RunVoid/RunAsync
  Outer context: `ctx restate.ObjectContext` (from handler function signature)
  Violation: `someFunction(ctx, ...)` should use `runCtx` or be moved outside the closure

If no violations are found, report: "No restate context violations found."

Related Skills

Looking for an alternative to reviewing-restate-handlers or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication