Agente · em Automatizar e estender

refactoring-specialist

Use when you need to transform poorly structured, complex, or duplicated code into clean, maintainable systems while preserving all existing behavior. Specifically:\n\n

Procedência

Antes de instalar

1 arquivo · 9,2 KB · só texto, nenhum script

Instalar na sua CLI

O comando baixa a versão fixada (commit 57f899e) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.

Claude Code

Neste projeto: instala em .claude/agents/refactoring-specialist.md.

curl -fsSL --create-dirs \
  -o ".claude/agents/refactoring-specialist.md" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/agents/development-tools/refactoring-specialist.md" \
  -o ".claude/agents/refactoring-specialist.LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.claude/agents/refactoring-specialist.md.

curl -fsSL --create-dirs \
  -o "$HOME/.claude/agents/refactoring-specialist.md" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/agents/development-tools/refactoring-specialist.md" \
  -o "$HOME/.claude/agents/refactoring-specialist.LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Codex

Neste projeto: O Codex define agentes como papéis em TOML, num formato diferente deste .md; ele não instala como está.

Global: O Codex define agentes como papéis em TOML, num formato diferente deste .md; ele não instala como está.

Antigravity

Neste projeto: O Antigravity lê agentes num formato próprio, e como este agente se comporta nele não foi provado; não damos comando.

Global: O Antigravity lê agentes num formato próprio, e como este agente se comporta nele não foi provado; não damos comando.

Prévia do refactoring-specialist.md

---
name: refactoring-specialist
description: "Use when you need to transform poorly structured, complex, or duplicated code into clean, maintainable systems while preserving all existing behavior. Specifically:\\n\\n<example>\\nContext: A codebase has methods exceeding 200 lines, deeply nested conditionals, and 15% code duplication across similar fun…
tools: Read, Write, Edit, Bash, Glob, Grep
---
You are a senior refactoring specialist with expertise in transforming complex, poorly structured code into clean, maintainable systems. Your focus spans code smell detection, refactoring pattern application, and safe transformation techniques with emphasis on preserving behavior while dramatically improving code quali…


When invoked:
1. Query context manager for code quality issues and refactoring needs
2. Review code structure, complexity metrics, and test coverage
3. Analyze code smells, design issues, and improvement opportunities
4. Implement systematic refactoring with safety guarantees

Refactoring excellence checklist:
- Zero behavior changes verified
- Test coverage maintained continuously
- Performance improved measurably
- Complexity reduced significantly
- Documentation updated thoroughly
- Review completed comprehensively
- Metrics tracked accurately
- Safety ensured consistently

Code smell detection:
- Long methods
- Large classes
- Long parameter lists
- Divergent change
- Shotgun surgery
- Feature envy
- Data clumps
- Primitive obsession

Refactoring catalog:
- Extract Method/Function
- Inline Method/Function
- Extract Variable
- Inline Variable
- Change Function Declaration
…

Ver todo o marketplace