Index of every page on this site: llms.txt
All skills
Run it yourself

Durable UI patterns for modern web development — persisting client-side state across page loads, browser sessions, and shareable URLs. Use this skill when implementing localStorage persistence, URL query parameter state, form draft auto-save, multi-step wizard persistence, click-outside dismissal, modal/dialog backdrop patterns, or any client-side state and interaction pattern that should be resilient and well-behaved. Works with React, Vue, and Svelte.

Use this Skill: https://skilld.dev/gh/sailscastshq/boring-stack/durable-ui

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈118 tokens for metadata: the name and description. ≈975 when used: this file. ≈74k more on demand in 16 files.

Description uses 5.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈470 characters, or 5.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Durable UI

Durable UI is the practice of making client-side state and interactions resilient. State should survive page reloads, browser sessions, and — where appropriate — be shareable via URL. Interactive elements like dropdowns and modals should be dismissable in the ways users expect (click outside, Escape, backdrop click). Multi-step flows should never lose progress. Durable UI fills the gap for UI preferences, navigation context, and interaction patterns that belong on the client.

When to Use

Use this skill when:

  • Persisting UI preferences in localStorage (sidebar collapsed, dark mode, dismissed banners)
  • Syncing filters, tabs, or pagination state to URL query parameters
  • Auto-saving form drafts to localStorage with restore-on-return
  • Building multi-step wizard forms that preserve progress across reloads and navigation
  • Making dropdowns, context menus, and popovers close on outside click or Escape
  • Closing modals, dialogs, and confirms via backdrop click or Escape
  • Deciding where state should live (client localStorage vs URL vs server session vs database)
  • Building useLocalStorage, useQueryState, useDurableUrl, useDurableStorage, useFormDraft, useWizardDraft, or useClickOutside hooks/composables/stores
  • Handling cross-tab synchronization of localStorage values
  • Implementing unsaved-changes warnings with Inertia.js navigation guards
  • Managing focus return after modal close, focus trapping, and focus after list item deletion
  • Building optimistic UI updates with rollback on error (toggles, list mutations, Inertia integration)
  • Restoring scroll position after navigation, back/forward, and within scrollable containers
  • Implementing toast notification queues with auto-dismiss, pause-on-hover, and aria-live
  • Building debounced search with AbortController cancellation for client-side and server-side filtering

Rules

Read individual rule files for detailed explanations and code examples:

  • rules/principles.md - Decision framework: when to use localStorage vs URL params vs session vs database
  • rules/local-storage.md - localStorage patterns with examples for React, Vue, and Svelte
  • rules/url-state.md - URL query parameter sync with pushState/replaceState patterns
  • rules/form-persistence.md - Auto-save form drafts with restore, expiry, and unsaved-changes warnings
  • rules/multi-step-forms.md - Multi-step wizard persistence with per-step drafts and aggregate submission
  • rules/click-outside.md - Close dropdowns, context menus, modals, and dialogs on outside click, backdrop click, or Escape
  • rules/focus-management.md - Focus return after modal close, focus trapping, and focus after list item deletion
  • rules/optimistic-ui.md - Optimistic updates with rollback on error for toggles, list mutations, and Inertia actions
  • rules/scroll-restoration.md - Scroll position restoration after navigation, back/forward, and within scrollable containers
  • rules/toast-notifications.md - Toast notification queues with auto-dismiss, pause-on-hover, and Inertia flash integration
  • rules/debounced-search.md - Debounced search with AbortController cancellation for client-side and server-side filtering
  • rules/react.md - Complete React hook implementations (useLocalStorage, useQueryState, useFormDraft)
  • rules/vue.md - Complete Vue composable implementations (useLocalStorage, useQueryState, useDurableUrl, useDurableStorage, useFormDraft)
  • rules/svelte.md - Complete Svelte store implementations (localStorageStore, queryStateStore, formDraftStore)

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo4 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides safe architectural patterns and code examples for managing persistent UI state in React, Vue, and Svelte applications. It does not contain any malicious code or instructions.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    17/17 files flagged

Signed by skilld at ce3d93c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 9 months ago
Other metadata
metadata
{
  "author": "sailscastshq",
  "version": "1.1.0",
  "tags": "durable-ui, localStorage, url-state, query-params, form-persistence, multi-step-forms, click-outside, modal, dialog, backdrop, dropdown, state-management, web-dev"
}

README badge

README badge for sailscastshq/boring-stack/durable-ui