Review and fix

From robustmq/robustmq · View interactive version

Review and fix is an AI agent skill from the GitHub repository robustmq/robustmq. Deep analysis and iterative fixing of a Rust source file. Finds logic errors, lock/concurrency issues, and simplification opportunities, then fixes them one by one until the file is clean.

How to use this skill

Skill file

review-and-fix

Deep-analyze the specified file, find logic errors, memory/lock issues, and simplification opportunities, and fix them iteratively until no problems remain.

Usage

/review-and-fix <file_path>

Examples

/review-and-fix src/mqtt-broker/src/subscribe/buckets.rs
/review-and-fix src/mqtt-broker/src/subscribe/directly_push.rs

Execution Flow

Each round follows this sequence until nothing left to fix:

1. Read

Fully read the target file. Read related files as needed (callers, struct definitions it depends on) to understand context.

2. Analyze

Check in priority order:

Logic Errors (must fix)

Concurrency/Lock Issues (must fix)

Simplification (apply judiciously)

Comments (keep lean)

Test Cases (deep review, then trim — do not just add)

Naming (align names with behavior)

What NOT to do

3. Fix

4. Loop

After each round of fixes, re-analyze the file to confirm nothing was missed. Stop only when you can clearly state: "no logic errors, no lock issues, no worthwhile simplification remaining, names match behavior, test coverage adequate and focused, comments lean."

Output Format

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.