More screenshots

    Works with the AI Agents you already use

    ai Code Sanitizer

    by Asilbek Roʻziyev

    1

    Automatically detect and purge AI coding slop: remove debug logs, strip dead imports, wipe commented code, and prevent secret leaks.

    Free

    3 usesSecurity scanned
    ai-code-sanitizer

    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

    1. Add STRIPE_API_KEY to your production .env or secrets manager.
    2. Run your test suite to ensure the removed imports were not side-effect dependent.
    3. Commit the sanitized changes.

    💡 Recommended Production Suite:

    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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Environment Variables
    Listed2 months ago
    Updated1 month ago

    What's inside

    Frequently Asked Questions

    ai-code-sanitizer works alongside any AI coding assistant (like Cursor, Claude Code, or Copilot) by scanning the code they generate before you commit it to your repository. It acts as an automated 'cleanup layer' to ensure your AI-assisted work meets professional production standards.

    The skill supports all major programming languages, with optimized detection for Python, JavaScript, TypeScript, Ruby, and PHP. It specifically targets common 'slop' patterns found in these ecosystems, such as stray print statements and unused imports.

    Yes, the secret gatekeeper scans your staged changes for patterns matching API keys, JWTs, and private tokens. It prevents these from ever entering your git history, protecting you from accidental credential leaks caused by AI hallucinations.

    You will receive the proprietary agent skill file and a comprehensive README documentation. The documentation includes clear instructions on how to integrate the sanitizer into your existing development workflow or git hooks.

    Once purchased, you will have access to any future updates or refinements to the detection patterns. We periodically update the skill to include new security signatures and better identification of 'dead code' patterns common in the latest AI models.

    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.

    Free