add-retry

Adds configurable exponential-backoff retry to Cubit methods via mix.

7|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/marcglasberg/bloc_superpowers --skill add-retry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-retry
Source: https://github.com/marcglasberg/bloc_superpowers/tree/main/.claude/skills/add-retry
Command: npx skills add https://github.com/marcglasberg/bloc_superpowers --skill add-retry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces flakiness in Cubit-based apps by automatically retrying transient failures during critical operations.

Core Features & Use Cases

  • Retry integration: Injects a retry wrapper into mix() calls with configurable attempts and backoff.
  • Configurable timing: Supports maxRetries, initialDelay, multiplier, and maxDelay for exponential backoff.
  • Use Case: Ideal for network/API calls and data fetches that may temporarily fail.

Quick Start

Add retry to a Cubit method by wrapping the asynchronous work with mix using the retry option and optional timing settings.

Frequently Asked Questions about add-retry

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

FAQPage Schema
How do I add automatic retry with exponential backoff to Flutter Cubit methods?

You can add automatic retry with exponential backoff to Flutter Cubit methods by wrapping asynchronous operations like API calls in a mix() call using configurable retry options.

What is the best way to handle transient API failures in Cubit-based apps?

The best way to handle transient API failures in Cubit-based apps is to inject a retry wrapper with exponential backoff into your data loading operations to automatically reattempt failed requests.

How do I configure retry timing and max attempts for Cubit network calls?

You can configure retry timing for Cubit network calls by setting maxRetries, initialDelay, multiplier, and maxDelay options within the mix.retry configuration to govern exponential backoff behavior.

Does the Cubit retry wrapper require external dependencies?

The Cubit retry wrapper requires no external dependencies beyond bloc_superpowers, allowing you to implement transient-failure resilience seamlessly within your existing Flutter architecture.

Can I apply retry logic to any asynchronous Cubit operation?

Yes, you can apply retry logic to any asynchronous Cubit operation, making it ideal for wrapping network calls, data fetches, and other critical asynchronous tasks that may temporarily fail.

When should I avoid using automatic retry for Cubit operations?

You should avoid using automatic retry for Cubit operations when failures are permanent rather than transient, as retrying non-recoverable errors will unnecessarily delay final error handling.