LogoClawIndex
CasesSkillsAbout
LogoClawIndex

refactoring-extract-superclass - Extract Superclass Code Refactoring Technique

Create a new superclass from classes sharing common fields and methods to eliminate duplication

Tags

Updated: 2026-02-23

Capabilities

Typical Inputs

Typical Outputs

What this skill does

  • create empty superclass
  • make classes extend superclass
  • pull up shared fields
  • pull up shared methods
  • move constructor logic

Inputs

  • source code files
  • class definitions
  • shared fields
  • shared methods

Outputs

  • refactored code
  • new superclass definition
  • updated class hierarchies
  • consolidated shared logic

Requirements

  • code editor
  • object-oriented programming understanding
  • testing environment

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.
code-refactoring
object-oriented
clean-code
design-patterns
maintenance
create empty superclass
make classes extend superclass
pull up shared fields
pull up shared methods
source code files
class definitions
shared fields
refactored code
new superclass definition
updated class hierarchies