luma-review-dont-silently-default

Detects silent defaulting patterns in pull request diffs and reports explicit error-handling fixes.

17|1|Updated Dec 29, 2019
One-click install
npx skills add https://github.com/LumaKernel/dotfiles --skill luma-review-dont-silently-default-lumakernel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: luma-review-dont-silently-default
Source: https://github.com/LumaKernel/dotfiles/tree/main/common/claude/skills/luma-review-dont-silently-default
Command: npx skills add https://github.com/LumaKernel/dotfiles --skill luma-review-dont-silently-default-lumakernel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code that silently falls back to default values, truncates data at hardcoded limits, or swallows exceptions hides bugs from developers and causes unnoticed data loss for users. This Skill reviews pull request diffs to find these silent defaulting patterns and recommends explicit errors, validation, or required configuration instead. ## Core Features & Use Cases - Six Detection Patterns: Identifies hardcoded truncation limits, careless ??/|| fallbacks, non-exhaustive switch defaults, missing environment variable checks, swallowed catch blocks, and implicit truncation or rounding. - Structured Review Reports: Each finding includes file and line, pattern classification, a concrete failure scenario, a suggested fix, and a priority level (high/medium/low). - False-Positive Guardrails: Distinguishes legitimate defaults for optional parameters (pageSize, timeout) from abnormal-case suppression, and respects explicit intent comments. - Use Case: Run it on a GitHub PR via gh pr diff to catch a catch { return 0; } that would silently report a price as zero before the code is merged. ## Quick Start Review the current pull request for silent defaulting issues and report each finding with its pattern, impact scenario, and suggested fix.

Frequently Asked Questions about luma-review-dont-silently-default

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a pull request for silent failures and hidden fallbacks?▼

Run this review on the PR diff obtained via gh pr diff. It scans changed code for six silent defaulting patterns and reports each finding with the file and line, a concrete failure scenario, a suggested fix, and a priority level.

What code patterns indicate dangerous silent defaulting?▼

Key patterns include hardcoded slice limits that drop data, `??` or `||` fallbacks masking abnormal missing values, switch defaults that hide new variants, unset environment variables falling back to localhost, catch blocks returning fake success values, and implicit string truncation or rounding.

Does the review flag all uses of nullish coalescing or default values?▼

No. It distinguishes legitimate defaults for designed-optional parameters like pageSize or timeout from abnormal-case suppression. Code with explicit intent comments such as fallback rationale is also excluded from findings.

When should a switch statement throw instead of using a default branch?▼

When the switch covers an exhaustive union type like a status enum. A default branch that renders an unknown state silently accepts newly added variants, while throwing an unreachable error surfaces them at compile or runtime.

What are the limitations of automated silent-default detection?▼

Judging whether a missing value is normal or abnormal requires reading surrounding code context, so borderline cases may need human confirmation. The review only inspects the diff and nearby code, not runtime behavior or external configuration.