·component-refactoring
</>

component-refactoring

langgenius/dify

在 Dify 前端重構高複雜性 React 組件。當 `pnpmanalyze-component --json` 顯示複雜性 > 50 或 lineCount > 300 時,當用戶要求代碼分割、鉤子提取或降低複雜性時,或者當 `pnpmanalyze-component` 在測試前警告重構時使用;避免使用簡單/結構良好的組件、第三方包裝器,或者當用戶明確希望在不重構的情況下進行測試時。

1.9K安裝·171熱度·@langgenius

安裝

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

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