effector-storage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEffector Storage Skill
Effector Storage 技能
Use this skill to design, implement, and debug integrations with predictable runtime behavior.
effector-storage运用本技能可设计、实现并调试集成,确保运行时行为可预测。
effector-storageWorkflow
工作流程
- Classify the request:
- : pick the right adapter for environment and data behavior.
adapter-choice - : wire
integration/persistinto existing model flow.createPersist - : validate storage payloads and route failures.
contracts-errors - : investigate cross-tab/query/broadcast synchronization issues.
sync-debug - : make persistence safe across browser/server runtimes.
ssr-fallback
- Load references progressively:
- Start with .
references/core-patterns.md - Add when adapter selection/configuration is needed.
references/adapter-matrix.md - Add for
references/tools-and-composition.md,async,either, or composition recipes.farcached - Add for contracts and error channels.
references/contracts-and-errors.md - End with before finalizing.
references/pitfalls-and-checklist.md
- Build answer contract:
- Start with a concrete adapter decision and why.
- Provide a minimal working snippet with explicit key strategy.
- List behavior caveats (init timing, sync limits, validation behavior).
- Add verification steps/tests for the chosen flow.
- 对请求进行分类:
- :根据运行环境与数据行为选择合适的适配器。
adapter-choice - :将
integration/persist接入现有模型流程。createPersist - :验证存储负载并处理错误路由。
contracts-errors - :排查跨标签页/查询/广播的同步问题。
sync-debug - :确保持久化在浏览器/服务器运行时环境中安全运行。
ssr-fallback
- 逐步加载参考资料:
- 从开始。
references/core-patterns.md - 当需要选择或配置适配器时,添加。
references/adapter-matrix.md - 若涉及、
async、either或组合方案,添加farcached。references/tools-and-composition.md - 若涉及合约与错误通道,添加。
references/contracts-and-errors.md - 最终定稿前,参考。
references/pitfalls-and-checklist.md
- 构建响应规范:
- 首先给出明确的适配器选择及理由。
- 提供包含明确键策略的最小可运行代码片段。
- 列出行为注意事项(初始化时机、同步限制、验证行为)。
- 为所选流程添加验证步骤/测试。
Defaults
默认规则
- Target v7.x behavior.
effector-storage - Prefer explicit over implicit store names for portability.
key - Prefer declarative Effector wiring around (sample/clock/context units).
persist - Keep payloads plain and serialization stable ().
deserialize(serialize(x))
- 以v7.x版本的行为为标准。
effector-storage - 为保证可移植性,优先使用显式而非隐式存储名称。
key - 优先采用声明式的Effector方式来配置(使用sample/clock/context单元)。
persist - 保持负载为简单数据结构,确保序列化稳定(满足一致性)。
deserialize(serialize(x))
Guardrails
注意事项
- Do not omit both and store name.
key - Do not use for non-store units.
source === target - Do not assume still performs automatic initial restore (it disables it).
pickup - Do not assume contract validation prevents writes; invalid values can be persisted and then reported via .
fail - Do not treat as durable storage; it is sync-only messaging.
broadcast
- 不得同时省略和存储名称。
key - 非存储单元不得使用。
source === target - 请勿假设仍会执行自动初始恢复(实际上它会禁用该功能)。
pickup - 请勿认为合约验证会阻止写入;无效值仍可能被持久化,之后通过上报。
fail - 请勿将视为持久化存储;它仅用于同步消息传递。
broadcast
Practical Extras Boundary
扩展库使用边界
For adapters from , reuse the same adapter contract and decision flow from this skill, but verify exact API/options in that repository before coding.
effector-storage-extras对于来自的适配器,可复用本技能中的适配器规范与决策流程,但编码前需确认该仓库中的具体API/选项。
effector-storage-extras