# decomment

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

decomment is a free AI agent skill on Agensi by PisgaX, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [PisgaX](https://www.agensi.io/creators/pisgax)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Rating: 5.0 out of 5 from 1 review
- Uses: 6
- Version: 1.0
- Last updated: 2026-09-07
- Security: scan passed (2026-09-07); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/decomment
- Tags: code-review, refactoring, productivity, typescript, python, clean-code

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

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the decomment skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Which programming languages and file formats are supported?

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.

### Will removing comments break my linter or build configuration?

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.

### Does the skill remove my 'TODO' markers along with the other comments?

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.

### How does this differ from just asking an LLM to 'remove all comments'?

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.

### Can I use this for bulk processing an entire repository at once?

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.

### Will this affect my JSDoc or Python docstrings?

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.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
