# Delete comment

> Delete comment is an open-source agent skill for developer tools. Removes code comments from a codebase while keeping their useful knowledge. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/stevyhacker/LokalBot/tree/master/.claude/skills/delete-comment
- **Repository:** https://github.com/stevyhacker/lokalbot
- **GitHub stars:** 133
- **License:** GPL-3.0
- **Skill name:** delete-comment
- **Collection:** https://github.com/stevyhacker/LokalBot
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through clearing comments out of LokalBot code, either across the project or within one section. Each comment is read in context and sorted: redundant or outdated notes are deleted, workarounds that have a better fix become issue drafts, and important design decisions are moved into architecture decision records in the Docs/decisions folder.

The workflow lists comments with the repository's comment ratchet script, classifies them against a written rubric, deletes them with the same script, and then lowers the ratchet baseline so the lint check passes. It also covers running the build and tests for each language touched, and noting any test that relied on a comment.

It expects the repository's Scripts/ci tooling and Python 3 to be available, and it works across Swift, Rust, Python, shell, JavaScript and Kotlin code. License and tool directive comments are preserved.

## When your agent uses it

> Remove code comments from LokalBot, or from one section of it, without losing what they knew. Tautologies and stale notes are deleted, excuses for hacky code become GitHub issue drafts, and decision records move into Docs/decisions/ ADRs; then the comment ratchet baseline is lowered. Use when asked to delete or clean up comments, when the "Comment ratchet" lint check fails, or before adding a comment to code.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/stevyhacker/LokalBot/tree/HEAD/.claude/skills/delete-comment)
- [License: GPL-3.0](https://github.com/stevyhacker/LokalBot/tree/HEAD/.claude/skills/delete-comment)

## Features

- **Comment classification rubric:** Sorts each comment as redundant, outdated, a workaround to fix, or a decision worth recording.
- **Decision record migration:** Moves valuable design rationale into numbered ADR entries with locations listed.
- **Issue drafting for workarounds:** Turns hacky shortcuts noted in comments into drafted issues for later fixing.
- **Ratchet script workflow:** Uses the comment ratchet script to list, delete and update baseline counts.
- **Preserved directives and notices:** Keeps lint suppressions, shebangs, license headers and CLI help text intact.
- **Per-language verification steps:** Lists build, format and test commands for Rust, Swift, Python and other languages.

## Good for

- Remove redundant comments from one folder of the codebase
- Fix a failing comment ratchet lint check
- Move design rationale from code comments into ADR documents
- Turn comments about temporary hacks into GitHub issue drafts
- Lower the comment baseline after a cleanup

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/delete-comment` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/stevyhacker/LokalBot.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/delete-comment &&
cp -R "$tmp/.claude/skills/delete-comment" ~/.claude/skills/delete-comment &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/delete-comment` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/delete-comment` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/stevyhacker/LokalBot.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/delete-comment &&
cp -R "$tmp/.claude/skills/delete-comment" ~/.agents/skills/delete-comment &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/delete-comment` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/delete-comment` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/stevyhacker/LokalBot.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/delete-comment &&
cp -R "$tmp/.claude/skills/delete-comment" ~/.cursor/skills/delete-comment &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/delete-comment` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/stevyhacker/LokalBot.git --path .claude/skills/delete-comment
```

Or copy the folder to `~/.gemini/skills/delete-comment` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/delete-comment`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/stevyhacker/LokalBot.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/delete-comment &&
cp -R "$tmp/.claude/skills/delete-comment" ~/.copilot/skills/delete-comment &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/delete-comment` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/stevyhacker/LokalBot.git
```

Then copy `LokalBot/.claude/skills/delete-comment` into your agent's skills folder as `delete-comment`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Delete comment trigger?

When asked to delete or clean up comments, when the Comment ratchet lint check fails, or before adding a comment to code.

### Which comments are kept?

Lint and formatter suppressions, shebangs, tool version lines, PEP 723 metadata, source map URLs, license and copyright notices, and clap doc comments for CLI help are never removed.

### Does Delete comment change the code's behaviour?

It deletes comment lines and trailing comments, then tells the agent to run formatters, builds and tests for each language touched.

### Where do decision records go?

They are written as entries in Docs/decisions/ ADRs, with the index updated.

### How do I install Delete comment in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/delete-comment to use it in all your projects, or to .claude/skills/delete-comment in one project.

### Does Delete comment run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Delete comment?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Delete comment?

The closest alternatives to Delete comment are Lean comments, No comments, Antislop code, Code review and quality and Code simplifier.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Lean comments](https://ai-powered.com/skills/lean-comments): Lean comments is an open-source agent skill for developer tools.
- [No comments](https://ai-powered.com/skills/no-comments): No comments is an open-source agent skill for developer tools.
- [Antislop code](https://ai-powered.com/skills/antislop-code): Antislop code is an open-source agent skill for developer tools.
- [Code review and quality](https://ai-powered.com/skills/code-review-and-quality): Code review and quality is an open-source agent skill for developer tools.
- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Dead code cleanup edho ferdian](https://ai-powered.com/skills/dead-code-cleanup-edho-ferdian): Dead code cleanup edho ferdian is an open-source agent skill for developer tools.
- [Deslop](https://ai-powered.com/skills/deslop): Deslop is an open-source agent skill for developer tools.
- [Code simplification](https://ai-powered.com/skills/code-simplification): Code simplification is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/delete-comment
