{"success":true,"name":"autosave-long-forms-and-editors-as-drafts","description":"Users spend many minutes typing into a form, editor, or builder.","category":"ai-brimind","path":"ai-brimind/autosave-long-forms-and-editors-as-drafts/SKILL.md","file":"SKILL.md","content":"---\nname: autosave-long-forms-and-editors-as-drafts\ndescription: \"Users spend many minutes typing into a form, editor, or builder.\"\n---\n\n# Autosave Long Forms and Editors as Drafts\n\n## When to use\nAn input surface takes significant time to fill (long forms, content editors, configuration builders), and a crash, timeout, or accidental navigation loses everything.\n\n## Example request\nBrowser crashes 20 minutes into writing a description → everything gone; the user may not retry at all — long effort with no safety net. Session expires during a long form → submit fails, redirect to login, content lost — expiry meets unsaved work. Autosave exists but overwrote good content with an accidental deletion the moment it happened → the safety net saved the accident — autosave without history or restraint.\n\n## Instructions\nAct like a UX lead who measures risk in minutes-of-typing: past roughly two minutes of user effort, losing it is a product failure, not bad luck. Implement drafts: (1) SAVE periodically and on meaningful pauses — debounced (e.g. a few seconds after typing stops), to localStorage for instant local safety and/or a server draft when cross-device matters; save silently with a subtle 'Draft saved' indicator — never interrupt typing; (2) RESTORE deliberately — on return, detect the draft and OFFER it ('Restore your draft from 14:32?') rather than silently auto-filling, because the draft might be the version the user abandoned on purpose; show the timestamp so they can judge; (3) LIFECYCLE — successful submit deletes the draft (stale drafts resurrecting into new sessions is a confusing bug), and drafts of sensitive content shouldn't outlive their purpose in localStorage; (4) don't let autosave destroy: saving continuously means a catastrophic user edit (select-all + delete) gets persisted instantly — keep the previous draft version or a small history so 'restore' has something good to restore. Only proceed once a mid-typing browser kill provably loses at most a few seconds of work.\n\n## Metadata\n- role: UX lead\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1186\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}