Make It Pretty
I'll improve code readability while preserving exact functionality.
Strategic Thinking Process
Code Analysis
- What makes this code "ugly" or hard to read?
- Are there complex nested structures that need simplification?
- Is the naming unclear or inconsistent?
- Are there repeated patterns that could be abstracted?
Safety Considerations
- Which changes are purely cosmetic (safe)?
- Which might affect behavior (risky)?
- Are there implicit dependencies on current structure?
- Could renaming break external references?
Improvement Strategy
- Priority 1: Clear naming (variables, functions, files)
- Priority 2: Reduce complexity (extract functions, simplify logic)
- Priority 3: Remove redundancy (DRY principle)
- Priority 4: Improve type safety (if applicable)
Validation Approach
- How can I ensure functionality remains identical?
- What tests exist to verify behavior?
- Should I add temporary logging to verify flow?
Based on this analysis, I'll proceed safely:
Safety First:
- Create git checkpoint before changes
- Use Write tool to create backups
- Track all modifications systematically
I'll identify files to beautify based on:
- Files you specify, or if none specified, analyze the entire application
- Recently modified code
- Our conversation context
Improvements I'll Make:
- Variable and function names for clarity
- Code organization and structure
- Remove unused code and clutter
- Simplify complex expressions
- Group related functionality
- Fix loose or generic type declarations
- Add missing type annotations where supported
- Make types more specific based on usage
My Approach:
- Analyze current code patterns and type usage
- Apply consistent naming conventions
- Improve type safety where applicable
- Reorganize for better readability
- Remove redundancy without changing logic
Quality Assurance:
- All functionality remains identical
- Tests continue to pass (if available)
- No behavior changes occur
- Clear commit messages for changes
Important: I will NEVER:
- Add "Co-authored-by" or any Claude signatures
- Include "Generated with Claude Code" or similar messages
- Modify git config or user credentials
- Add any AI/assistant attribution to the commit
This helps transform working code into maintainable code without risk.