From code-quality-plugin
Detects silent degradation patterns where operations succeed but produce empty results due to unmet preconditions. Scans JS/TS, Python, Go, Rust code for missing checks, silent skips, and misleading success messages.
npx claudepluginhub laurigates/claude-plugins --plugin code-quality-pluginThis skill is limited to using the following tools:
Detect code patterns where operations complete "successfully" but produce empty or useless results because preconditions are silently unmet.
Creates new Angular apps using Angular CLI with flags for routing, SSR, SCSS, prefixes, and AI config. Follows best practices for modern TypeScript/Angular development. Use when starting Angular projects.
Generates Angular code and provides architectural guidance for projects, components, services, reactivity with signals, forms, dependency injection, routing, SSR, ARIA accessibility, animations, Tailwind styling, testing, and CLI tooling.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
Detect code patterns where operations complete "successfully" but produce empty or useless results because preconditions are silently unmet.
| Use this skill when... | Use /code:review instead when... |
|---|---|
| A feature reports success but produces nothing | You need general code quality review |
| Scan/batch operations return 0 results silently | You want security or performance review |
| Users see green success banners for empty outcomes | You need SOLID principles assessment |
| Config-dependent features skip without warning | You want test coverage analysis |
| Multi-detector/multi-step operations silently skip steps | You need architecture review |
$ARGUMENTS (defaults to current directory if empty)find . -maxdepth 1 \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.py" -o -name "*.go" -o -name "*.rs" \) -type ffind . -maxdepth 1 \( -name ".env*" -o -name "config.*" -o -name "settings.*" \) -type fParse from $ARGUMENTS:
PATH: Directory or file to scan (defaults to .)--fix: Apply recommended fixes (add precondition checks, warning messages, status indicators)Execute this silent degradation scan:
Use Glob to find source files in the target path:
**/*.ts, **/*.tsx, **/*.js, **/*.jsx for TypeScript/JavaScript**/*.py for Python**/*.go for Go**/*.rs for RustExclude node_modules, dist, build, .git, vendor, __pycache__ directories.
Search each source file for these five pattern categories. Use Grep and Read to find matches.
Code that checks for a config value and silently returns empty results when absent.
Indicators:
if (!apiKey) or if not api_key: followed by return [] or return 0 or continueprocess.env.X or os.environ.get() or os.Getenv() used in conditions that gate result-producing logicExample of the problem:
// Silently returns nothing when Gemini isn't configured
if (!config.geminiApiKey) {
return { suggestions: [] }; // No warning, no status
}
Code that reports success regardless of whether meaningful work was performed.
Indicators:
count === 0Example of the problem:
// Green banner whether it found 50 items or 0
toast.success(`Scan completed. Created ${results.length} suggestions.`);
Operations composed of multiple detectors/processors/steps where individual steps are skipped without surfacing this to the caller.
Indicators:
try/catch blocks that swallow errors and continue iterationExample of the problem:
for (const detector of detectors) {
if (!detector.isAvailable()) {
skipped.push(detector.name); // Tracked but never shown
continue;
}
results.push(...detector.run());
}
// skipped list exists but UX ignores it
Functions that require preconditions (data present, services configured, dependencies available) but don't validate or communicate them upfront.
Indicators:
Example of the problem:
# Returns empty if no themes have embeddings - but doesn't check or warn
def find_similar_themes(threshold=0.85):
themes = db.query(Theme).filter(Theme.embedding.isnot(None)).all()
# If no embeddings exist, this silently returns []
pairs = [(a, b) for a, b in combinations(themes, 2)
if cosine_similarity(a.embedding, b.embedding) > threshold]
return pairs
Code that falls back to a degraded mode of operation (fewer features, reduced functionality) without any indication to the user that they're getting a partial experience.
Indicators:
Example of the problem:
// User has no idea they're getting a degraded scan
const detectors = [basicDetector];
if (geminiKey) detectors.push(aiDetector); // silently omitted
if (hasEmbeddings) detectors.push(simDetector); // silently omitted
return runDetectors(detectors); // runs 1 of 3 with no indication
For each finding, report:
| Field | Content |
|---|---|
| File | file:line reference |
| Pattern | Which of the 5 patterns it matches |
| Severity | high (success message on empty), medium (silent skip), low (missing validation) |
| What happens | Describe the silent failure from the user's perspective |
| Preconditions | List what must be true for the code to produce results |
| Fix | Specific code change to surface the degradation |
Severity guide:
Print a summary table:
Silent Degradation Scan: <path>
| Pattern | Findings | Severity |
|----------------------------|----------|----------|
| Silent config skip | N | medium |
| Success on zero results | N | high |
| Silent step skipping | N | high |
| Missing precondition check | N | low |
| Degraded mode hidden | N | medium |
Total: N findings across M files
If --fix is specified, apply these fixes for each finding:
After applying fixes, list all changes made with file:line references.
Before running multi-detector operations, check and display precondition status:
// Before
const results = await runScan();
toast.success(`Done. ${results.length} found.`);
// After
const status = checkPreconditions();
if (status.issues.length > 0) {
showPreconditionPanel(status); // "Gemini: not configured, Embeddings: 0 themes"
}
const results = await runScan();
toast.info(`Scan: ${results.active}/${results.total} detectors ran. ${results.length} found.`);
// Before
return { success: true, count: results.length };
// After
return {
success: true,
count: results.length,
skipped: skippedDetectors,
degraded: activeDetectors.length < totalDetectors,
missingPreconditions: missingPrereqs,
};
| Context | Command |
|---|---|
| Quick scan | /code:silent-degradation src/ |
| Scan and fix | /code:silent-degradation src/ --fix |
| Specific file | /code:silent-degradation src/features/scanner.ts |