component-refactoring 是做什麼的?
重構 Dify 前端中高複雜度的 React 元件。當 pnpm analyze-component --json 顯示複雜度大於 50 或行數大於 300 時使用,或用戶要求進行程式碼拆分、鉤子提取或複雜度降低時,或 pnpm analyze-component 警告需在測試前重構時使用;避免用於簡單/結構良好的元件、第三方包裝器,或用戶明確要求測試但不重構時。
重構 Dify 前端中高複雜度的 React 元件。當 `pnpm analyze-component --json` 顯示複雜度大於 50 或行數大於 300 時使用,或用戶要求進行程式碼拆分、鉤子提取或複雜度降低時,或 `pnpm analyze-component` 警告需在測試前重構時使用;避免用於簡單/結構良好的元件、第三方包裝器,或用戶明確要求測試但不重構時。
此技能專注於重構 Dify 前端專案中高複雜度的 React 元件,幫助開發者降低程式碼複雜度、提升可維護性。它基於 `pnpm analyze-component --json` 的分析結果,當元件複雜度超過 50 或行數超過 300 時觸發,並支援常見的重構操作,如程式碼拆分、自訂鉤子提取及複雜度降低。該技能明確提供使用與避免情境,能有效引導 AI 代理在合適時機進行重構,避免干擾已結構良好的元件或用戶明確的測試需求。主要支援 Dify 前端專案,並以指令式分析工具為決策依據。
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 時使用,或用戶要求進行程式碼拆分、鉤子提取或複雜度降低時,或 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.