| name | temporal-history |
| description | Decode and analyze Temporal.io workflow history JSON. Use when the user provides Temporal history JSON or says something is temporal history. |
Temporal History Decoder
Decode a Temporal.io workflow execution history JSON export into a human-readable timeline with decoded payloads.
Trigger
When the user provides JSON (file path, pasted content, or URL) and indicates it's Temporal workflow history, or attaches a file that looks like Temporal history.
Script
The decoder script lives at .claude/skills/temporal-history/decode.mjs. It handles:
- Base64 and plain JSON payload decoding
- Activity correlation (scheduled -> started -> completed/failed)
- Local activity marker extraction
- Signal decoding
- Timeline formatting with elapsed times
- Error highlighting
- Summary statistics
Execution
-
Determine the file path from user input (file attachment, path, or save pasted JSON to a temp file)
-
Run the decoder:
node .claude/skills/temporal-history/decode.mjs <path-to-history.json>
Flags:
--raw — include workflow task events and unknown event types
--activities-only — show only activity and local activity events
--errors-only — show only failed events
- Analyze the output and provide insights:
- Which activities/phases took the longest
- Any errors and their root causes
- Signal flow and timing
- Whether the workflow completed successfully or failed
- Bottleneck identification
Train Solver Context
This project uses Temporal heavily. Common workflow types:
order-workflow — OrderWorkflow (swap lifecycle)
network-runtime — NetworkRuntime (per-network infrastructure)
transaction-processor — TransactionProcessor (tx pipeline)
gas-station — GasStation (fee estimation)
rpc-log-event-listener — RPCLogEventListener
route-monitor — RouteMonitor (balance/route management)
refund-monitor — RefundMonitor (expired lock recovery)
rebalance-workflow — RebalanceWorkflow (admin transfers)
Common activity names (C# registered, no Async suffix):
GetAllRoutes, GetNetwork, GetRoute, GetWallets — config lookups
CreateOrder, UpdateOrderStatus, CreateOrderTransaction — order persistence
ReserveBalance, ReleaseBalance — balance management
GetBatchBalancesViaRuntime — balance fetching through network runtime
RefreshVirtualBalance, CleanupStaleReservations — RouteMonitor balance ops
GetActiveRoutesByWalletGroup, UpdateRoutesStatus — route status management
ValidateQuote — quote validation
BuildSolverLockTransaction, BuildSolverRedeemTransaction — HTLC building
QueryGasLimits — GasStation query
Common signal names:
OnUserTokenLocked, OnSolverTokenLocked — lock events
OnUserTokenRedeemed, OnSolverTokenRedeemed — redeem events
OnUserTokenRefunded, OnSolverTokenRefunded — refund events
SubmitLock, SubmitRedeem, SubmitRefund, SubmitTransfer — TP signals
OnTransactionResult — TP callback
UpdateSubscriptions — listener subscription update
ReportGasUsage — GasStation gas report
Output Guidelines
After running the script, provide a brief human-readable analysis:
- Workflow type and what it was doing
- Duration and outcome
- Key activities and their timing
- Any errors or anomalies
- For RouteMonitor: which routes were checked, balance states, status changes
- For OrderWorkflow: swap lifecycle phases, which step failed/succeeded
- For TransactionProcessor: tx pipeline stages, stuck/orphaned states