·code-refactoring
</>

code-refactoring

程式碼重構指南,當使用者要求重構元件或功能以及實施需要程式碼重構的計畫時,請使用此技能來指導您。

5安裝·0熱度·@rakaadi

安裝

$npx skills add https://github.com/rakaadi/agent-kit --skill code-refactoring

如何安裝 code-refactoring

透過命令列快速安裝 code-refactoring AI 技能到你的開發環境

  1. 開啟終端機: 開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 執行安裝指令: 複製並執行以下指令:npx skills add https://github.com/rakaadi/agent-kit --skill code-refactoring
  3. 驗證安裝: 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

來源:rakaadi/agent-kit。

SKILL.md

查看原文

This skill specializes in refactoring React Native components within the Ecalyptus healthcare mobile application. It focuses on eliminating deeply nested conditionals, optimizing array operations and component re-renders, improving RTK Query usage patterns, and enhancing code readability while maintaining React Compiler compatibility and ESLint compliance.

User Request: "This component has nested ifs and the list re-renders too much when I update a single item's state"

I can see two issues here. First, the nested conditionals in your render logic make it hard to understand the component's states. We can refactor this using ts-pattern for clearer state matching. Second, your mapped list items maintain their own expanded state, which gets lost on parent re-renders. We should lift that state to the parent component.

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/rakaadi/agent-kit --skill code-refactoring
分類
</>開發工具
認證
收錄時間
2026-02-22
更新時間
2026-03-10

Browse more skills from rakaadi/agent-kit

快速解答

什麼是 code-refactoring?

程式碼重構指南,當使用者要求重構元件或功能以及實施需要程式碼重構的計畫時,請使用此技能來指導您。 來源:rakaadi/agent-kit。

如何安裝 code-refactoring?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/rakaadi/agent-kit --skill code-refactoring 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

這個 Skill 的原始碼在哪?

https://github.com/rakaadi/agent-kit

詳情

分類
</>開發工具
來源
skills.sh
收錄時間
2026-02-22