- Home
- Skills
- Code Quality & Review
- ai-code-sanitizer
More screenshots
Works with the AI Agents you already use
ai Code Sanitizer
Automatically detect and purge AI coding slop: remove debug logs, strip dead imports, wipe commented code, and prevent secret leaks.
Free
ai-code-sanitizer
Example session with this skill installed
Audit my staged changes in the user auth service. I used an AI to refactor the login flow and I'm worried about debug prints and hardcoded test keys.
- Read your context and instructions
- Compiled the ai-code-sanitizer
I have audited the staged changes in services/auth_service.py. The following slop and security risks were identified and removed: 3 print statements used for tracing, 1 block of commented-out legacy validation logic, and 1 hardcoded Stripe test key.
Sanitized Changes
import os
# Removed unused import: import time
# Removed unused import: import json
def authenticate_user(username, password):
# Purged: print(f"DEBUG: Authenticating {username}")
# Securely replaced hardcoded key with environment variable
api_key = os.getenv("STRIPE_API_KEY")
user = db.query("SELECT * FROM users WHERE username = %s", (username,))
if user and verify_password(password, user.hashed_password):
# Purged 12 lines of commented-out legacy auth logic
return generate_token(user.id)
return None
def verify_password(password, hashed):
# Logic preserved
return pwd_context.verify(password, hashed)
Next steps
- Add
STRIPE_API_KEYto your production.envor secrets manager. - Run your test suite to ensure the removed imports were not side-effect dependent.
- Commit the sanitized changes.
💡 Recommended Production Suite:
- Testing: Pytest Pro
- CI/CD Automation: GitHub Actions Pro
- Containerization: Docker Production Pro
Connects securely to your tools. The creator never sees your data.
About this skill
The Problem: AI Coding Slop
Modern developers rely heavily on AI coding agents like Claude Code, Cursor, and Copilot. However, AI agents routinely leave behind messy "slop": stray console.log() and print() statements, zombie imports, massive blocks of commented-out legacy code, half-finished TODOs, and dangerous hardcoded API secrets.
What AI Code Sanitizer Does
- Debug Print & Logger Purge: Detects and wipes leftover debugging calls (
print(),console.log,debugger,dd()) across staged files. - Dead Code & Comment Strip: Automatically finds and eliminates abandoned commented-out code blocks that AI forgot to remove.
- Secret & Credential Gatekeeper: Scans diffs for accidental hardcoded API tokens, JWTs, and private keys before they reach git history.
- Unused Import Cleanup: Flags ghost dependencies and imports introduced during AI trial-and-error sessions.
💡 Recommended Production Suite
Upgrade your complete software development lifecycle with our production-grade agent skills:
- 🧪 Pytest Pro ($7) — Automated AAA-pattern pytest suites with smart API mocking and automated test execution.
- 🚀 GitHub Actions Pro ($7) — Robust, secure, and cache-optimized CI/CD workflows for instant testing and releases.
- 🐳 Docker Production Pro ($7) — Ultra-lean (<100MB), secure multi-stage Dockerfiles and compose setups.
Focuses on local file cleanup and staged diffs. Does not perform cross-file dead code analysis or full tree shaking. Requires manual definition of environment variables after secret replacement.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
3 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 1 month ago
- Free with an Agensi account
- Software
Git
Permissions
What's inside
Frequently Asked Questions
New in Code Quality & Review
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.