dotnet-resilience

Implement Polly v8 resilience pipelines for .NET HTTP clients.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-resilience-rudironsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-resilience
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-resilience
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-resilience-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps .NET developers implement robust fault tolerance patterns, preventing application failures due to transient network issues, service unavailability, or timeouts.

Core Features & Use Cases

  • Standard Resilience Pipeline: Integrates Polly v8 and Microsoft.Extensions.Http.Resilience for common retry, circuit breaker, and timeout strategies.
  • Custom Pipeline Configuration: Allows fine-grained control over resilience policies for specific scenarios like database interactions or external API calls.
  • Use Case: Protect your ASP.NET Core application from intermittent failures when calling a downstream microservice by automatically retrying failed requests and preventing cascading failures with a circuit breaker.

Quick Start

Add the standard resilience handler to your HTTP client named 'catalog-api' with sensible defaults.

Frequently Asked Questions about dotnet-resilience

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

FAQPage Schema
How do I add fault tolerance to ASP.NET Core apps using Polly?

You add fault tolerance to ASP.NET Core apps by configuring resilience pipelines with Polly v8 and Microsoft.Extensions.Http.Resilience. This integrates retry, circuit breaker, and timeout strategies via dependency injection to protect against transient failures and service unavailability.

What is a resilience pipeline in .NET and when do I need it?

A resilience pipeline in .NET is a sequence of fault tolerance policies like rate limiting, timeouts, and retries applied to HTTP requests. You need it to prevent application failures caused by transient network issues or downstream service unavailability.

Can I configure custom retry and circuit breaker policies for specific HTTP clients?

Yes, you can configure custom resilience pipelines for specific HTTP clients. This allows fine-grained control over retry and circuit breaker policies tailored to distinct scenarios like external API calls or database interactions.

Does Microsoft.Extensions.Http.Resilience work with dependency injection?

Yes, Microsoft.Extensions.Http.Resilience works directly with dependency injection. It enables you to add standard resilience handlers to named HTTP clients, such as 'catalog-api', using sensible defaults configured within the ASP.NET Core service collection.

What is the best way to prevent cascading failures in .NET microservices?

The best way to prevent cascading failures in .NET microservices is implementing a circuit breaker pattern. By using Polly v8, the circuit breaker stops sending requests to an unavailable downstream service, automatically retrying failed requests once the service recovers.

Why does my .NET application still fail despite using standard retry policies?

Your .NET application might still fail if standard retry policies lack a circuit breaker or timeout. Combining retries with circuit breakers and rate limiting via a custom Polly v8 pipeline prevents cascading failures during sustained downstream service unavailability.