session-timeout-recovery
它能做什么
这个技能检查登录后的流程和长表单中可能导致工作丢失的超时情况,并添加提醒、保存进度以及登录后恢复功能。它面向开发账户、结账和编辑器的团队。
适用场景
- ✓你请智能体检查登录流程或长表单在超时时是否会丢失数据的时候。
- ✓用户的会话过期后,他们正在填写的表单丢失了的时候。
- ✓你在构建编辑器或结账流程,并希望在会话结束前提醒用户的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/session-timeout-recovery/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“用户的会话超时时,他们正在填写的表单会丢失。请帮我添加提醒并保存他们的进度吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查会话的持续时间,并在过期前添加无障碍的提醒。它会保存草稿或已输入的数据,在允许的情况下让用户延长会话,并在用户重新登录后让其回到同一步骤。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Prevent data loss from session timeouts
Users with cognitive, motor, or vision disabilities may need longer to finish forms and authenticated tasks. Silent session expiry can erase work, force a restart, and block completion of important transactions.
Quick Reference
- Warn users before a timeout causes lost work
- Allow time extension for content-controlled time limits when feasible
- Autosave or preserve entered data across logout and re-authentication
- Keep timeout dialogs keyboard accessible and announced to assistive technology
Check
Review authenticated flows, forms, and long-running tasks for inactivity timeouts. Verify users are told the timeout duration, warned before expiry, can extend the session when allowed, and can resume after re-authenticating without losing work.
Fix
Add an accessible timeout warning, preserve drafts or submitted data across session expiry, and restore the user to the same step after re-authentication. Where the time limit is content-controlled, offer turn off, adjust, or extend behavior when feasible.
Explain
Explain how timeout warnings, extension controls, autosave, and re-authentication recovery reduce data loss and align with WCAG enough-time guidance.
Code Review
Review authenticated forms, checkout flows, editors, and long-running tasks related to Prevent data loss from session timeouts. Flag routes or components that can expire silently, discard entered data, or block recovery after re-authentication.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/accessibility/session-timeout-recovery
常见问题
谁最能从中受益?
这个技能说,有认知、运动或视力障碍的人可能需要更多时间,而无声的过期会抹去他们的工作。
提醒需要具有无障碍性吗?
需要。这个技能说,对话框必须能用键盘操作,并且要向辅助技术播报。
时间限制可以延长吗?
这个技能说,在内容设定了时间限制且可行的情况下,应提供关闭、调整或延长的选项。
详情
作者的原始描述
Use when reviewing authenticated user flows or long forms. Check both client and server behavior: warning timing, dialog accessibility, autosave frequency, timeout extension, and post-login state restoration.
热度
- GitHub 星标
- 75k
- 排名
- #3018
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。