Skip to content
Back to skills

Comment Audit

ASecurity

Audits the comments a BDK review round adds - lists them with bdk git comments, judges each against the rule BDK-CQ-4 (a new comment is allowed only as a tool directive with a reason, a doc comment of a public library API, a licence header or an ADR pointer) and appends each other comment to the round findings log with its fix: functions named after the steps, a better name, a design pattern or an ADR. Use when the bdk:comment-auditor agent is started with a round directory. Not for users: /b...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 5, 2026
developmentpythonrustgojavashellbashgitapidocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add broneq/bdk --skill comment-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Comment Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Comment Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/broneq-comment-audit/badge)](https://www.skillsdirectory.com/skills/broneq-comment-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: comment-audit
description: 'Audits the comments a BDK review round adds - lists them with bdk git comments, judges each against the rule BDK-CQ-4 (a new comment is allowed only as a tool directive with a reason, a doc comment of a public library API, a licence header or an ADR pointer) and appends each other comment to the round findings log with its fix: functions named after the steps, a better name, a design pattern or an ADR. Use when the bdk:comment-auditor agent is started with a round directory. Not for users: /bdk:auto-review runs it in every round.'
argument-hint: "<round-dir>"
user-invocable: false
allowed-tools: Bash(${CLAUDE_PLUGIN_ROOT}/bin/bdk *) Read Grep Glob
---

Current BDK configuration of this project:

!`"${CLAUDE_PLUGIN_ROOT}/bin/bdk" config show`

Arguments: $ARGUMENTS

# Comment audit

A new comment in code is a finding: what it says belongs in the code (a function, a name, a pattern) or in an ADR. Find the comments the round adds, judge each against the rule, and append one finding per comment that breaks it, with the fix. You change no file, run no test, linter or build, set no level and start no agent. Run each `bdk` call as the steps write it, as the whole Bash command: nothing before or after it (no `cd`, `;`, `&&`, `|` or `echo`), no shell variable, and no backtick, `$` or backslash in the text of `--summary` and `--evidence`, which the shell would read as a substitution. Another form is denied, and a denied call ends the block. Read files with Read, Grep and Glob, not through Bash. Quote a comment's words without its comment marker.

If the block above says "BDK not configured: run /bdk:setup", stop and pass that line on. If it shows the command instead of its output, run `"${CLAUDE_PLUGIN_ROOT}/bin/bdk" config show` first.

## 1. Read the round

The round directory is the first argument. Read `<round-dir>/groups.json` and take its `range`; the log is `<round-dir>/findings.jsonl`.

Done when you hold the range and the log.

## 2. List the new comments

```
"${CLAUDE_PLUGIN_ROOT}/bin/bdk" git comments <range>
```

It prints each comment that holds a line the range adds, as `<file>:<line>` or `<file>:<line>-<end>`, with its language and, in parentheses, `doc` (the language's doc form: `/** */`, `///`, a Go comment on a declaration, a Python docstring) and `trailing` (code stands before it on its line), then its text. Files of a language it does not know are listed as skipped; leave them. With no comment, return "no findings" and stop.

Done when you hold every listed comment.

## 3. Read the rule

```
"${CLAUDE_PLUGIN_ROOT}/bin/bdk" rules for --stage review --files <file> --files <file> ...
```

with every file that holds a listed comment. Keep the text of `BDK-CQ-4` and the files it applies to. A project switches the rule off or narrows its paths in its settings: when the output holds no `BDK-CQ-4`, return "no findings: BDK-CQ-4 is off" and stop; a comment in a file the rule does not apply to is left.

Done when you hold the rule's text and the files it binds.

## 4. Judge each comment

Read each file around its comments: the comment, the code it stands on, and the function or declaration that holds it. A comment the rule allows:

- **Tool directive with a short reason:** a line a tool reads (`eslint-disable-next-line no-console -- the CLI prints its result`, `@ts-expect-error`, `# noqa: E501`, `//go:generate`, `# type: ignore[...]`, `#pragma`), with a reason after it. Without a reason it is a finding whose fix is the reason, or removing what the directive silences.
- **Doc comment of a public library API that generates its documentation:** marked `doc`, on a declaration exported from a package others import (an `exports` or `main` entry in `package.json`, a published module, an exported Go identifier), in a project that generates its API docs (TypeDoc, JSDoc, Sphinx, godoc, rustdoc, javadoc). A doc comment on an internal function, a test, or an application that publishes no API is a comment like any other.
- **Licence header:** a copyright or `SPDX-License-Identifier` line at the top of the file.
- **A one-line pointer to an ADR:** only the ADR's id (`ADR-0012`) or its path, and the ADR exists (Glob for it). A pointer that also explains the decision is a comment.

Every other new comment is a finding, also a `trailing` one, a `TODO` and commented-out code. Name its fix from what it says:

- It narrates the steps or sections of a function: **split** the function into functions named after the steps; name them.
- It explains what a name means, a unit, or what a value holds: **rename** the variable, parameter, constant or function; name the new name.
- It explains a branch on a kind, a status or a type: a **design pattern** (strategy, a lookup table, polymorphism) or named constants; say which.
- It explains why: a constraint, a workaround or a decision the code cannot make clear. First a name that carries the reason (`retryAfterRateLimit`); when no name can, an **ADR** with a one-line pointer in its place. Which of the two is the implementer's choice; name both.
- Commented-out code or a `TODO`: **delete** it; a `TODO` that is still needed becomes an issue.

Done when every comment is allowed or has its fix.

## 5. Append the findings

One call per comment that breaks the rule:

```
"${CLAUDE_PLUGIN_ROOT}/bin/bdk" findings add <log> --source comment-audit --file <path> --line <n> --rule BDK-CQ-4 --summary "<one line: the comment and its fix>" --evidence "<what the comment says and the code that should say it instead>"
```

- `--line` is the comment's first line.
- `--summary` names the fix (`New comment explains d; rename d to daysUntilDue`).
- `--evidence` quotes the comment's words and names the code change: the functions and their names, the new name, the pattern, or the ADR. It is the cost a reader pays: the comment repeats what the code could say and drifts from it when the code changes.

Done when every finding has its line in the log (each call prints the finding id).

## 6. Verify and return

Run `"${CLAUDE_PLUGIN_ROOT}/bin/bdk" findings list <log>` and check that each id you added is listed with the source `comment-audit`. Return only: the number of new comments, the number of findings you added, and their ids with summaries, one per line; "no findings" when there were none.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.