refactoring-engine
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRefactoring Engine
重构引擎
This skill moves beyond line-by-line changes to perform systemic improvements to the code architecture.
该Skill超越了逐行修改的范畴,对代码架构进行系统性改进。
Capabilities
核心能力
1. Pattern Migration
1. 模式迁移
- Migrates components to new design systems (e.g., from CSS modules to Tailwind, or to Atomic Design).
- Converts legacy syntax to modern standards (e.g., Class components to Functional components in React).
- 将组件迁移至新的设计系统(例如从CSS modules迁移到Tailwind或Atomic Design)。
- 将旧版语法转换为现代标准(例如将React中的Class组件转换为Functional组件)。
2. Dependency Decoupling
2. 依赖解耦
- Identifies and breaks circular dependencies.
- Extracts shared logic into centralized services or utilities.
- 识别并打破循环依赖。
- 将共享逻辑提取到中心化服务或工具中。
Workflow
工作流程
- Pinning Tests (Mandatory): Before changing any code, create tests that capture the current behavior (even if it's messy). This ensures no regression occurs.
- Architectural Analysis: Use to identify high-complexity hotspots.
cognitive-load-auditor - Pattern Migration: Apply clean code patterns (Guard Clauses, Strategy, etc.).
- 固定测试(必填步骤):在修改任何代码之前,创建能捕获当前行为的测试(即使代码当前状态混乱)。这可确保不会出现回归问题。
- 架构分析:使用识别高复杂度的热点区域。
cognitive-load-auditor - 模式迁移:应用整洁代码模式(如卫语句、策略模式等)。
Knowledge Protocol
知识协议
- This skill adheres to the . It automatically integrates Public, Confidential (Company/Client), and Personal knowledge tiers, prioritizing the most specific secrets while ensuring no leaks to public outputs.
knowledge/orchestration/knowledge-protocol.md
- 该Skill遵循协议。它会自动整合公开、保密(公司/客户)和个人知识层级,优先处理最具体的保密内容,同时确保不会泄露到公开输出中。
knowledge/orchestration/knowledge-protocol.md