decomment

    by PisgaX

    2

    Automated comment stripping that removes clutter while preserving linter directives and TODOs across any language.

    Free

    6 uses5.0 (1 review)

    Works with the AI Agents you already use

    decomment

    Example session with this skill installed

    Clean up the comments in auth_service.py and user_controller.ts. Keep any TODOs.

    • Read your context and instructions
    • Compiled the decomment

    I have stripped all documentation, inline comments, and section headers from the specified files while preserving tool directives and TODO markers.

    Code Cleanup Summary

    FileComments RemovedExceptions KeptStatus
    auth_service.py141 (TODO)Cleaned
    user_controller.ts233 (ESLint directives)Cleaned
    // user_controller.ts (Partial view)
    import { Request, Response } from 'express';
    import { UserService } from './user.service';
    
    export class UserController {
      private userService: UserService;
    
      constructor() {
        this.userService = new UserService();
      }
    
      // TODO: Implement rate limiting for this endpoint
      async getUser(req: Request, res: Response) {
        /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
        const { id } = req.params as any;
        const user = await this.userService.findById(id);
        return res.json(user);
      }
    }
    

    Next steps

    1. Run your linter to ensure no remaining directives were missed.
    2. Verify that any removed docstrings weren't required for your IDE's autocomplete.
    3. Commit the changes to your feature branch.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    AI generated code often includes excessive explanatory comments and docstrings that clutter your codebase. Manual cleanup is tedious, prone to human error, and slows down the PR process.

    What it does

    • Identifies and removes all line, block, and inline trailing comments across any programming language.
    • Deletes JSDoc, docstrings, and section dividers without impacting functional logic.
    • Detects and preserves critical compiler directives like eslint-disable or type: ignore.
    • Retains TODO and FIXME markers to ensure outstanding tasks are not lost during cleanup.
    • Handles bulk processing across files or specific directories with precise str_replace edits.

    Why this beats prompting it yourself

    Generic prompts often result in the AI "judging" which comments are useful, leading to inconsistent results. This skill enforces a zero-tolerance policy for documentation while safely protecting shebangs and linter instructions that actually affect build behavior.

    Use cases

    • Cleaning up AI-generated "chatter" comments before committing code to a repository.
    • Stripping internal developer notes and dividers from a production-ready file.
    • Minifying configuration files (YAML, JSON5, TOML) by removing all non-functional text.
    • Standardizing code style across a legacy codebase by removing outdated documentation.

    Known limitations

    Will remove JSDoc and Python docstrings even if they are used to generate external API documentation unless explicitly told to skip them.

    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

    5.0
    1 review
    5
    1
    4
    0
    3
    0
    2
    0
    1
    0

    This skill has been used 6 times.

    Frequently Asked Questions

    The skill is language-agnostic and works with any file type that uses standard comment syntax, including Python, JavaScript/TypeScript, Java, C++, YAML, and HTML.

    No, the skill is programmed to automatically identify and preserve critical compiler instructions like `eslint-disable`, `@ts-ignore`, and shebangs (#!) to ensure your build pipeline remains intact.

    Yes, while it strips explanatory text, it specifically recognizes and retains `TODO` and `FIXME` tags to ensure that pending tasks are not lost during the cleanup process.

    Standard prompts often result in the AI accidentally deleting functional code or leaving behind 'chatter' it deems important; this skill uses a strict logic-first approach to ensure only non-functional text is removed.

    You can target specific files, entire directories, or even apply the skill as a final step in an automated PR review workflow to sanitize AI-generated code.

    Yes, the skill will remove JSDoc and Python docstrings by default to maximize code density; if you rely on these for external documentation, you should exclude those specific files from processing.

    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