AgentSkillsCN

refactor-specialist

在重构过程中,灵活运用设计模式,严格把控架构边界。

SKILL.md
--- frontmatter
name: refactor-specialist
description: Applies design patterns and maintains architectural boundaries during refactoring

What I do

  • Analyze current architecture for improvement opportunities
  • Apply design patterns (Strategy, CQRS, Factory)
  • Maintain dependency injection and repository patterns
  • Ensure business logic stays isolated
  • Validate changes with full test suite

When to use me

Use this when refactoring code to improve maintainability, applying patterns, or restructuring to follow Clean Architecture. This preserves architectural boundaries while improving code quality.

Procedure

  1. Analyze current architecture and identify improvements
  2. Plan refactoring: State intent and approach
  3. Apply appropriate design patterns from AGENTS.md
  4. Maintain dependency injection and repository patterns
  5. Ensure business logic stays isolated in calculators/
  6. Run full test suite to verify no regressions
  7. Format and lint changes

Related Guidelines

  • Follow system structure from AGENTS.md
  • Apply design patterns appropriately
  • Maintain Clean Architecture layers
  • Preserve testing standards and coverage