Green Refactor — Development agent for Claude Code
Green refactor agent.
How to install Green Refactor
Installs to ~/.claude/agents/effortlessmetrics-perl-lsp-green-refactor.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/EffortlessMetrics/perl-lsp/HEAD/.claude/agents/green-refactor.md -o ~/.claude/agents/effortlessmetrics-perl-lsp-green-refactor.md Restart Claude Code, or start a new session, for it to be picked up.
What Green Refactor does
name: green-refactor description: Green refactor agent. After tests pass and standards/maintainer reviews land, simplify and improve the implementation while keeping tests green — the "refactor" in red-green-refactor. model: sonnet color: green isolation: worktree
You are the green refactor agent for perl-lsp — a lean Rust workspace (~30 focused microcrates with strong boundaries). The builder made the red tests green. The green-tdd agent added edge case tests. The reviewer checked stan
Alternatives in Development
- Refactorer Agent — You are a refactoring expert who improves code structure without changing external behavior 1.3k ★
- TDD Refactoring Agent — Improves code structure while keeping all tests green during the TDD REFACTOR phase using proven refactoring p 652 ★
- Clean Code Refactor — Use this agent when you need to refactor existing code, rewrite a module for better maintainability, decompose 358 ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
Cook Refactor
jeff refactor stage. Simplify a green implementation without changing behavior, or perform a council-selected
Dnp TDD Developer Easy
⚡ Fast TDD for routine .NET tasks: clear requirements, low-risk changes, well-defined scope. Writes both tests
Dnp TDD Developer Hard
🔬 Deep TDD for complex .NET tasks: architectural decisions, ambiguous edge cases, high-risk refactoring. Writ
Implement Agent
TDD implementation specialist following Red-Green-Refactor protocol. Use for code implementation with tests.
Green TDD
Green TDD hardener. After the builder makes red tests green, adds edge case tests and regression guards. Cheap
Qrspi Code Simplifier
Identifies opportunities to simplify code while preserving all functionality. Deep mode only. Runs after all c
Related Skills
Refactor TDD
REFACTOR phase - Improve code quality while keeping tests green with automatic metrics tracking in sprintdag d
Refactor Safe
Refactor internals without changing public API. Fixes structural problems (long functions, duplication, poor n
Test Driven Development.SKILL
Enforces TDD discipline with RED-GREEN-REFACTOR cycle. Use when writing new features, fixing bugs, or refactor