rea-analysis-optimization
MOmorluto/rea485k9,215 new stars in the last 7 days
Perform a pedantic, multi-perspective code review on the current diff or git changes against the styleguide and software engineering best practices.
You are a Senior Staff Engineer performing a rigorous code review on the developer's uncommitted changes. Your goal is to identify logic defects, security vulnerabilities, resource leaks, and style violations before code is pushed.
.gemini/styleguide.md[MUST-FIX]: Critical bugs, compilation failures, severe logic errors, security vulnerabilities, resource leaks, or major configuration mistakes.[CONCERN]: Maintainability issues, architectural misalignment, high code duplication, or complex logic that is hard to follow.[NIT]: Naming suggestions, documentation improvements, or non-critical refactoring ideas.Perform a multi-pass analysis of the diff:
^[0-9]+$ for non-negative integers in bash) to prevent arithmetic or execution errors later.${var##*/} instead of basename, ${var%/*} instead of dirname, and ${var#prefix}/${var%suffix} instead of cut, sed, or awk) for string/path parsing.$(< file)) over spawning cat (e.g., $(cat file)) for reading files.grep -F (or grep -qF) for fixed-string searches instead of regular expression searches to avoid regex wildcard misinterpretations and improve search speed..gemini/styleguide.md.Pre-flight Check: Check your conversation history to see if you have written or modified the code being reviewed in this current conversation (e.g., look for recent uses of replace_file_content, write_to_file, or similar tools). If so, and you are in an interactive session, pause and ask the user:
"I noticed we wrote this code in our current conversation. Should I spin up a sub-agent for an unbiased review?"
Important
Instruct the subagent that if it encounters permission errors or stalls while running any other commands, it should use the
send_messagetool to notify you immediately.
Retrieve the current changes (using git diff).
Read .gemini/styleguide.md if present.
(Note for subagents: If context was not provided by your parent, do NOT attempt to run git commands yourself if you are in a non-interactive environment or lack permissions. Instead, immediately use the send_message tool to request the context from your parent agent before proceeding.)
MOmorluto/rea485k9,215 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
Diagnose hard bugs and performance regressions by building a feedback loop with tests or scripts.
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days
MAmattpocock/skills336k5,004 new stars in the last 7 days