Agent Skills
› NeverSight/learn-skills.dev
› workspace-context
workspace-context
GitHub为应用提供稳定只读的工作区上下文,通过信号管理状态。规范工作区切换、生命周期及数据持久化,确保其他模块仅读取不修改,避免冗余请求和对象身份变更,保障性能与一致性。
Trigger Scenarios
更改工作区选择
处理工作区水合逻辑
配置上下文提供者
Install
npx skills add NeverSight/learn-skills.dev --skill workspace-context -g -y
SKILL.md
Frontmatter
{
"name": "workspace-context",
"description": "Workspace context patterns for src\/app\/workspace, including workspace lifecycle, stable context signals, workspace switching, and event emission for other modules; use when changing workspace selection, hydration, or context providers."
}
Workspace Context
Intent
Provide a stable, read-only workspace context for the rest of the app, changeable only through explicit workspace actions.
Context Rules
- Represent the active workspace as signals (workspaceId, workspace, membership/roles).
- Other modules read the context; they must not mutate it directly.
Lifecycle
- Workspace switching is explicit and emits events for consumers to react.
- Keep hydration predictable: load workspace state once per workspaceId change and avoid redundant fetch loops.
Boundaries
- Global UI state belongs to Shell; workspace is not a dumping ground for app chrome.
- Persist and publish changes in order (append-before-publish).
Performance
- Keep context signals small and stable; avoid emitting new object identities unnecessarily.
- Convert integration streams to signals at the store boundary.
Version History
- e0220ca Current 2026-07-05 21:27


