AgentSkillsCN

layout-persistence

适用于思考如何在会话间保存与恢复 UI 布局状态,包括已停靠的文档时使用。

SKILL.md
--- frontmatter
name: layout-persistence
description: Use when reasoning about saving and restoring UI layout state across sessions, including docked documents,
  • Persist user layout state on shutdown or explicit save
  • Restore layout deterministically on startup
  • Support multiple documents and tool windows
  • Handle missing or invalid layout data gracefully
  • Avoid layout corruption across versions where possible

Framework mapping guidance:

  • WPF: integrate with docking library layout serialization (e.g., AvalonDock)
  • Avalonia: use framework-appropriate docking/layout persistence mechanisms
  • Storage format and location are implementation details
  • Do not assume JSON/XML/binary storage unless specified in PROJECT or PRD