ai-code-cleanup_skill

This skill cleans up AI-generated code slop after AI-assisted sessions by removing comments, defensive bloat, type workarounds, and style inconsistencies.
  • Python

2

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill 89jobrien/steve --skill ai-code-cleanup

  • SKILL.md7.0 KB

Overview

This skill removes AI-generated code slop from branches to improve readability, maintainability, and consistency. It targets defensive bloat, unnecessary comments, type-workarounds, and style inconsistencies introduced by AI-assisted coding. Use it to shrink noisy diffs while preserving behavior and test coverage.

How this skill works

The skill scans changed files to detect common AI artifact patterns (redundant comments, extra try/catch blocks, needless type casts, naming/formatting mismatches). It proposes or makes surgical edits that remove the slop while preserving functionality. After edits it runs basic validations (lint, type checks, and available tests) to ensure no regressions.

When to use it

  • After an AI-assisted coding session to tidy generated code
  • Before opening or merging a pull request to reduce review noise
  • When code feels over-engineered or contains redundant defensive checks
  • When type workarounds like casts or @ts-ignore appear
  • When standardizing style across files after generation

Best practices

  • Read the full file context before removing code to avoid changing behavior
  • Prefer minimal, focused edits that reduce lines and complexity
  • Keep legitimate error handling and validation for untrusted inputs
  • Run linting, type checks, and tests after each cleanup step
  • Document substantive removals in the PR description so reviewers understand intent

Example use cases

  • Remove obvious comments and over-explained blocks from a feature branch before review
  • Eliminate redundant try/catch blocks and null checks introduced by an AI refactor
  • Replace unnecessary type assertions and @ts-ignore comments with correct typings
  • Normalize variable names and imports to match project conventions across a set of changed files
  • Produce a compact cleanup PR that preserves all tests and reduces lines of code

FAQ

No — changes are limited to non-functional artifacts. The process validates by running lint/type checks and available tests to avoid behavior changes.

Can it run automatically on every commit?

Yes, it can be integrated into a branch workflow, but run incrementally and with tests so edits remain reviewable and safe.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
ai-code-cleanup skill by 89jobrien/steve | VeilStrat