graceful-degradation

Solid

Graceful Degradation with Helpful Messages

AI & Automation 501 stars 42 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
90
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Graceful Degradation with Helpful Messages When optional services are unavailable, degrade gracefully with actionable fallback messages. ## Pattern Check availability at the start, cache the result, and provide helpful messages that explain what's missing and how to fix it. ## DO - Check service availability early (before wasting compute) - Cache health check results for the session (e.g., 60s TTL) - Provide actionable fallback messages: - What service is missing - What features are degraded - How to enable the service - Continue with reduced functionality when possible ## DON'T - Silently fail or return empty results - Check availability on every call (cache it) - Assume the user knows how to start missing services ## Example: LMStudio Check Pattern ```typescript let lmstudioAvailable: boolean | null = null; let lastCheck = 0; const CACHE_TTL = 60000; // 60 seconds async function checkLMStudio(): Promise<boolean> { const now = Date.now(); if (lmstudioAvailable !== null && now - lastCheck < CACHE_TTL) { return lmstudioAvailable; } try { const response = await fetch('http://localhost:1234/v1/models', { signal: AbortSignal.timeout(2000) }); lmstudioAvailable = response.ok; } catch { lmstudioAvailable = false; } lastCheck = now; return lmstudioAvailable; } // Usage if (!await checkLMStudio()) { return { result: 'continue', message: `LMStudio not available ...

Details

Author
vibeeval
Repository
vibeeval/vibecosystem
Created
2 months ago
Last Updated
yesterday
Language
C#
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category