Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add luabagg/agent-skills --skill code-commentsgit clone --depth 1 https://github.com/luabagg/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/luabagg/agent-skills/code-comments)<a href="https://agentmods.dev/skills/luabagg/agent-skills/code-comments"><img src="https://agentmods.dev/badge/skills/luabagg/agent-skills/code-comments/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/luabagg/agent-skills/code-comments"><img src="https://agentmods.dev/badge/skills/luabagg/agent-skills/code-comments.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.01713 |
| Opus 5.5 | $0.00014 | $0.00685 |
| Sonnet 5.5 | $0.00007 | $0.00343 |
| Haiku 4.5 | $0.00003 | $0.00171 |
Grade A, and why
code-comments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 16d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Comments
A comment carries what names, types, and structure cannot. Write it for a reader who knows the product but not the code, the library, or the field's jargon. Most code needs no comment. When one is needed, it reads without the body: a reader who has not opened the function must understand every sentence.
When to comment
Write a comment when one of these is true:
- The code owns a guarantee, constraint, side effect, or failure mode a reader cannot see from the signature.
- The code does something a reader would call a mistake: a provider bug, a compliance rule, a value chosen from evidence.
- The code follows an order that matters and the order is not obvious.
- A value is tuned and a different value has a known cost.
When not to comment
- A trivial function gets no comment.
- Do not comment a type whose name and fields say what it holds. Rename a field before you explain it. Use
code-namingto find the name. - Do not comment an ordinary block inside a function. Extract a named function instead.
- Do not narrate the implementation or write a full docstring.
- A file gets a header only when it is an index, or when the file-level rule is not the sum of its functions' comments.
Shape
- A function gets at most one comment, above it. The first sentence says what the function does. The sentences after it carry the rule, edge case, guarantee, or failure the signature cannot show.
- The first sentence may overlap the name. It exists so the reader does not have to open the body. "Do not restate the name" applies to the sentences after it.
- A type or table comment opens with what it holds, then states the invariant its fields cannot express: two fields that must agree, a unit, a range, a lifecycle rule. Do not comment fields or union members.
- A tuned constant states the failure the value prevents. When the obvious value fails, state the cause that makes it fail.
- An order comment states what breaks under the other order.
- When a comment lists an order or several distinct points, write a list. Do not join the points into one paragraph.
- Start a list on the line after the sentence that introduces it. Do not put a blank
//line before the first item.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 16d ago Changed · +2 lines f8c86b896048
- 1mo ago Changed · +44 lines · +4 tokens per session 9a74e56332fe
- 1mo ago First seen · 121 lines · 30 tokens per session scan A 0dcf4906b374
code-comments is a skill published in the GitHub repository luabagg/agent-skills (3 stars, last pushed 9d ago), licensed MIT. It adds 34 tokens to every session and 1,713 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
harness
Connect this Bankr account to the user's Harness account (tryharness.ai) and manage everything Harness-side from here. Pair with a signed wallet proof, then inspect the Harness trading wallet and portfolio, fund it on the user's request, request withdrawals back to this wallet, buy Harness credits with $HARNESS over…
web-ui-motion
Build polished front-end UI together with a signature motion effect in a single self-contained HTML file, combining SVG.js / SVG filters and the Canvas 2D API. Use when the user asks to build a web page, landing page, dashboard, or component that has a special visual effect, animation, particle system, fluid/water…
openspec-propose
Create a complete OpenSpec proposal with design, specs, prototype, and tasks. Use when the user wants a change ready for implementation.
prototype-workflow
Generate and lifecycle-manage HTML prototypes for UI exploration and OpenSpec changes. Use when creating, validating, completing, or archiving a UI prototype.
html-output
Produce rich, self-contained, single-file HTML as the default output format instead of Markdown — for specs, plans, code reviews, PR write-ups, reports, explainers, design explorations, slide decks, SVG diagrams, and small interactive editors with copy-as-prompt/JSON export. USE WHEN the user asks to "make an HTML…
harness-engineering-guide
Audit, design, and implement AI agent harnesses for any codebase. A harness is the constraints, feedback loops, and verification systems surrounding AI coding agents — improving it is the highest-leverage way to improve AI code quality. Three modes: Audit (scorecard), Implement (set up components), Design (full…