ada-code-efficiency-review

Audits code diffs for redundant computation, N+1 patterns, concurrency issues, and memory leaks.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/wubing7755/Ada --skill ada-code-efficiency-review-wubing7755
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ada-code-efficiency-review
Source: https://github.com/wubing7755/Ada/tree/main/skills/software-development/ada-code-efficiency-review
Command: npx skills add https://github.com/wubing7755/Ada --skill ada-code-efficiency-review-wubing7755

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Code that works correctly can still waste resources: repeated computation, N+1 queries, serial async calls, hot-path allocations, TOCTOU races, memory leaks, and silently swallowed errors. This Skill performs a focused efficiency audit of a diff or codebase and produces graded findings with concrete fixes. ## Core Features & Use Cases - 8-Category Efficiency Checklist: Systematically checks redundant computation, N+1 access patterns, missed concurrency, hot-path bloat, TOCTOU races, memory issues, excessive reads, and silent failures. - Graded Findings with Fixes: Every finding includes file and line references, a concrete fix recommendation, and confidence (HIGH/MEDIUM/LOW) plus risk (🔴/🟡/🟢) grading, ending with a prioritized summary table. - Cross-File Tracing: Reads changed files in full and traces interop layers, domain models, and service registrations to avoid false negatives from surface-level diff reading. - Use Case: After landing a Blazor WASM feature touching 5 files, ask for an efficiency review to catch a CancellationTokenSource leak on hover events and per-render .ToList() allocations before merging. ## Quick Start Ask the agent to review the current staged diff for efficiency and performance issues, including N+1 patterns, memory leaks, and missed concurrency opportunities.

Frequently Asked Questions about ada-code-efficiency-review

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

FAQPage Schema
How do I review a code diff for performance issues?

Run an efficiency-focused review that reads every changed file in full, then checks an 8-category checklist covering redundant computation, N+1 patterns, missed concurrency, hot-path bloat, TOCTOU races, memory issues, excessive reads, and silent failures. Each finding includes a concrete fix and severity grading.

What is the difference between an efficiency review and a general code review?

A general code review checks security, logic errors, and test regressions before commit. An efficiency review targets waste only: code that works correctly but does too much work, allocates too often, or leaks resources over time.

How do I detect N+1 query patterns in code?

Look for loop bodies calling FirstOrDefault or Find on the same collection each iteration, per-event linear scans, or inner queries that a pre-built dictionary lookup could satisfy. Flag them only when N can grow large or the call sits on a hot path.

Does this efficiency review work for languages other than C# and Blazor?

Yes, the 8-category checklist is language-agnostic and applies to any codebase. The skill includes extra Blazor WASM-specific guidance for JS interop batching, render-cycle allocations, and await re-entrancy, but the core audit works anywhere.

When should I skip an efficiency-focused code review?

Skip it for style-only changes, documentation, and config tweaks, or when the user only wants bug detection rather than waste analysis. It is most valuable on diffs with 3+ changed files or changes touching hot paths like startup and render loops.

Why does the review read whole files instead of just the diff?

A changed line can look fine in isolation but be called from a hot loop elsewhere in the file. Reading full files and tracing cross-file dependencies like interop layers and service registrations prevents false negatives where leaks hide outside the diff.