cleanup

Clean up code on the current branch by removing unnecessary comments and simplifying docstrings.

1|Updated May 12, 2018
One-click install
npx skills add https://github.com/tbroadley/dotfiles --skill cleanup-tbroadley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/tbroadley/dotfiles/tree/main/claude/skills/cleanup
Command: npx skills add https://github.com/tbroadley/dotfiles --skill cleanup-tbroadley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers clean up code by removing unnecessary comments, simplifying docstrings, and reorganizing tests to improve readability and maintainability.

Core Features & Use Cases

  • Remove unnecessary comments that restate obvious behavior.
  • Simplify verbose docstrings while preserving meaning.
  • Parameterize tests to reduce duplication and improve coverage.
  • Apply consistent cleanup rules across modified code on the current branch.

Quick Start

Run the cleanup workflow to remove unnecessary comments, simplify docstrings, and parameterize tests on the files changed in the current branch.

Frequently Asked Questions about cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove unnecessary comments and simplify docstrings on my current git branch?

You can remove unnecessary comments and simplify verbose docstrings by running an automated code cleanup workflow that targets only the files changed in your current git branch via git diff main...HEAD. It preserves meaningful comments and non-obvious behavior while reducing clutter.

What's the best way to clean up code and reduce test duplication before a pull request?

The best way to clean up code before a pull request is to automate the removal of redundant comments, simplify docstrings, and parameterize tests to reduce duplication. This ensures consistent cleanup rules are applied only to modified files on your current branch.

Does this code cleanup workflow affect files outside of my current git diff?

No, this code cleanup workflow only affects files identified via git diff main...HEAD. It strictly targets changes on your current branch, ensuring that unrelated files in the repository remain untouched during the refactoring process.

Can I parameterize tests and consolidate test suites as part of a branch cleanup?

Yes, you can parameterize tests and consolidate test suites as part of a branch cleanup. The workflow reorganizes tests to reduce duplication and improve coverage while applying cleanup rules to the modified code on your current branch.

When should I avoid using automated code cleanup on my branch?

You should avoid automated code cleanup if your branch contains intentional verbose docstrings or comments that must remain unchanged for specific external documentation requirements, as the workflow simplifies docstrings and removes comments that restate obvious behavior.

What is code cleanup and how does it handle non-obvious behavior in the codebase?

Code cleanup is the process of removing unnecessary comments, simplifying docstrings, and consolidating tests to improve readability. It follows specific guidelines to preserve meaningful comments and protect non-obvious behavior from being removed during the refactoring process.