GR

graceful-degradation

Prevents app crashes when optional services fail by providing cached health checks and helpful, actionable fallback messages to users.

Install

mkdir -p .claude/skills/graceful-degradation && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3047" && unzip -o skill.zip -d .claude/skills/graceful-degradation && rm skill.zip

Installs to .claude/skills/graceful-degradation

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Graceful Degradation with Helpful Messages
42 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Check service availability before execution
  • Cache health check results with TTL
  • Provide actionable fallback messages
  • Degrade functionality instead of failing silently

How it works

It performs an early availability check, caches the result for a set duration, and returns a user-friendly message if the service is unavailable.

Inputs & outputs

You give it
Service endpoint and availability check logic
You get back
A fallback message or reduced functionality result

When to use graceful-degradation

  • Handling offline status for external AI model servers
  • Implementing fallback logic for non-critical features
  • Providing actionable error messages to users when services are down

About this skill

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

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 at localhost:1234.

To enable Godel-Prover tactic suggestions:
1. Install LMStudio from https://lmstudio.ai/
2. Load "Goedel-Prover-V2-8B" model
3. Start the local server on port 1234

Continuing without AI-assisted tactics...`
  };
}

Fallback Message Template

[Service] not available at [endpoint].

To enable [feature]:
1. [Step to install/start]
2. [Configuration step if needed]
3. [Verification step]

Continuing without [degraded feature]...

Source Sessions

  • This session: LMStudio availability check with 60s caching and helpful fallback
  • 174e0ff3: Environment variable debugging - print computed paths for troubleshooting

When not to use it

  • Critical services where failure must halt execution

Limitations

  • Requires manual implementation of caching logic
  • Limited to services reachable via network requests

How it compares

It proactively informs the user how to resolve the missing service, rather than returning empty results or crashing.

Compared to similar skills

graceful-degradation side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
graceful-degradation (this skill)17moNo flagsIntermediate
mcp-builder1363moReviewAdvanced
deepwiki-rs259moReviewIntermediate
react-native-architecture552moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

deepwiki-rs

sopaco

AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.

25170

react-native-architecture

wshobson

Build production React Native apps with Expo, navigation, native modules, offline sync, and cross-platform patterns. Use when developing mobile apps, implementing native integrations, or architecting React Native projects.

55109

nodejs-best-practices

davila7

Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.

28120

nestjs-expert

davila7

Nest.js framework expert specializing in module architecture, dependency injection, middleware, guards, interceptors, testing with Jest/Supertest, TypeORM/Mongoose integration, and Passport.js authentication. Use PROACTIVELY for any Nest.js application issues including architecture decisions, testing strategies, performance optimization, or debugging complex dependency injection problems. If a specialized expert is a better fit, I will recommend switching and stop.

3758

nextjs-best-practices

davila7

Next.js App Router principles. Server Components, data fetching, routing patterns.

3164

Search skills

Search the agent skills registry