decomment

Strips AI-flavored comments and docstrings from code files via parallel proposer agents.

2|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/DoctorMozg/claude-pipelines --skill decomment-doctormozg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: decomment
Source: https://github.com/DoctorMozg/claude-pipelines/tree/main/plugins/mz-dev-pipe/skills/decomment
Command: npx skills add https://github.com/DoctorMozg/claude-pipelines --skill decomment-doctormozg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI-generated code often ships with robotic section banners, phase headers, and docstrings that restate the signature. Manually hunting these artifacts across a branch is tedious and error-prone, while blanket comment deletion destroys load-bearing notes like workaround explanations and license headers. ## Core Features & Use Cases - Scoped scanning: Targets branch diffs by default, with working-tree, global, or explicit path/glob scope modes, filtering out generated code, vendored directories, and non-code extensions. - Parallel proposal agents: Dispatches Sonnet proposer agents in waves of six to identify high-confidence AI artifacts in comment regions only, using a per-language comment syntax reference covering Python, TypeScript, Rust, Go, C/C++, and more. - Gated apply: Consolidates all proposals into a single diff with overlap detection, presents it for explicit user approval, then applies edits surgically via the Edit tool without touching executable code or string literals. - Use Case: Before merging an AI-assisted feature branch, run decomment to strip banner dividers and restate-the-signature docstrings while preserving linter directives, license headers, and WHY comments. ## Quick Start Ask the assistant to decomment the current branch, for example by saying "strip AI comments from my branch", then review the proposed diff and approve it at the gate.

Frequently Asked Questions about decomment

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

FAQPage Schema
How do I remove AI-generated comments from my code branch?

Invoke decomment with the default branch scope to scan files changed relative to main or master. It dispatches parallel proposer agents to identify AI artifacts, shows you a consolidated diff for approval, then applies only the edits you approve.

What types of comments does decomment strip from code?

It targets AI-flavored artifacts: robotic section banners, phase headers, and docstrings that merely restate the function signature. It preserves workaround notes, linter directives like noqa and eslint-disable, license headers, docstring tooling fields, and comments containing WHY tokens such as issue references or URLs.

Which programming languages does decomment support?

It supports Python, Shell, TypeScript, JavaScript, Rust, C, C++, Go, Java, Kotlin, Swift, C#, Ruby, and PHP. A per-language reference table defines comment tokens, string literal forms, and language-specific preserve markers for each.

Can decomment clean comments from Markdown or prose files?

No, Markdown and prose files are explicitly out of scope; the naturalize skill handles those. Decomment only processes code files matching its extension allowlist and never edits string literals or executable code regions.

Does decomment modify code automatically without review?

No, it presents a two-surface approval gate showing the full verbatim diff before applying anything, and no file is touched without explicit approval. An unattended mode via MZ_DEV_PIPE_AUTO_APPROVE=1 exists for automated runs, but the default requires user sign-off.

Why did decomment skip some of my files during the scan?

Files are skipped when they match generated-code patterns, contain markers like "Generated by" or "DO NOT EDIT", sit in excluded directories such as node_modules or dist, or have extensions outside the allowlist. Skipped files are recorded in skipped.md and candidates.md for audit.