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.

Install it, pinned
mdr add skyf0xx/hedgehog/code-comment-discipline@git:20260915.24d451a

Pins 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

The exact contents, by fingerprint
mdr add skyf0xx/hedgehog/code-comment-discipline@sha256:23aebafc13e7d921

The 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.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_a3olovwhvb5udxxd.svg)](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.

versioncommittedcommitsizeaudit
git:20260915.24d451a latest2026-09-15 24d451a 2,205 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • 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

GitHub

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.

More from skyf0xx/hedgehog

bmad-revendor SKILL.md skill
skyf0xx/hedgehog · .claude/skills/bmad-revendor/SKILL.md · Maintainer-only. Use when re-vendoring vendor-skills/BMAD/ against a newer BMAD-METHOD commit — "update BMAD"…
git:20260903.6410e6b · audit A · 47 stars
hedgehog-bot SKILL.md skill
skyf0xx/hedgehog · .claude/skills/hedgehog-bot/SKILL.md · Maintainer-only. Use when the user asks to review, comment on, or merge a pull request on skyf0xx/hedgehog "as…
git:20260828.38e54aa · audit A · 47 stars
inbound-triage SKILL.md skill
skyf0xx/hedgehog · .claude/skills/inbound-triage/SKILL.md · Maintainer-only. Use when triaging inbound GitHub issues and pull requests on skyf0xx/hedgehog — "triage the issues"…
git:20260809.fcf3a2f · audit A · 47 stars
CLAUDE.md CLAUDE.md file
skyf0xx/hedgehog · CLAUDE.md
git:20261104.b49b4ee · audit A · 47 stars
hedgehog-writing-gate SKILL.md skill
skyf0xx/hedgehog · skills/hedgehog-writing-gate/SKILL.md · Use when the user asks to write, draft, or edit a standalone piece of prose — an article, essay, blog post, tweet…
git:20260905.edb31d7 · audit A · 47 stars
hedgehog SKILL.md skill
skyf0xx/hedgehog · skills/hedgehog/SKILL.md · Use when the user writes the word "Hedgehog" anywhere in a request, or has agreed to install the Hedgehog build…
git:20261104.b49b4ee · audit A · 47 stars
conventional-commits SKILL.md skill
skyf0xx/hedgehog · src/skills/conventional-commits/SKILL.md · Use when uncommitted changes need to be split into atomic, conventional commits ordered for review. Triggers on "commit…
git:20260909.dbddfcb · audit A · 47 stars
filing-issues SKILL.md skill
skyf0xx/hedgehog · src/skills/filing-issues/SKILL.md · Use when filing one or more GitHub issues for planned work — "file an issue for this", "turn this plan into issues"…
git:20260829.d21b372 · audit A · 47 stars
hedgehog-contributing SKILL.md skill
skyf0xx/hedgehog · src/skills/hedgehog-contributing/SKILL.md · Use when the user wants to contribute a fix or roadmap item back to the Hedgehog project itself (skyf0xx/hedgehog)…
git:20260909.980f36c · audit A · 47 stars
hedgehog-daily SKILL.md skill
skyf0xx/hedgehog · src/skills/hedgehog-daily/SKILL.md · Use when a change request lands on a project that already has `.hedgehog/` and no build in flight — a finished build…
git:20260902.64b33b4 · audit A · 47 stars
hedgehog-orchestrating SKILL.md skill
skyf0xx/hedgehog · src/skills/hedgehog-orchestrating/SKILL.md · Use at the start of any session on a project with a build graph (`.hedgehog/hedgehog.db`), and again at every…
git:20260922.4bb2084 · audit A · 47 stars
hedgehog-planning-intake SKILL.md skill
skyf0xx/hedgehog · src/skills/hedgehog-planning-intake/SKILL.md · Use on any core for first-run planning intake — Phase 0 runs the vendored BMAD-METHOD planning shelf, shared by every…
git:20260905.dede86b · audit A · 47 stars

Every file in skyf0xx/hedgehog

Browse by kind, by grade A, or by owner.