component-refactoring 是做什么的?
重构 Dify 前端中高复杂度的 React 组件。当 pnpm analyze-component --json 显示复杂性 > 50 或行数 > 300,用户要求代码拆分、Hook 提取或降低复杂性,或 pnpm analyze-component 警告在测试前需要重构时使用;避免用于简单/结构良好的组件、第三方包装器或当用户明确要求测试而不重构时。
重构 Dify 前端中高复杂度的 React 组件。当 `pnpm analyze-component --json` 显示复杂性 > 50 或行数 > 300,用户要求代码拆分、Hook 提取或降低复杂性,或 `pnpm analyze-component` 警告在测试前需要重构时使用;避免用于简单/结构良好的组件、第三方包装器或当用户明确要求测试而不重构时。
该技能专门用于重构 Dify 前端项目中高复杂度的 React 组件。它的主要目标是通过自动化分析工具检测并优化组件的复杂性,确保代码库的可维护性和性能。技能会利用 `pnpm analyze-component --json` 命令获取组件的复杂性分数和行数,当复杂性超过 50 或行数超过 300 时触发重构建议。用户还可以通过请求代码拆分、Hook 提取或降低复杂性来手动激活该技能。支持平台包括 Dify 前端开发环境,并且需要 Node.js 和 pnpm 包管理器。技能的工作流程包括分析组件、识别问题区域、应用重构模式(如拆分大组件、提取自定义 Hooks、简化逻辑),并最终生成优化后的代码。需要注意的是,该技能应避免用于简单或结构良好的组件,以及第三方包装器,或当用户明确要求进行测试而不重构时。
npx skills add https://github.com/langgenius/dify/tree/main/skills/component-refactoringInstalled? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →
重构 Dify 前端中高复杂度的 React 组件。当 pnpm analyze-component --json 显示复杂性 > 50 或行数 > 300,用户要求代码拆分、Hook 提取或降低复杂性,或 pnpm analyze-component 警告在测试前需要重构时使用;避免用于简单/结构良好的组件、第三方包装器或当用户明确要求测试而不重构时。
This repo contains 3 individual skills — each has its own dedicated page.
Review backend code for quality, security, maintainability, and best practices based on established checklist rules. Use when the user requests a review, analysis, or improvement of backend files (e.g., `.py`) under the `api/` directory. Do NOT use for frontend files (e.g., `.tsx`, `.ts`, `.js`). Supports pending-change review, code snippets review, and file-focused review.
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.
Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.
Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.
Control Eight Sleep pods (status, temperature, alarms, schedules).
BluOS CLI (blu) for discovery, playback, grouping, and volume.
Create, search, and manage Bear notes via grizzly CLI.
Capture frames or clips from RTSP/ONVIF cameras.
Search GIF providers with CLI/TUI, download results, and extract stills/sheets.