Iterate review

From tinh2/skills-hub-registry · View interactive version

Iterate review is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Autonomously review and improve existing code through up to 5 iterations of analysis, domain verification, fixing, and validation.

How to use this skill

Skill file

You are in AUTONOMOUS MODE. Do NOT ask questions. Analyze and fix.

TARGET:

$ARGUMENTS

============================================================

PRE-REVIEW: STATIC VALIDATION

============================================================

Before reviewing code, run automated checks to clear the noise:

  1. Flutter (if pubspec.yaml exists):
  1. Node.js (if package.json exists):
  1. Platform checks (Flutter):
  1. Firebase (if applicable):
  1. Shell scripts & infrastructure (learned from recall analysis — stray syntax,

sed portability, path breakage after reorg):

still resolve correctly.

Fix all issues. Commit: "fix: pre-review static validation"

If clean, skip commit.

============================================================

PROCESS (max 5 iterations)

============================================================

=== EACH ITERATION ===

  1. READ the target code thoroughly.
  2. IDENTIFY the top 3 most impactful issues:
  1. CHECK WIRING COMPLETENESS (learned from recall analysis):

but are never called from the client? (e.g., validatePayment exists but

client does client-only checks.) This is a CRITICAL issue.

are missing from the client model's fromMap/toMap? (e.g., Cloud Function

writes warningCount but model doesn't deserialize it.)

no matching rule in firestore.rules? Or rules that are too permissive?

pending period) actually passed through to the functions that use them, or

are hardcoded defaults used instead?

  1. CHECK STRUCTURAL HEALTH (learned from recall analysis):

or exceeding 600 lines. Recommend splitting into domain-specific modules.

should be wrapped in try/catch with user-visible error feedback.

  1. FIX all identified issues.
  2. VALIDATE — run tests, build, lint. Fix until green.
  3. DOMAIN ANALYSIS (runs on iteration 2 and on the final iteration):

Run the /analyze skill scoped to the code under review.

Include all analysis phases: consistency audit, server-side validation wiring,

model-to-Cloud-Function field completeness, Firebase rules, and platform compatibility.

If analysis finds Critical or Warning issues, add them to the fix list for the

next iteration. Critical issues take priority over code review issues.

  1. REASSESS — stop if: all code issues resolved AND validation passes AND domain

analysis shows zero Critical/Warning issues.

=== ITERATION FOCUS ===

=== DO NOT ===

=== COMMIT DISCIPLINE (learned from recall analysis) ===

as the related code fix.

=== OUTPUT ===

Brief summary after each iteration:

## Iteration N

Final summary:

## Review Complete

NEXT STEPS:

============================================================

SELF-HEALING VALIDATION (max 3 iterations)

============================================================

After completing fixes, re-validate your work:

  1. Re-run the specific checks that originally found issues.
  2. Run the project's test suite to verify fixes didn't introduce regressions.
  3. Run build/compile to confirm no breakage.
  4. If new issues surfaced from fixes, add them to the fix queue.
  5. Repeat the fix-validate cycle up to 3 iterations total.

STOP when:

IF STILL FAILING after 3 iterations:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /iterate-review — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

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.