agentleFS
trac3r00trac3r00/agent-skills/skills/comment-checker/SKILL.md

comment-checker

Skill0 starsChanged 3 months agoMITView on GitHub

Flags newly written comments and docstrings in files or diffs so an agent must justify or remove them — BDD markers, lint/type directives, license headers, shebangs, and TODO/FIXME markers auto-pass. A standalone CLI port of oh-my-opencode's comment-checker hook, usable by any agent or CI without the OMO harness.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Comment Checker

Agent-written code accumulates narration comments a human never would. This skill flags every new comment or docstring that is not self-justifying, so the author must either justify it (complex algorithm, security, regex, public API) or delete it and make the code clearer instead.

Commands

python3 scripts/comment_checker.py src/foo.py src/bar.ts   # scan whole files
git diff | python3 scripts/comment_checker.py --diff        # only added lines
git diff main... | python3 scripts/comment_checker.py --diff --fail-over 0  # CI gate
python3 scripts/comment_checker.py --json --diff < changes.patch

What auto-passes (never flagged)

  • Shebang lines (#! on line 1)
  • BDD structure comments: given / when / then / arrange / act / assert
  • Type-checker and linter directives: noqa, type:, eslint-disable, @ts-expect-error, clippy::, nolint, biome-ignore, coverage markers, ...
  • Copyright / license headers
  • TODO / FIXME / HACK / XXX / NOTE / REVIEW markers

Everything else is reported with file:line and the comment text.

Handling a flag

Priority order, same as the original hook:

  1. Comment existed before your change - keep, note it is pre-existing.
  2. Necessary comment - justify it: complex algorithm, security, performance, regex, math, or public-API docstring.
  3. Unnecessary - remove it and make the code self-explanatory instead. Comment-based section dividers (# ----) mean the file is too long: split it.

Languages

C-family (js/ts/jsx/tsx/java/c/cpp/cs/rust/swift/kotlin/go), hash-family (python + docstrings, ruby, shell, yaml, toml), html/xml, sql, lua.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.