code-comment-discipline SKILL.md skillA
code-comment-discipline from skyf0xx/hedgehog is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add skyf0xx/hedgehog/code-comment-discipline@git:20260915.24d451aPins git:20260915.24d451a in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- skyf0xx/hedgehog
- Path
src/skills/code-comment-discipline/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260915.24d451a, committed Sep 15, 2026
- Size
- 2,205 bytes
- Repository stars
- 47
- License
- MIT
Apply whenever writing or editing source code in any core's build agent (backend-eng, ui-builder, or equivalent). Governs when a comment belongs at all and what it may say. Default is no comment; a comment is only for the non-obvious. Never restates what the code does, never narrates the task, fix, or conversation that produced it.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Code Comment Discipline Well-named identifiers and clear structure explain what code does. A comment earns its place only when it explains something the code cannot: a hidden constraint, a non-obvious invariant, a workaround for a specific external bug, or behavior that would surprise a reader. ## Default: no comment Most lines, functions, and blocks need zero comments. Before writing one, check whether the same clarity is reachable by renaming a variable or function instead — prefer that over a comment every time. ## When a comment is allowed Only for the non-obvious: - A constraint imposed from outside the code (an API's undocumented limit, a browser quirk, a platform requirement) that isn't visible at the call site. - An invariant the code relies on that isn't implied by types or names (e.g. "callers must hold the lock before this runs"). - A deliberate workaround for a specific bug in a dependency, with enough detail to know when it's safe to remove. - Behavior that looks like a mistake but is intentional. ## What a comment must never say - What the code does — that's the identifier's job, not the comment's. …
Read the whole file at its exact version.
How to install
mdr add skyf0xx/hedgehog/code-comment-discipline@sha256:23aebafc13e7d921The line at the top of this page pins the label git:20260915.24d451a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_a3olovwhvb5udxxd)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Sep 15, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (2205 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
skyf0xx/hedgehog · 47 stars · license MIT · pushed 2026-11-05 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_a3olovwhvb5udxxd GET https://markdownregistry.com/api/v1/resolve?ref=skyf0xx/hedgehog/code-comment-discipline GET https://markdownregistry.com/api/v1/blob/23aebafc13e7d92192ccec30a1410213e312391fa201589cf92f2a6b37f621b2
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.