Skip to content
Skill

Delete comment

Removes code comments from a codebase while keeping their useful knowledge

Delete comment is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
133
Last commit
License
GPL-3.0
Listing updated

Similar skills

About Delete comment

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.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (7 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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.

Claude Code docs on skills

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

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.

Codex docs on skills

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

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.

Cursor docs on skills

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

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

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

Gemini CLI docs on skills

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

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.

VS Code docs on skills

Get the folder:

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.

The SKILL.md format

What it does

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

Delete comment 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.

More from stevyhacker/LokalBot

  1. Lets your coding agent search your LokalBot meeting, file and notes memory

    • Open source
    • 133 GitHub stars
    • Knowledge and memory
  2. Gives the agent a cited catch-up on your work from your local LokalBot library

    • Open source
    • 133 GitHub stars
    • Productivity
  3. Answers questions from your local LokalBot meetings, actions, people and files

    • Open source
    • 133 GitHub stars
    • Knowledge and memory
  4. Walks an agent through installing and setting up LokalBot with the user's approval

    • Open source
    • 133 GitHub stars
    • Developer tools
  5. Lets your agent look up your LokalBot meetings, action items and shared context

    • Open source
    • 133 GitHub stars
    • Productivity