Agent Skills
› UsefulSoftwareCo/executor
› wrdn-effect-atom-reactivity-keys
wrdn-effect-atom-reactivity-keys
GitHub用于修复 effect-atom 写入突变调用,为 useAtomSet 添加 reactivityKeys 以明确数据失效范围。需选择最窄覆盖键,排除只读流程,并检查是否适用乐观更新。
触发场景
lint 标记 useAtomSet 突变缺少无效化键
需要为数据写入操作指定读取失效范围
安装
npx skills add UsefulSoftwareCo/executor --skill wrdn-effect-atom-reactivity-keys -g -y
SKILL.md
Frontmatter
{
"name": "wrdn-effect-atom-reactivity-keys",
"description": "Add reactivityKeys to effect-atom write mutation calls. Use when lint flags a useAtomSet mutation call that mutates data without invalidation keys.",
"allowed-tools": "Read Grep Glob Bash"
}
Effect-atom write mutations must say which reads they invalidate.
Fix Shape
- Find the
useAtomSet(...)write mutation call. - Add
reactivityKeysto the mutation payload at the call site. - Use the narrowest keys that cover the rows/lists affected by the write.
- Keep read-only probe/preview OAuth flows out of this pattern.
- If the mutation should update UI immediately, check whether
wrdn-effect-atom-optimisticalso applies.
Good
await updateSource({
params: { scopeId, sourceId },
payload,
reactivityKeys: [["sources", scopeId]],
});
版本历史
- fd4fb02 当前 2026-07-05 10:55


