Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
proffesor-for-testing avatar

Qe Refactoring Patterns

  • 67 installs
  • 433 repo stars
  • Updated August 4, 2026
  • proffesor-for-testing/agentic-qe

qe-refactoring-patterns is a Claude Code skill for code review & quality.

About

qe-refactoring-patterns is a Claude Code skill for code review & quality. It helps solo builders move faster with AI-assisted development.

  • qe-refactoring-patterns
  • Code Review & Quality
  • AI-coding skill

Qe Refactoring Patterns by the numbers

  • 67 all-time installs (skills.sh)
  • +3 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #528 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill qe-refactoring-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs67
repo stars433
Last updatedAugust 4, 2026
Repositoryproffesor-for-testing/agentic-qe

How do I helps with code review & quality tasks.?

Helps with code review & quality tasks.

Who is it for?

Best when you're working on code review & quality and need structured help with qe refactoring patterns.

Skip if: Teams with no code review & quality needs, or anyone wanting a generic chat assistant without this specific workflow.

When should I use this skill?

When you need to helps with code review & quality tasks., or when qe-refactoring-patterns is a claude code skill for code review & quality.

What you get

Structured output aligned to qe-refactoring-patterns: qe-refactoring-patterns, Code Review & Quality.

Files

SKILL.mdMarkdownGitHub ↗

Refactoring Patterns

<default_to_action> When refactoring: 1. ENSURE tests pass (never refactor without tests) 2. MAKE small change (one refactoring at a time) 3. RUN tests (must stay green) 4. COMMIT (save progress) 5. REPEAT

Safe Refactoring Cycle:

npm test               # Green ✅
# Make ONE small change
npm test               # Still green ✅
git commit -m "refactor: extract calculateTotal"
# Repeat

Code Smells → Refactoring:

SmellRefactoring
Long method (>20 lines)Extract Method
Large classExtract Class
Long parameter list (>3)Introduce Parameter Object
Duplicated codeExtract Method/Class
Complex conditionalDecompose Conditional
Magic numbersNamed Constants
Nested loopsReplace Loop with Pipeline

NEVER REFACTOR:

  • Without tests (write tests first)
  • When deadline is tomorrow
  • Code you don't understand
  • Code that works and won't be touched

</default_to_action>

Quick Reference Card

Common Refactorings

PatternBeforeAfter
Extract Method50-line function5 small functions
Extract ClassClass doing 5 things5 single-purpose classes
Parameter Objectfn(a,b,c,d,e,f)fn(options)
Replace Conditionalif (type === 'a') {...}Polymorphism
PipelineNested loops.filter().map().reduce()

The Rule of Three

1. First time → Just do it 2. Second time → Wince and duplicate 3. Third time → Refactor

---

Key Patterns

Extract Method

// Before: Long method
function processOrder(order) {
  // 50 lines of validation, calculation, saving, emailing...
}

// After: Clear responsibilities
function processOrder(order) {
  validateOrder(order);
  const pricing = calculatePricing(order);
  const saved = saveOrder(order, pricing);
  sendConfirmationEmail(saved);
  return saved;
}

Replace Loop with Pipeline

// Before
let results = [];
for (let item of items) {
  if (item.inStock) {
    results.push(item.name.toUpperCase());
  }
}

// After
const results = items
  .filter(item => item.inStock)
  .map(item => item.name.toUpperCase());

Decompose Conditional

// Before
if (order.total > 1000 && customer.isPremium && allInStock(order)) {
  return 'FREE_SHIPPING';
}

// After
function isEligibleForFreeShipping(order, customer) {
  return isLargeOrder(order) &&
         isPremiumCustomer(customer) &&
         allInStock(order);
}

---

Refactoring Anti-Patterns

❌ Anti-PatternProblem✅ Better
Without testsNo safety netWrite tests first
Big bangRewrite everythingSmall incremental steps
For perfectionEndless tweakingGood enough, move on
Premature abstractionPattern not clear yetWait for Rule of Three
During feature workMixed changesSeparate commits

---

Agent Integration

// Detect code smells
const smells = await Task("Detect Code Smells", {
  source: 'src/services/',
  patterns: ['long-method', 'large-class', 'duplicate-code']
}, "qe-quality-analyzer");

// Safe refactoring with test verification
await Task("Verify Refactoring", {
  beforeCommit: 'abc123',
  afterCommit: 'def456',
  expectSameBehavior: true
}, "qe-test-executor");

---

Agent Coordination Hints

Memory Namespace

aqe/refactoring/
├── smells/*          - Detected code smells
├── suggestions/*     - Refactoring recommendations
├── verifications/*   - Behavior preservation checks
└── history/*         - Refactoring log

Fleet Coordination

const refactoringFleet = await FleetManager.coordinate({
  strategy: 'refactoring',
  agents: [
    'qe-quality-analyzer',   // Identify targets
    'qe-test-generator',     // Add safety tests
    'qe-test-executor',      // Verify behavior
    'qe-test-refactorer'     // TDD refactor phase
  ],
  topology: 'sequential'
});

---

Related Skills

  • tdd-london-chicago - TDD refactor phase
  • code-review-quality - Review refactored code
  • xp-practices - Collective ownership

---

Remember

Refactoring is NOT:

  • Adding features
  • Fixing bugs
  • Performance optimization
  • Rewriting from scratch

Refactoring IS:

  • Improving structure
  • Making code clearer
  • Reducing complexity
  • Removing duplication
  • Without changing behavior

Always have tests. Always take small steps. Always keep tests green.

Related skills

FAQ

What does qe-refactoring-patterns do?

qe-refactoring-patterns is a Claude Code skill for code review & quality.

When should I use qe-refactoring-patterns?

When you need to helps with code review & quality tasks., or when qe-refactoring-patterns is a claude code skill for code review & quality.

What are the main capabilities?

qe-refactoring-patterns; Code Review & Quality; AI-coding skill.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.