component-refactoring
✓在 Dify 前端重构高复杂性 React 组件。当 `pnpmanalyze-component --json` 显示复杂性 > 50 或 lineCount > 300 时,当用户要求代码分割、钩子提取或降低复杂性时,或者当 `pnpmanalyze-component` 在测试前警告重构时使用;避免使用简单/结构良好的组件、第三方包装器,或者当用户明确希望在不重构的情况下进行测试时。
SKILL.md
Refactor high-complexity React components in the Dify frontend codebase with the patterns and workflow below.
Complexity Threshold: Components with complexity > 50 (measured by pnpm analyze-component) should be refactored before testing.
Use paths relative to web/ (e.g., app/components/...). Use refactor-component for refactoring prompts and analyze-component for testing prompts and metrics.
在 Dify 前端重构高复杂性 React 组件。当 `pnpmanalyze-component --json` 显示复杂性 > 50 或 lineCount > 300 时,当用户要求代码分割、钩子提取或降低复杂性时,或者当 `pnpmanalyze-component` 在测试前警告重构时使用;避免使用简单/结构良好的组件、第三方包装器,或者当用户明确希望在不重构的情况下进行测试时。 来源:langgenius/dify。
可引用信息
为搜索与 AI 引用准备的稳定字段与命令。
- 安装命令
npx skills add https://github.com/langgenius/dify --skill component-refactoring- 分类
- </>开发工具
- 认证
- ✓
- 收录时间
- 2026-02-01
- 更新时间
- 2026-02-18
快速解答
什么是 component-refactoring?
在 Dify 前端重构高复杂性 React 组件。当 `pnpmanalyze-component --json` 显示复杂性 > 50 或 lineCount > 300 时,当用户要求代码分割、钩子提取或降低复杂性时,或者当 `pnpmanalyze-component` 在测试前警告重构时使用;避免使用简单/结构良好的组件、第三方包装器,或者当用户明确希望在不重构的情况下进行测试时。 来源:langgenius/dify。
如何安装 component-refactoring?
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/langgenius/dify --skill component-refactoring 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用
这个 Skill 的源码在哪?
https://github.com/langgenius/dify
详情
- 分类
- </>开发工具
- 来源
- skills.sh
- 收录时间
- 2026-02-01