code-cleanup

Removes code bloat and duplication from Nx monorepo pull requests and branch diffs.

1|1|Updated Jun 11, 2024
One-click install
npx skills add https://github.com/ag-grid/ag-shared --skill code-cleanup-ag-grid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-cleanup
Source: https://github.com/ag-grid/ag-shared/tree/main/prompts/skills/code-cleanup
Command: npx skills add https://github.com/ag-grid/ag-shared --skill code-cleanup-ag-grid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams remove code bloat and duplication, improving readability and maintainability to deliver production-ready software.

Core Features & Use Cases

  • Bloat removal: Identify and remove redundant code, unused logic, and excessive comments.
  • Deduplication and refactoring: Consolidate repeated patterns into reusable helpers and cleaner abstractions.
  • Production-ready workflow: Align changes with project standards and deterministic review flows for monorepos.

Quick Start

Review and clean up the current branch to produce a lean, readable, and production-ready codebase.

Frequently Asked Questions about code-cleanup

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

FAQPage Schema
How do I remove code bloat and duplication in an Nx monorepo?

Code bloat removal in an Nx monorepo involves analyzing branch diffs during pull request reviews to identify redundant logic and consolidate repeated patterns into reusable helpers, ensuring deterministic refactors that preserve external behavior.

What is the best way to refactor code during a pull request review?

The best way to refactor code during a pull request review is to analyze the git diff against a base branch, applying scoped refactors that remove unused logic and excessive comments to deliver a cleaner, production-ready codebase.

Does code cleanup alter external behavior when distilling branch diffs?

Code cleanup does not alter external behavior when distilling branch diffs. It applies deterministic, scoped refactors that consolidate repeated patterns and remove bloat while strictly preserving the existing functionality of your codebase.

Can I use this to clean up unused logic and excessive comments in my project?

Yes, you can clean up unused logic and excessive comments in your project. The Skill identifies redundant code during branch diff analysis and removes it to improve readability and maintainability for production-ready software.

When do I need to run bloat removal on a git diff?

You need to run bloat removal on a git diff when preparing a pull request in an Nx monorepo. It distills the current branch against a base, ensuring your changes are free of duplication and align with production-ready workflow standards.