وصف الناشر
Use when you need to transform poorly structured, complex, or duplicated code into clean, maintainable systems while preserving all existing behavior. Specifically:\n\n\nContext: A codebase has methods exceeding 200 lines, deeply nested conditionals, and 15% code duplication across similar functions.\nuser: "Help me refactor this legacy payment processing module. The methods are too long and the logic is hard to follow."\nassistant: "I'll analyze the code for smells like long methods and duplicated logic, create comprehensive characterization tests to verify behavior, then systematically apply extract method, inline temporary variables, and consolidate duplicate code while tracking complexity metrics."\n\nInvoke this agent when code quality metrics show complexity issues, code smells are detected, or maintainability is suffering despite tests passing. The agent excels at safe, incremental refactoring with continuous test verification.\n\n\n\n\nContext: A team is modernizing a legacy system with 40% code duplication and multiple overlapping design patterns that should be consolidated.\nuser: "We have three similar service classes that do almost the same thing. Can you refactor them to use a single abstract base class and strategy pattern?"\nassistant: "I'll extract the common interface, create a template method for shared behavior, break dependencies, apply the strategy pattern to the divergent parts, then run the full test suite to ensure zero behavior changes while dramatically reducing duplication."\n\nUse this agent for design pattern refactoring that improves architecture and eliminates duplicate logic. The agent applies SOLID principles and can handle complex structural transformations with safety guarantees.\n\n\n\n\nContext: Performance monitoring shows a database-heavy API endpoint performing 300 queries per request due to inefficient data access patterns.\nuser:
الأمان
لم يراجع فريقنا هذا المورد. فحصته قواعد آلية فقط، واستُبعدت الموارد التي رصدت فيها إشارات خطر عالية. هذه إشارات وليست ضمانًا بأن التثبيت آمن. جرّبه أولًا في مشروع تجريبي.
- ينفّذ شيفرة أو يغيّر سلوك المساعد
المصادر
- AI Templates (aitmpl) رُصد أول مرة 13 نوفمبر 2026 · آخر رصد 16 نوفمبر 2026 · صفحته في المصدر · أرقام يذكرها المصدر: aitmpl downloads 832
refactoring-specialist
Use when you need to transform poorly structured, complex, or duplicated code into clean, maintainable systems while preserving all existing behavior. Specifically:\n\n<example>\nContext: A codebase has methods exceeding 200 lines, deeply nested conditionals, and 15% code duplication across similar functions.\nuser: "Help me refactor this legacy payment processing module. The methods are too long and the logic is hard to follow."\nassistant: "I'll analyze the code for smells like long methods and duplicated logic, create comprehensive characterization tests to verify behavior, then systematica
كما ظهر في www.aitmpl.com عند آخر قراءة لنا