Hook contract refactor safety

From ai-shifu/ai-shifu · View interactive version

Hook contract refactor safety is an AI agent skill from the GitHub repository ai-shifu/ai-shifu. Use when refactoring hook return fields or parameter contracts. Update caller destructuring and argument objects together to prevent TypeScript property errors.

How to use this skill

Skill file

Hook 契约重构安全

核心规则

工作流

  1. 先在 hook 导出类型上完成改名或删参。
  2. 全局检索调用点并同步更新解构、索引、依赖数组。
  3. 清理对象字面量中的未知属性。
  4. 运行定向 tsc 或相关测试,确保契约收敛。
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.