code-review-cli
Installation
SKILL.md
CLI Application Code Review Patterns
Stack-specific rules loaded by dh:code-reviewer when CLI entrypoints are detected (argparse, click, typer, commander.js, or similar argument parsing libraries).
Exit Codes
- Exit code
0must be returned only on success — any error condition must produce a non-zero exit code - Returning exit code
0after printing an error message is a blocking finding — tools in pipelines cannot detect the failure - Common conventions:
1for general errors,2for usage/argument errors,3+for application-specific codes documented in--help sys.exit(1)orprocess.exit(1)must be called on fatal errors, not just printing to stderr
# WRONG: exits 0 even on error
def main():
try:
run()
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
# implicit exit 0