No Commented-Out Code
non-blockingstable
Fires on PostToolUse for Edit and Write tools. Scans the written file content for commented-out code blocks — lines that appear to be executable code hidden behind a comment marker rather than explanatory prose. Emits a DEAD-CODE-VIOLATION warning when detected. Non-blocking.
ai hooks run no-commented-code
Event
PostToolUseLanguagepythonTriggertool-name — Edit|WriteSide effects- emits DEAD-CODE-VIOLATION sentinel lines to stderr
- reports file path and approximate line numbers of violations
linuxmacoswindowsPure Python, no git dependency. Reads file path from the PostToolUse payload. Cross-platform via 'ai hooks run'.
code-qualitydead-codegovernanceclaude-code
Attribution: convergent-systems-key.