Clean Code Refactor — Development agent for Claude Code
Use this agent when you need to refactor existing code, rewrite a module for better maintainability, decompose a large file into focused sub-modules, eliminate duplication, improve type safety, optimi.
How to install Clean Code Refactor
Installs to ~/.claude/agents/opensource03-harnss-clean-code-refactor.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/OpenSource03/harnss/HEAD/.claude/agents/clean-code-refactor.md -o ~/.claude/agents/opensource03-harnss-clean-code-refactor.md Restart Claude Code, or start a new session, for it to be picked up.
What Clean Code Refactor does
name: "clean-code-refactor" description: "Use this agent when you need to refactor existing code, rewrite a module for better maintainability, decompose a large file into focused sub-modules, eliminate duplication, improve type safety, optimize performance, or generally elevate code quality. This agent goes beyond the minimum ask — it proactively identifies and fixes adjacent issues like loose types, poor separation of concerns, missing abstractions, and inefficient patterns.\\n\\nExamples:\
Alternatives in Development
- Resource Duplication — Resource duplication expert - use when configuring a resource to be copied between projects 39.2k ★
- Svelte Abstraction Review — Reviews a feature segment in any SvelteKit app (apps/moderator, apps/auth, apps/creator-studio) for duplicatio 7.2k ★
- Code Refactorer — Use this agent when you need to improve existing code structure, readability, or maintainability wit 2k ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
Code Cleanup Optimizer
Remove technical debt, improve quality, eliminate redundancy after implementation is verified. Never use befor
Code Enhancement Specialist
Use this agent when you need systematic improvements to existing code, including refactoring for better perfor
08 Refactorer
Code improvement specialist that restructures code for better maintainability, readability, and performance wi
Hatch3r Maintainability
Maintainability quality specialist — reviews generated code for duplication index, pattern reuse, cyclomatic c
Code Quality
Code review agent that finds real problems — dead code, duplication, error handling, performance, type safety.
Size Purist
The merciless executioner of bloated files. Use this agent to find oversized files, god classes, mega-componen
Related Skills
Split File
Split large files (>1500 lines) into focused modules
Refactor TDD
REFACTOR phase - Improve code quality while keeping tests green with automatic metrics tracking in sprintdag d
Twin Sparrow Code Quality Skill
Review, refactor, and harden code for correctness, maintainability, testability, and operational safety across