askill
resilience-audit

resilience-auditSafety 85Repository

Offline functionality and state recovery verification for graceful degradation commitment.

0 stars
1.2k downloads
Updated 2/13/2026

Package Files

Loading files...
SKILL.md

Resilience Audit

Verify graceful degradation and state recovery capabilities.

Purpose

Ensure the application handles adverse conditions gracefully:

  • Network outages
  • Server errors
  • Browser crashes
  • Slow connections
  • Interrupted operations

Checks Performed

1. Offline Capability

CheckLevelDescription
Core readEssentialView existing data offline
Core writeEnhancedQueue changes for sync
Full offlineCompleteWork entirely offline

2. State Recovery

CheckExpectation
Page refreshState preserved
Browser crashDraft recovery
Tab close/reopenSession restore
Multi-tab syncConsistent state

3. Network Resilience

ConditionExpected Behavior
Slow 3GUsable with feedback
OfflineClear indication + queuing
Flaky connectionRetry with backoff
Server 500Graceful error + retry option

4. Data Sync

CheckExpectation
Conflict resolutionDefined strategy
Sync statusVisible to user
Offline queuePersisted
Retry logicExponential backoff

Usage

# Full resilience audit
./scripts/resilience-audit.sh

# Offline focus
./scripts/resilience-audit.sh --scope offline

# With network simulation
./scripts/resilience-audit.sh --simulate

Output Format

## Resilience Audit Report

**Date:** 2025-01-20

### Offline Capability

| Feature | Offline Status | Notes |
|---------|----------------|-------|
| View cards | ✅ Works | Cached in IndexedDB |
| Create card | ⚠️ Partial | Queued but no feedback |
| Search | ❌ Fails | Requires server |
| Settings | ✅ Works | Local storage |

### State Recovery

| Scenario | Status | Notes |
|----------|--------|-------|
| Page refresh | ✅ | URL state preserved |
| Form in progress | ⚠️ | Lost on refresh |
| Crash recovery | ❌ | No draft persistence |
| Tab sync | ✅ | Real-time sync works |

### Network Resilience

| Condition | Tested | Result |
|-----------|--------|--------|
| Offline indicator | ✅ | Shows banner |
| Retry button | ⚠️ | Only on some errors |
| Request timeout | ✅ | 30s with feedback |
| Exponential backoff | ❌ | Fixed 5s retry |

### Data Sync

| Check | Status |
|-------|--------|
| Sync queue visible | ❌ No UI |
| Conflict resolution | ✅ Last-write-wins |
| Offline queue persisted | ✅ IndexedDB |
| Sync on reconnect | ✅ Automatic |

### Recommendations

1. **HIGH**: Add draft persistence for forms
2. **HIGH**: Implement exponential backoff for retries
3. **MEDIUM**: Show pending sync count to users
4. **MEDIUM**: Add offline-capable search with local index
5. **LOW**: Add conflict resolution UI for complex cases

Resilience Patterns

Offline-First Architecture

┌─────────────────────────────────────────┐
│              Application                │
├─────────────────────────────────────────┤
│  ┌─────────┐  ┌─────────┐  ┌─────────┐ │
│  │ UI Layer│──│ Service │──│  Sync   │ │
│  │         │  │ Worker  │  │ Manager │ │
│  └─────────┘  └─────────┘  └─────────┘ │
│       │            │            │       │
│  ┌─────────────────────────────────────┐│
│  │           IndexedDB                 ││
│  │     (Source of Truth)               ││
│  └─────────────────────────────────────┘│
└─────────────────────────────────────────┘
                    │
              [Network]
                    │
              ┌─────────┐
              │ Server  │
              └─────────┘

State Recovery Strategy

Data TypeStorageRecovery
User sessionlocalStorageAuto-restore
Form draftsIndexedDBPrompt to restore
Pending syncsIndexedDBAuto-retry
UI stateURL paramsBookmark-safe

Retry Strategy

// Exponential backoff with jitter
const retryDelays = [1000, 2000, 4000, 8000, 16000];
const jitter = Math.random() * 1000;
const delay = retryDelays[attempt] + jitter;

Prerequisites

  • Service Worker support
  • IndexedDB for offline storage
  • Network Information API (optional)

See Also

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

84/100Analyzed 2/19/2026

Well-structured resilience audit skill with comprehensive coverage of offline capability, state recovery, network resilience, and data sync. Provides clear usage commands, output format examples, and helpful diagrams. The skill functions as an audit checklist/reference rather than step-by-step implementation guide, which is appropriate for its purpose. Tags slightly mismatched but content is high quality and reusable across projects.

85
90
90
85
75

Metadata

Licenseunknown
Version-
Updated2/13/2026
Publisherryangaraygay

Tags

apipromptingsecurity