ab-test-analysis
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes…
Implement circuit breaker patterns for fault tolerance, automatic failure detection, and fallback mechanisms. Use when calling external services, handling cascading failures, or implementing resilience patterns.
$ npx -y skills add aj-geddes/useful-ai-prompts --skill circuit-breaker-pattern --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/circuit-breaker-patternContext preview
The summary Claude sees to decide when to auto-load this skill.
Implement circuit breaker patterns for fault tolerance, automatic failure detection, and fallback mechanisms. Use when calling external services, handling cascading failures, or implementing resilience patterns.
name: circuit-breaker-pattern description: > Implement circuit breaker patterns for fault tolerance, automatic failure detection, and fallback mechanisms. Use when calling external services, handling cascading failures, or implementing resilience patterns.
Implement circuit breaker patterns to prevent cascading failures and provide graceful degradation when dependencies fail.
Minimal working example:
enum CircuitState {
CLOSED = "CLOSED",
OPEN = "OPEN",
HALF_OPEN = "HALF_OPEN",
}
interface CircuitBreakerConfig {
failureThreshold: number;
successThreshold: number;
timeout: number;
resetTimeout: number;
}
interface CircuitBreakerStats {
failures: number;
successes: number;
consecutiveFailures: number;
consecutiveSuccesses: number;
lastFailureTime?: number;
}
class CircuitBreaker {
private state: CircuitState = CircuitState.CLOSED;
private stats: CircuitBreakerStats = {
failures: 0,
// ... (see reference guides for full implementation)Detailed implementations in the `references/` directory:
| Guide | Contents | |---|---| | [TypeScript Circuit Breaker](references/typescript-circuit-breaker.md) | TypeScript Circuit Breaker | | [Circuit Breaker with Monitoring](references/circuit-breaker-with-monitoring.md) | Circuit Breaker with Monitoring | | [Opossum-Style Circuit Breaker (Node.js)](references/opossum-style-circuit-breaker-nodejs.md) | Opossum-Style Circuit Breaker (Node.js) | | [Python Circuit Breaker](references/python-circuit-breaker.md) | Python Circuit Breaker | | [Resilience4j-Style (Java)](references/resilience4j-style-java.md) | Resilience4j-Style (Java) |
488 production-ready AI prompts, all following a standardized template with validated quality gates. Transform ChatGPT, Claude, and other AI assistants into expert consultants.
Repo: aj-geddes/useful-ai-prompts
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes…
Implement Role-Based Access Control (RBAC), permissions management, and authorization…
Implement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard…
Test web applications for WCAG compliance and ensure usability for users with disabilities.…
Plan and execute effective sprints using Agile methodologies. Define sprint goals, estimate…
Implement comprehensive alert management with PagerDuty, escalation policies, and incident…