跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Refactoring Patterns

技能 已验证 活跃

Apply named refactoring transformations to improve code structure without changing behavior. Use when the user mentions "refactor this", "code smells", "extract method", "replace conditional", "technical debt", "move method", "inline variable", or "decompose conditional". Also trigger when cleaning up legacy code, preparing code for new features by restructuring, or identifying which transformation to apply to a specific code smell. Covers smell-driven refactoring, safe transformation sequences, and testing guards. For code quality foundations, see clean-code. For managing complexity, see software-design-philosophy.

目的

To systematically improve code structure and reduce technical debt by applying proven, named refactoring patterns, ensuring code remains maintainable and understandable.

功能

  • Apply named refactoring transformations
  • Improve code structure without changing behavior
  • Guidance on smelling code and applying fixes
  • Comprehensive catalog of refactoring patterns
  • Safe refactoring workflow with testing guards

使用场景

  • Refactoring code to improve its internal structure
  • Reducing technical debt through systematic transformations
  • Preparing code for new features by restructuring existing logic
  • Identifying and applying the correct refactoring for specific code smells

非目标

  • Changing the observable behavior of the code
  • Adding new features during the refactoring process
  • Performing a complete rewrite of the codebase
  • Optimizing code for performance before clarity

安装

请先添加 Marketplace

/plugin marketplace add wondelai/skills
/plugin install skills@wondelai-skills

质量评分

已验证
99 /100
1 day ago 分析

信任信号

最近提交17 days ago
星标953
许可证MIT
状态
查看源代码

类似扩展

Coding Standards

100

Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.

技能
affaan-m

Moyu (摸鱼)

100

감지된 과잉 엔지니어링 패턴: (1) 사용자가 명시적으로 요청하지 않은 코드나 파일을 수정할 때 (2) 요청되지 않은 새로운 추상화 계층(클래스, 인터페이스, 팩토리, 래퍼)을 생성할 때 (3) 요청되지 않은 주석, 문서, JSDoc, 타입 주석을 추가할 때 (4) 요청되지 않은 새로운 종속성을 도입할 때 (5) 최소 편집 대신 파일 전체를 다시 작성할 때 (6) diff 범위가 사용자의 요청을 명백히 초과할 때 (7) 사용자가 "너무 많아", "거기는 건드리지 마", "X만 변경해", "간단하게", "그만"과 같은 신호를 보낼 때 (8) 발생할 수 없는 시나리오에 대한 오류 처리, 유효성 검사, 방어적 코드를 추가할 때 (9) 요청되지 않은 테스트, 설정 스캐폴딩, 문서를 생성할 때

技能
uucz

Migrate Validate

100

Validate pending migrations for foreign key consistency, rollback safety, and best practices

技能
ruvnet

Semgrep Rule Creator

100

Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.

技能
trailofbits

Cleanup Cycles

100

Detect and untangle circular dependencies. Runs madge/skott (TS), pycycle (Py), or compiler-only checks (Go/Rust). Auto-fixes leaf-extractable cycles; reports core cycles for human review. Use when the user asks to find circular imports, fix dependency cycles, or untangle module graph. Example queries — "find circular imports", "fix dependency cycles", "untangle our module graph", "why is madge complaining".

技能
raintree-technology

Agent Coder

99

Agent skill for coder - invoke with $agent-coder

技能
ruvnet