activity-design

Configure Temporal activity timeouts, retries, and heartbeats for reliable external work.

3|1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/therealbill/mynet --skill activity-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: activity-design
Source: https://github.com/therealbill/mynet/tree/main/timelord/skills/activity-design
Command: npx skills add https://github.com/therealbill/mynet --skill activity-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing external work within workflows can be brittle without proper timeouts, retries, and heartbeat signaling. This skill provides guidance to design and configure Temporal activities to be robust, idempotent, and observable.

Core Features & Use Cases

  • Timeout configuration for activities: ScheduleToCloseTimeout, StartToCloseTimeout, and HeartbeatTimeout to bound total, per-attempt, and progress-monitoring time.
  • Retry policy guidance: InitialInterval, BackoffCoefficient, MaximumInterval, MaximumAttempts, and non-retryable errors.
  • Idempotency strategies: idempotency keys and transactional patterns to avoid duplicate side effects.
  • Heartbeats and cancellation: progress reporting during long-running tasks and responsive cancellation handling.
  • Common use cases: HTTP/gRPC calls, DB operations, file I/O, and message publishing with safe retry semantics.

Quick Start

Implement a Temporal activity with appropriate Timeouts and a RetryPolicy.

Frequently Asked Questions about activity-design

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

FAQPage Schema
How do I configure Temporal activity timeouts for long-running operations?

Temporal activity timeouts bound execution time using ScheduleToCloseTimeout for total duration, StartToCloseTimeout for per-attempt limits, and HeartbeatTimeout for progress monitoring. You configure these parameters to bound total, per-attempt, and progress-monitoring time for reliable external work.

What is the best way to make Temporal activities idempotent and avoid duplicate side effects?

To make Temporal activities idempotent, implement idempotency keys and transactional patterns that prevent duplicate side effects during retries. This ensures operations like message publishing or database updates execute safely even when activity retries occur.

Why do I need heartbeats in Temporal activities and how do they handle cancellation?

Heartbeats in Temporal activities report progress during long-running tasks and enable responsive cancellation handling. By sending heartbeat signals, you notify the workflow that the activity is still alive, allowing the system to detect stalls and cancel operations promptly when requested.

How do I set up a retry policy for Temporal workflows that perform external HTTP or gRPC calls?

Set up a Temporal retry policy by configuring InitialInterval, BackoffCoefficient, MaximumInterval, and MaximumAttempts, along with specifying non-retryable errors. This controls how activities performing HTTP or gRPC calls retry failures with appropriate backoff and limits.

When should I use Temporal activities instead of running logic directly in workflows?

Use Temporal activities for non-deterministic operations such as HTTP or gRPC calls, database updates, file I/O, and message publishing. Activities isolate external side effects from workflow logic, enabling proper timeout configuration, retry handling, and idempotency guarantees that workflows alone cannot provide.