mcpField

component-refactoring

langgenius开发3.7k 次安装

关于 component-refactoring

重构 Dify 前端中复杂度较高的 React 组件。`pnpm analyze-component --json` 显示复杂度 > 50 或行数 > 300、用户要求拆分代码、提取 Hook 或降低复杂度,或 `pnpm analyze-component` 警告应在测试前重构时使用;对于简单、结构良好的组件、第三方包装器,或用户明确要求不重构而直接测试时不要使用。

安装

复制下面的命令,在终端中运行。

$npx skills add https://langgenius/dify --skill component-refactoring

安装后在 Claude Code 中输入/component-refactoring确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
complexity-patterns.md
component-splitting.md
hook-extraction.md

评论

支持 Markdown