{"id":"graceful-degradation","name":"graceful-degradation","summary":"優しいデグラデーションと有益なメッセージ","body":"# Graceful Degradation with Helpful Messages\n\nWhen optional services are unavailable, degrade gracefully with actionable fallback messages.\n\n## Pattern\n\nCheck availability at the start, cache the result, and provide helpful messages that explain what's missing and how to fix it.\n\n## DO\n\n- Check service availability early (before wasting compute)\n- Cache health check results for the session (e.g., 60s TTL)\n- Provide actionable fallback messages:\n  - What service is missing\n  - What features are degraded\n  - How to enable the service\n- Continue with reduced functionality when possible\n\n## DON'T\n\n- Silently fail or return empty results\n- Check availability on every call (cache it)\n- Assume the user knows how to start missing services\n\n## Example: LMStudio Check Pattern\n\n```typescript\nlet lmstudioAvailable: boolean | null = null;\nlet lastCheck = 0;\nconst CACHE_TTL = 60000; // 60 seconds\n\nasync function checkLMStudio(): Promise<boolean> {\n  const now = Date.now();\n  if (lmstudioAvailable !== null && now - lastCheck < CACHE_TTL) {\n    return lmstudioAvailable;\n  }\n\n  try {\n    const response = await fetch('http://localhost:1234/v1/models', {\n      signal: AbortSignal.timeout(2000)\n    });\n    lmstudioAvailable = response.ok;\n  } catch {\n    lmstudioAvailable = false;\n  }\n  lastCheck = now;\n  return lmstudioAvailable;\n}\n\n// Usage\nif (!await checkLMStudio()) {\n  return {\n    result: 'continue',\n    message: `LMStudio not available at localhost:1234.\n\nTo enable Godel-Prover tactic suggestions:\n1. Install LMStudio from https://lmstudio.ai/\n2. Load \"Goedel-Prover-V2-8B\" model\n3. Start the local server on port 1234\n\nContinuing without AI-assisted tactics...`\n  };\n}\n```\n\n## Fallback Message Template\n\n```\n[Service] not available at [endpoint].\n\nTo enable [feature]:\n1. [Step to install/start]\n2. [Configuration step if needed]\n3. [Verification step]\n\nContinuing without [degraded feature]...\n```\n\n## Source Sessions\n\n- This session: LMStudio availability check with 60s caching and helpful fallback\n- 174e0ff3: Environment variable debugging - print computed paths for troubleshooting","author":"@parcadei","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/graceful-degradation","license":"MIT","category":"coding","lang":"en","tokens":493,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["lmstudio.ai"]}}