jin-cleanser

Analyze AI-generated code for slop patterns and generate a markdown report.

2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/cjinzy/jin-claude --skill jin-cleanser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jin-cleanser
Source: https://github.com/cjinzy/jin-claude/tree/main/plugins/jin-claude/skills/jin-cleanser
Command: npx skills add https://github.com/cjinzy/jin-claude --skill jin-cleanser

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the issue of "code bloat" or "slop" often introduced by AI code generation, such as unnecessary comments, redundant error handling, and unused imports, improving code quality and maintainability.

Core Features & Use Cases

  • Static Analysis: Detects patterns like unused imports and leftover debug statements using tools like ruff and grep.
  • Semantic Review: Leverages an AI agent to identify issues like self-explanatory comments, over-abstraction, and boilerplate docstrings.
  • Reporting: Generates a clear Markdown report detailing identified issues, their severity, and suggested fixes.
  • Use Case: After an AI generates a complex function, run jin-cleanser on the diff to automatically identify and report any "slop" that should be cleaned up before merging.

Quick Start

Run jin cleanser on the latest git diff to find and report code bloat.

Frequently Asked Questions about jin-cleanser

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

FAQPage Schema
How do I clean up AI-generated code and remove unnecessary comments?

To clean up AI-generated code and remove unnecessary comments, you can use static analysis tools like ruff and grep alongside an AI agent for semantic review. This process detects slop patterns such as over-abstraction, redundant type annotations, and dead code, generating a markdown report of suggested fixes.

What is code slop and how does static analysis detect it?

Code slop refers to bloat introduced by AI code generation, such as unused imports, excessive error handling, and boilerplate docstrings. Static analysis detects it by scanning for these patterns using tools like ruff and grep, followed by a semantic review to identify over-abstraction.

How do I find unused imports and dead code in a git diff?

You can find unused imports and dead code in a git diff by running a code cleanup tool that performs static scans using ruff and grep. This identifies leftover debug statements and redundant code patterns, outputting a detailed markdown report with severity levels and suggested fixes.

Can I use ruff and grep to review over-abstraction in AI code?

Yes, you can use ruff and grep to perform initial static scans for unused imports and debug statements. An AI agent then conducts a semantic review to identify over-abstraction, self-explanatory comments, and boilerplate docstrings, ensuring comprehensive code quality analysis.

What's the best way to refactor boilerplate docstrings from AI code generation?

The best way to refactor boilerplate docstrings from AI code generation is to run a semantic review using an AI agent that identifies redundant documentation. Combined with static analysis for other slop patterns, it generates a markdown report detailing the issues and suggested fixes.

When do I need to run a code cleanup on AI-generated diffs?

You need to run a code cleanup on AI-generated diffs before merging to identify and report code bloat. This ensures that unnecessary comments, redundant error handling, and unused imports are detected and resolved, improving overall code quality and maintainability.