用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vuralserhat86/antigravity-agentic-skills --skill refactoring-patterns命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Guide for conducting comprehensive accessibility audits of code to identify WCAG compliance issues and barriers to inclusive design. This skill should be used when reviewing accessibility, ARIA implementation, keyboard navigation, or screen reader compatibility.
Transform clarified user requests into structured delegation prompts optimized for specialist agents (cto-architect, strategic-cto-mentor, cv-ml-architect). Use after clarification is complete, before routing to specialist agents. Ensures agents receive complete context for effective work.
AGENTS.md dosyaları oluşturma, monorepo yapılandırma ve agent instruction yönetimi rehberi.
基于 SOC 职业分类
正在显示 SKILL.md
| name | refactoring_patterns |
| description | Common refactoring patterns - Extract, Rename, Move ve code smell çözümleri. |
Common refactoring patterns ve code smell çözümleri.
Davranışı DEĞİŞTİRME, sadece yapıyı iyileştir
Before: Input X → [Code A] → Output Y
After: Input X → [Code B] → Output Y (AYNI!)
| Smell | Çözüm |
|---|---|
| Long Method | Extract Method |
| Large Class | Extract Class |
| Duplicate Code | Extract + Reuse |
| Long Parameter List | Parameter Object |
| Feature Envy | Move Method |
| Data Clumps | Extract Class |
// ❌ Before
function processOrder(order) {
// 20 lines of validation
// 30 lines of calculation
// 15 lines of formatting
}
// ✅ After
function processOrder(order) {
validateOrder(order);
const total = calculateTotal(order);
return formatOutput(total);
}
// ❌ Before
function getPrice(type) {
if (type === 'premium') return 100;
if (type === 'basic') return 50;
return 30;
}
// ✅ After
const pricing = { premium: 100, basic: 50, free: 30 };
const getPrice = (type) => pricing[type] ?? 30;
Refactoring Patterns v1.1 - Enhanced
Kaynak: Refactoring.guru & Martin Fowler - Refactoring
Decompose Conditional veya Replace Nested Conditional with Guard Clauses ile basitleştir.Extract Method ve Extract Class ile sorumlulukları (SRP) ayır. Primitive Obsession varsa Value Object'e çevir.var -> const/let, for -> map/filter, Callback -> Async/Await dönüşümlerini uygula (Dil özelliklerini kullan).| Aşama | Doğrulama |
|---|---|
| 1 | Refactoring sırasında yeni özellik eklendi mi? (KESİNLİKLE HAYIR. İki şapka kuralı: Ya Refactor yap ya Feature ekle). |
| 2 | Kodun okunabilirliği arttı mı? (Cognitive Complexity düştü mü?). |
| 3 | Test kapsamı (Coverage) korundu mu? |