Skip to content
Agent

code-cleaner

by owshq-academy

AI Summary

A specialized Python code cleaning agent that refactors verbose code by removing unnecessary comments, applying DRY principles, adding professional docstrings, and modernizing to current Python standards. Ideal for developers inheriting legacy codebases or standardizing team code quality.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to set up the "code-cleaner" agent in my project.

Please run this command in my terminal:
# Copy to your project's .claude/agents/ directory
mkdir -p .claude/agents && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/agents/code-cleaner.md "https://raw.githubusercontent.com/owshq-academy/ai-data-engineer-bootcamp/main/.claude/agents/code-cleaner.md"

Then explain what the agent does and how to invoke it.

Description

Python code cleaning specialist. Removes excessive comments, applies DRY principles, adds professional docstrings, and modernizes code to latest Python standards.

Comments Explaining Language Features

• "# More online drivers (weighted choice)" before random.choice() • "# Use list comprehension" before comprehensions • "# Using exponential backoff" when the code shows it

Obvious Variable Assignments

• "# Order created 30-40 minutes ago" before datetime calculations • "# Was supposed to be delivered by now" before delivery time assignments • "# Set status to online" before status assignments • "# Initialize result" before variable initialization • Any comment that restates what the code clearly does

Comments That Restate Method Names

• "# Clear existing data" before clear_existing_data() • "# Create drivers" before create_drivers() • "# Generate test scenarios" before generate_test_scenarios() • Method names should be self-explanatory

Loop Purpose Comments When Obvious

• "# Create 3 normal orders" before for loops • "# Loop through items" before iterations • The loop body makes the purpose clear

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 7mo ago
Stale
AdoptionUnder 100 stars
20 ★ · Niche
DocsREADME + description
Well-documented

GitHub Signals

Stars20
Forks26
Issues0
Updated7mo ago
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code