refactor
Guides the surgical refactoring of monolithic classes into modular, enterprise-grade service components.
Install
mkdir -p .claude/skills/refactor-jgreen021 && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19289" && unzip -o skill.zip -d .claude/skills/refactor-jgreen021 && rm skill.zipInstalls to .claude/skills/refactor-jgreen021
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
This standard governs the modernization of legacy code and the surgical decomposition of high-complexity monolithic structures.Key capabilities
- →Decompose monolithic services into triad layers
- →Convert mutable POJOs to Java Records
- →Enforce package-private visibility for controllers
- →Validate logic preservation via Gradle
How it works
The skill applies a Clean Chain strategy to separate concerns by splitting monolithic classes into controllers, service interfaces, and repositories while enforcing immutability with Java Records.
Inputs & outputs
When to use refactor
- →Decompose a monolithic service
- →Refactor legacy classes to Java Records
- →Apply single responsibility principle
- →Clean up service visibility
About refactor
Applies refactoring patterns to split monolithic services into separate business logic, data access, and model layers, focusing on immutability and concern separation.
This standard governs the modernization of legacy code and the surgical decomposition of high-complexity monolithic structures.
When not to use it
- →Refactoring for lean or minimum viable intent
- →Services where business logic and data access are already separated
Prerequisites
Limitations
- →Service handling business logic and data access must be split
How it compares
It mandates surgical decomposition into a specific service triad rather than generic code cleanup.
Compared to similar skills
refactor side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| refactor (this skill) | 0 | 6mo | No flags | Advanced |
| spring-boot-config-refactor | 0 | 7mo | No flags | Advanced |
| java-pro | 34 | 6mo | No flags | Advanced |
| backend-microservice-development | 2 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jgreen021
View all by jgreen021 →You might also like
spring-boot-config-refactor
sklintyg
Refactor a Spring Boot application's configuration from legacy application.properties and scattered @Value usage to structured YAML and immutable @ConfigurationProperties records. Use this when migrating messy configuration, standardizing property naming, introducing app-prefixed custom properties,
java-pro
sickn33
Master Java 21+ with modern features like virtual threads, pattern matching, and Spring Boot 3.x. Expert in the latest Java ecosystem including GraalVM, Project Loom, and cloud-native patterns. Use PROACTIVELY for Java development, microservices architecture, or performance optimization.
backend-microservice-development
TencentBlueKing
后端微服务开发规范,涵盖目录结构、分层架构(API/Service/DAO)、依赖注入、配置管理、Spring Boot 最佳实践。当用户进行后端开发、创建新微服务、编写 Kotlin/Java 代码或设计服务架构时使用。
microservice-infrastructure
TencentBlueKing
微服务基础设施指南,涵盖条件配置、事件驱动架构、服务间通信、国际化与日志等微服务架构的核心基础设施。当用户实现服务间调用、配置多环境、实现异步通信、处理国际化或规范日志输出时使用。
common-technical-practices
TencentBlueKing
通用技术实践指南,涵盖 AOP 切面、分布式锁、重试机制、参数校验、性能监控、定时任务、审计日志等后端开发中的常见技术实践。当用户需要实现横切关注点、处理并发控制、配置重试策略、添加性能监控或实现审计功能时使用。
jakarta-namespace
benchflow-ai
Migrate Java EE javax.* imports to Jakarta EE jakarta.* namespace. Use when upgrading to Spring Boot 3.x, migrating javax.persistence, javax.validation, javax.servlet imports, or fixing compilation errors after Jakarta EE transition. Covers package mappings, batch sed commands, and verification steps.