background-state
OfficialPreserve plugin state across app background.
Software Engineering#typescript#plugin-development#state-persistence#webview#even_hub_sdk#background-state
Authoreven-realities
Version1.0.0
Installs0
System Documentation
What problem does it solve?
The plugin can lose runtime state when the host moves the app to the background; this skill automatically captures and restores that state so the plugin behaves consistently after foreground return.
Core Features & Use Cases
- Automatic state export: register a JSON-serializable snapshot via setBackgroundState for chosen keys.
- Safe restoration: apply onBackgroundRestore to merge the saved state back into your live state with nullish fallbacks.
- Guided usage: works with simple primitives like counters, selections, or small buffers that should persist across background/foreground migrations.
Quick Start
Register the background-state hooks at module initialization, export a snapshot of mutable state, and restore it on host wake.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: background-state Download link: https://github.com/even-realities/everything-evenhub/archive/main.zip#background-state Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.